自己上 patch 到 linux kernel mailing list 的筆記。

  • kernel 開發筆記
    • vim 設定 :set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab cindent cc=80
    • 編譯 make defconfig && make -j $(nproc)
    • 檢查
      • ./scripts/checkpatch.pl --patch
      • 使用 sparse -> make C=1
  • LKML 上提交 patch
    • Generate patch
      • Generate patch git format-patch HEAD~
        • With versioning git format-patch -v3 HEAD^
      • Apply patch git am [patch filename]
    • Setup email using gmail on Ubuntu
      • sudo apt install git git-email
      • Get app password from here
      • Edit ~/.gitconfig
        1
        2
        3
        4
        5
        6
        7
        8
        9
        
        [sendemail]
            smtpPass = ...
            smtpserver = smtp.gmail.com
            smtpuser = ...@gmail.com
            smtpencryption = tls
            smtpserverport = 587
        [user]
            email = ...@gmail.com
            name = ...
        
      • Try to send a patch using the instructions here
    • Get the maintainer’s email to send to
      • e.g. ./scripts/get_maintainer.pl -f include/linux/compiler.h
    • Reply review emails
      • 針對 gmail 的 email, 改成 plain text mode, 就可以正常使用 reply all 解決
  • References