如何给内核提交补丁
提交过程
step1: get the right branch
可以参考 MAINTAINERS文件,可能不对,直接看git.kernel.org, 注意git pull到最新
step2: generate one patch
git format-patch -1 commit_id |
cover-letter给一次提交多个用
step3: check patch
./scripts/checkpatch.pl *.patch |
没有错误会提示total: 0 errors, 0 warnings
step4: get maintainers
./scripts/get_maintainer.pl *.patch |
比如下面:
Andrew Morton <akpm@linux-foundation.org> (commit_signer:111/121=92%) |
两个open list, linux-mm@kvack.org就是内核内存的邮件列表(在http://www.spinics.net/lists/mm-commits/),linux-kernel@vger.kernel.org就是LKML.org内核邮件列表了。
step5: send email
to 维护人,cc open list就可以了,可以先send to自己测试下, mail list可以订阅了解下动态。
a. using git send-email xx.patch –to
b. using standard email client, windows可以用Claws Mail,适合win上办公linux无上网权限的。
step6: discussion
do not top post,最好要部分引用回复,客户端用推荐的见email-clients.txt。
step7: update your patch
如果维护人让你修改,那在修改完成后要给patch加个版本,比如第二版用如下命令:
git format-patch --subject-prefix="PATCH v2" -1 commit_id |
生成patch后用在”—“下添加change log,比如:
Signed-off-by: Bo Shen <voice.shen@atmel.com> |
ok,完成后git send-email这个patch。
notes about tags:
一般maintainer会有resend this patch的要求,比如忘记Cc了,resend时记得要加Reviewed-by等tag,如果resend多次记得加版本号…
step8: 发送补丁集
git format-patch -o out/ --cover-letter -n --thread=shallow commit_id_start^..commit_id_end |
编辑cover-letter patch, then send out目录即可。
refer doc
- https://www.kernel.org/pub/software/scm/git/docs/git-send-email.html
- https://kernelnewbies.org/FirstKernelPatch
- https://kernelnewbies.org/PatchTipsAndTricks
- Documentation/SubmitChecklist
- Documentation/SubmittingPatches
- Documentation/SubmittingDrivers
- Documentation/CodingStyle
- Documentation/email-clients.txt
版权声明:本站所有文章均采用 CC BY-NC-SA 4.0 CN 许可协议。转载请注明原文链接!