Write and Submit your first Linux Kernel Patch

なる動画を下記エントリから確認。

とりあえず、
git://github.com/gregkh/kernel-tutorial.git
をローカルに clone してスライドをざくっと確認して視聴開始。

scripts/checkpatch.pl

なんてのがあるんですね。あるいは

$ make M=hoge

って方法があるんスね。

patch の作り方

なんとなく checkpatch.pl の warning を一つ消して云々している。
で、branch 作って master との差分を git format-patch で作成してます。
む、git send-email って --to とか --cc とかで送付先を指定して format-patch でナニした patch を投げれたのか。去年のプロジェクトでここまでヤッてみりゃ良かったよ。
smtp なソレは .gitconfig で指定するんスね。
ざっくりな流れを再確認。

  • checkpatch.pl 通してた
  • diff 見て
  • モジュールを make して
  • commit して
    • signed off 云々ってコメントに入れてたな
  • git show
  • git format-path master..tutorial

で、git send-email か。

scripts/get_maintainer.pl

メイルの送付先がこれで分かるのか。--file でソースファイルを指定する模様。
最後に kernelnewbies.org 紹介して終わり。25 枚のスライドで 40 分しゃべるんですね。
正直、signed-off のあたりはよく分かってないのですが、以下の Developer's Certificate of Origin 1.0 の a か b か c に合致してれば自分で Signed-off-by なコメントをコミットログに入れとけ、って話だったかと。

        Developer's Certificate of Origin 1.0

        By making a contribution to this project, I certify that:

        (a) The contribution was created in whole or in part by me and I
            have the right to submit it under the open source license
            indicated in the file; or

        (b) The contribution is based upon previous work that, to the best
            of my knowledge, is covered under an appropriate open source
            license and I have the right under that license to submit that
            work with modifications, whether created in whole or in part
            by me, under the same open source license (unless I am
            permitted to submit under a different license), as indicated
            in the file; or

        (c) The contribution was provided directly to me by some other
            person who certified (a), (b) or (c) and I have not modified
            it.

then you just add a line saying

        Signed-off-by: Random J Developer <random@developer.org>