共计 3183 个字符,预计需要花费 8 分钟才能阅读完成。
I have been very busy recently,let's go on the task 03.How to patch for the Linux kernel.
This is Task 03 of the Eudyptula Challenge——————————————Now that you have your custom kernel up and running, it's time to modifyit!The tasks for this round are:– Take the kernel git tree from Task 02 and change the Makefile tomodify the EXTRAVERSION field. Do this in a way that therunning kernel (after modifying the Makefile, rebuilding, andrebooting) has the characters "-eudyptula" in the version string.– Show proof of booting this kernel. Extra cookies when you providecreative examples, especially if done in interpretive dance at yourlocal pub.– Send a patch that shows the Makefile modified. Do this in a mannerthat would be acceptable for merging in the kernel source tree.(Hint, read the file Documentation/SubmittingPatches and follow thesteps there.)
[root@bogon linux]# uname -a
Linux bogon 3.15.0-rc4-00298-g9f1eb57 #1 SMP Wed May 7 21:30:42 PDT 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@bogon ~]# cd /kernel/Task3/
[root@bogon Task3]# ls
linux
[root@bogon Task3]# cd linux/
[root@bogon linux]# cp Makefile Makefile.orig^C
[root@bogon linux]# cd ..
[root@bogon Task3]# diff -up linux/Makefile{.orig,} > /tmp/patch
[root@bogon Task3]# cat /tmp/patch
--- linux/Makefile.orig 2014-05-22 06:19:41.842094049 -0700
+++ linux/Makefile 2014-05-22 06:21:08.616098040 -0700
@@ -1,7 +1,7 @@
VERSION = 3
PATCHLEVEL = 15
SUBLEVEL = 0
-EXTRAVERSION = -rc4
+EXTRAVERSION = -eudyptula
NAME = Shuffling Zombie Juror
# *DOCUMENTATION*
[root@bogon Task3]# cd linux/
[root@bogon linux]# make -j8
[root@bogon linux]# make modules
[root@bogon linux]# make modules_install
[root@bogon linux]# make install
[root@bogon linux]# cat /etc/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/sda2
# initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=3
splashimage=(hd0,0)/grub/splash.xpm.gz
#hiddenmenu
title CentOS (3.15.0-eudyptula-00298-g9f1eb57-dirty)
root (hd0,0)
kernel /vmlinuz-3.15.0-eudyptula-00298-g9f1eb57-dirty ro root=UUID=b4d19447-4c9d-4eb8-be5d-33e7ab8c5fd9 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM quiet
initrd /initramfs-3.15.0-eudyptula-00298-g9f1eb57-dirty.img
title CentOS (3.15.0-rc4-00298-g9f1eb57)
root (hd0,0)
kernel /vmlinuz-3.15.0-rc4-00298-g9f1eb57 ro root=UUID=b4d19447-4c9d-4eb8-be5d-33e7ab8c5fd9 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM quiet
initrd /initramfs-3.15.0-rc4-00298-g9f1eb57.img
title CentOS (2.6.32-279.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-279.el6.x86_64 ro root=UUID=b4d19447-4c9d-4eb8-be5d-33e7ab8c5fd9 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM quiet
initrd /initramfs-2.6.32-279.el6.x86_64.img
[root@bogon linux]# reboot
Wait for a moment,let's check the kernel version use command:
[root@bogon ~]# uname -a
Linux bogon 3.15.0-eudyptula-00298-g9f1eb57-dirty #2 SMP Thu May 22 06:28:29 PDT 2014 x86_64 x86_64 x86_64 GNU/Linux
Luckly,it works!
正文完
创作不易,扫码加点动力

发表至: Kernel
2014-05-22