linux 核心開發環境搭建__linux

來源:互聯網
上載者:User


1.install git git-email

yum install git

yum install git-email


2.download the source code of kernel

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

git clone git://libvirt.org/libvirt.git

 git clone git://git.qemu-project.org/qemu.git


3.configure git 

git-config --global user.name "xxx "

git-config --global user.email "xxx@yy.com"

git config --list


4.configure git-sendmail

git config --global sendemail.smtpencryption tls
git config --global sendemail.smtpserver mail.messagingengine.com
git config --global sendemail.smtpuser xxx@yy.fm
git config --global sendemail.smtpserverport 587
git config --global sendemail.smtppass hackme


執行如下命令,驗證發送郵件是否成功。填寫自己的郵箱地址。

echo -e "Subject: Test Mail\r\n\r\nThis is a test mail" |msmtp --debug -t xxx@163.com

如果成功,繼續後續步驟。


5.開發自己的補丁


git checkout -b dev    //建立自己的開發分支

vi kernel/sched/core.c   //修改代碼

make -j2           

make modules_install

make install                    //編譯核心,驗證修改是否滿足預期


git commit -a -s -m 'sched: fix BUG in preempt_notifier' -e    //提交修改

git format-patch -1                                                                   //產生補丁

./scripts/checkpatch.pl 0001-sched-fix-BUG-in-preempt_notifier.patch   //檢查補丁是否符合規範

./scripts/get_maintainer.pl kernel/sched/ -f                                               //查看對應模組的維護者

git send-email --smtp-server /usr/bin/msmtp --to xxx --to xxx --cc linux-kernel@vger.kernel.org 0001-sched-fix-BUG-in-preempt_notifier.patch  //發送郵件給對應的維護者和maillist






聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.