linux 内核开发环境搭建

来源:互联网 发布:深度linux deepinv15.3 编辑:程序博客网 时间:2024/05/22 02:03


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






0 0
原创粉丝点击