I hope that this will help those wishing to recompile their kernel. In my case it was
to turn off SMP as it seems cause to video freezes during playback. (ff - then play
unfreezes it) on my machine and sometimes recordings get stuck.. I have dual
PIII machine, but losing the second processor is small price pay for better running system
and I can always boot to SMP kernel, if I do need the power..
=== Your mileage may vary with these instructions ===
If you find mistakes in this, post a follow up and I will edit this with the corrections
After this process you will have second kernel to boot to and the orginal kernel will still be
bootable as a failsafe, in case something goes wrong and your new kernel does not work --
To boot your orginal kernel: Hold down the left shift key after post.
============= Geared for turning off SMP on R5B7 ==========
The default R5B7 install will have everything you need build a kernel.
You will need to rebuild the modules for lircd and ivtv for them to load with your
new kernel.
In /usr/src/ you should find:
* Kernel source
* Lircd source
* ivtv-0.4.3 source
********* Building your kernel
[code]
cd /usr/src/linux
[/code]
Edit the Makefile, so you don't overwrite orginal kernel modules when you install
[code]
pico Makefile
[/code]
Change line 4 from:
[code]
EXTRAVERSION = -chw-2
[/code]
to
[code]
EXTRAVERSION = -chw-nosmp
[/code]
Now configure your kernel (in this case to turn off SMP)
[code]
make menuconfig
[/code]
In "Processor type and features " section. Turn off SMP by hitting the space bar on
that option. Exit "make menuconfig" by hitting the Esc key twice. You will be ask
to save your configuration. Answer yes.
Next make your kernel with command:
[code]
make
[/code]
Depending on the speed of your machine, your new kernel should be compiled in about
two hours.
After your kernel is made, install the new kernel modules. To be on the safe side
I always back up module directory anyway. If everything does well, you can delete
your backup.
[code]
mkdir /lib/modules/2.6.15-chw-2.backup
cp -av /lib/modules/2.6.15-chw-2 /lib/modules/2.6.15-chw-2.backup
[/code]
IF YOU DIDN'T MODIFY YOUR MAKEFILE AS DESCRIBED ABOVE, YOU WILL
OVERWRITE EXISTING KERNEL MODULES AND LEAVE YOUSELF WITHOUT
AN EASY OUT IF YOUR NEW KERNEL DOES NOT WORK!
[code]
make modules_install
[/code]
On R5B7 this command will install your new kernel modules in
/lib/modules/2.6.15-chw-nosmp
Install your new kernel and configure lilo:
[code]
cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.6.15-chw-nosmp
cp /boot/initrd.gz /boot/initrd-nosmp.gz
[/code]
For those of you. Scraching your heads and asking "why the hell is he just
copying the initrd from the old kernel..." well. I gunzipped mine and mounted
it via loopback to change out the modules... and what did I see - The modules
directory was empty! My guess is that those using xfs, jfs etc. are going to have
add the correct modules to their initrd, before they will be able to boot.
So, if your using anything other ext3 for your root filesystem. Do these steps.
(you might want to do them anyway)
[code]
gunzip initrd-nosmp.gz
mount -o loop /boot/initrd-nosmp /mnt
ls /mnt/modules
[/code]
If the modules directory is empty. Just
[code]
umount /mnt
gzip /boot/initrd-nosmp
[/code]
and move on to editing your lilo.conf - If it is not empty -- make note of modules and
replace them with ones with the same name from the /lib/modules/2.6.15-chw-nosmp/
ie..
[code]
find /lib/modules/2.6.15-chw-nosmp/ -name "somemodule.ko" -exec cp "{}" /mnt/modules/ ";"
[/code]
After your done replacing the modules.
[code]
umount /mnt
gzip /boot/initrd-nosmp
[/code]
Edit your /etc/lilo.conf
[code]
pico /etc/lilo.conf
[/code]
In your lilo.conf, go down to section that looks like this:
[code]
# Boot up Linux by default.
#
default=Linux
image=/boot/vmlinuz-2.6.15-chw-2
label=Linux
initrd=/boot/initrd.gz
read-only
# restricted
# alias=1
image=/vmlinuz.old
label=LinuxOLD
read-only
optional
# restricted
# alias=2
[/code]
Change:
[code]
default=Linux
[/code]
to
[code]
default=Linux-nosmp
[/code]
And add this section:
[code]
image=/boot/vmlinuz-2.6.15-chw-nosmp
label=Linux-nosmp
initrd=/boot/initrd-nosmp.gz
read-only
[/code]
So that now that part of your lilo.conf looks like this:
[code]
# Boot up Linux by default.
#
default=Linux-nosmp
image=/boot/vmlinuz-2.6.15-chw-2
label=Linux
initrd=/boot/initrd.gz
read-only
# restricted
# alias=1
image=/boot/vmlinuz-2.6.15-chw-nosmp
label=Linux-nosmp
initrd=/boot/initrd-nosmp.gz
read-only
image=/vmlinuz.old
label=LinuxOLD
read-only
optional
# restricted
# alias=2
[/code]
Now run the lilo command so that your new kernel will boot:
[code]
lilo
[/code]
You should see this output:
[code]
Added Linux
Added Linux-nosmp *
Skipping /vmlinuz.old
[/code]
Next you will build and install the IVTV modules for your new kernel.
[code]
cd /usr/src/
tar -zxvf ivtv-0.4.3.tar.gz
cd ivtv-0.4.3
make KVER=2.6.15-chw-nosmp
make KVER=2.6.15-chw-nosmp install
[/code]
I dug around and could not figure out how to build the LIRC modules against
a non-running kernel. -- So the next step involves booting the new kernel
and compiling LIRC. Remember that if your kernel build installed the
it's modules in /lib/modules/2.6.15-chw-nosmp you should not have any problems
booting your new kernel and having everything work (except for LIRC)
If for some reason, your new kernel does not boot. Restart your machine and
hold down your left SHIFT key after post. This will bring up the lilo boot menu
and you can choose "linux" which will be your orginal kernel.
Ready? Ok. reboot your box with:
[code]
shutdown -r now
[/code]
Booted up with your new kernel? Good ;)
Next you will build and install the LIRC modules for your new kernel.
[code]
tar -jxvf /usr/src/lirc-0.8.0pre4-pvr150.tar.bz2
cd /usr/src/lirc-0.8.0pre4-pvr150
./configure
make
make install
[/code]
start lircd with:
[code]
/etc/iniit.d/lirc restart
[/code]
Now restart your frontend you should be good to go! If lirc is still not working try a reboot..
If you still have have problems with LIRC grab the 0.8.0 kit from lirc.org and try it.
=== Edit ===
As Requested //
To adapt these instructions for upgrading your kernel to newer version use your head.
Hint -- search these instructions for "nosmp"
Make sure you have enough space:
[code]
df -h /
[/code]
You will need about 600 Megs after all is said and done. If you don't have it in /
make a directory under /myth and use it.
[code]
mkdir /myth/tmp/
[/code]
Download your new kernel source, go to
www.kernel.org to see what you need.
[code]
cd /myth/tmp
wget
http://www.kernel.org/pub/linux/kernel/ ... 13.tar.bz2
tar -jxvf linux-2.6.16.13.tar.bz2
rm /usr/src/linux
ln -s /myth/tmp/linux-2.6.16.13 /usr/src/linux
cp /boot/config-2.6.15-chw-2 /usr/src/linux/.config
cd /usr/src/linux
make menuconfig
-- Hit Esc to save your new config
--- Do this regardless of making changes to config!
[/code]
Now go to section above where you type "make" to make your new kernel and
work your way down!
=== End of Edit -- fixed lots of typos ===
Good Luck!