Quote:
Originally Posted by spiky0011
So when I have copied to new kernel source tree do I run the menuconfig command and just enable the new settings I need?
|
I don't know how and where you normally compile a kernel, I'm doing it as follows.
First time kernel compilation:
Code:
copy linux-3.1.tg.bz2 to /usr/src
tar jxvf linux-3.1.tg.bz2
cd /usr/src/linux-3.1
make mrproper
make menuconfig
make modules_install
cp -v arch/x86/boot/bzImage /boot/vmlinuz-3.1-lfs-7.0
cp -v System.map /boot/System.map-3.1
cp -v .config /boot/config-3.1
If this kernel boots I create an extra entry:
Code:
cd /boot
cp vmlinuz-3.1-lfs-7.0 vmlinuz-3.1-lfs-7.0.org
cp System.map-3.1 System.map-3.1.org
cp config-3.1 config-3.1.org
If I want to re-compile this specific kernel version (3.1 in this case) I do the following:
Code:
cd /boot
cp vmlinuz-3.1-lfs-7.0 vmlinuz-3.1-lfs-7.0.prev
cp System.map-3.1 System.map-3.1.prev
cp config-3.1 config-3.1.prev
cd /usr/src/linux-3.1
make mrproper
cp /boot/config-3.1 .config
make menuconfig
make modules_install
cp -v arch/x86/boot/bzImage /boot/vmlinuz-3.1-lfs-7.0
cp -v System.map /boot/System.map-3.1
cp -v .config /boot/config-3.1
If I want to try a newer kernel version (say 3.5) I do the following:
Code:
copy linux-3.5.tg.bz2 to /usr/src
tar jxvf linux-3.5.tg.bz2
cd /usr/src/linux-3.5
make mrproper
cp /boot/config-3.1 .config
make silentoldconfig
make menuconfig
make modules_install
cp -v arch/x86/boot/bzImage /boot/vmlinuz-3.5-lfs-7.0
cp -v System.map /boot/System.map-3.5
cp -v .config /boot/config-3.5
If this one works I also create .prev versions for it in /boot (after a while you might want to clean up your old/unused stuff
). Once I switch to a newer version I remove the .prev entries associated with the older one (the 3.1 version in this case).
If all went as planned I end up with the following in /boot (assuming the above examples):
Code:
# original first working kernel
vmlinuz-3.1-lfs-7.0.org
System.map-3.1.org
config-3.1.org
# working (possibly edited) 3.1 kernel
vmlinuz-3.1-lfs-7.0
System.map-3.1
config-3.1
# current 3.5 kernel I boot with
vmlinuz-3.5-lfs-7.0
System.map-3.5
config-3.5
# previous version current kernel
vmlinuz-3.5-lfs-7.0.prev
System.map-3.5.prev
config-3.5.prev
PS: I did not mention the 4 grub entries associated with these kernels, I assume you know how to create the extra entries.