码迷,mamicode.com
首页 > 系统相关 > 详细

Linux Submitting Patch

时间:2016-08-22 18:00:09      阅读:309      评论:0      收藏:0      [点我收藏+]

标签:

Linux Submitting Patch

Linux Submitting Patch

For a long time, I‘ve been wondering what it would be like to submit patches to the linux kernel. Now I find a chance to do that.

This post records the necessary steps for preparing and submitting patches to the kernel mail list.

1 Get the latest kernel source code from git. It is recommeded to use Torvalds‘s branch.

git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

2 Create a new branch within git, in which the modification takes place.

git branch wujing(any branch name)
git checkout wujing

After this step, the working branch is switched to wujing. You can check the status with :

git branch

The branch name with a star sign in front is the currently active branch.

3 Commit the changes.

git commit -m "modification summary" ./*

In the above command, it is assumed that the modified files is located in the current working directory. Normally, this directory can be the top level source directory.

4 Make patch with git.

git format-patch master -s

This command creates a patch against the master branch. With all the necessary information of a standard patch.

5 Configure the msmtp service and send the patch to the matainers.

apt install msmtp

The configuration file of msmtp(~/.msmtprc) using hotmail is as follows:

 1: defaults
 2: logfile ~/.msmtp.log
 3: #hotmail
 4: account hotmail
 5: protocol smtp
 6: host smtp.live.com
 7: from xxx@hotmail.com
 8: user xxx@hotmail.com
 9: password xxxx
10: port 25
11: auth login
12: tls on
13: tls_trust_file /etc/ssl/certs/ca-certificates.crt
14: syslog LOG_MAIL
15: 
16: # Set a default account
17: account default : hotmail

To find the matainers, use the following command:

./scripts/get_maintainer.pl -f xx

Finally, to send the patch to the target users:

git send-email –smtp-server /usr/bin/msmtp –to xxx@qq.com –cc xxx@cqu.edu.cn xxx.patch

Author: wujing

Created: 2016-08-22 Mon 17:09

Emacs 24.5.1 (Org mode 8.2.10)

Linux Submitting Patch

标签:

原文地址:http://www.cnblogs.com/wujingcqu/p/5796307.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!