HOWTO build a 2.6 kernel for PPC

Jeroen Zwartepoorte yellowdog-general@lists.terrasoftsolutions.com
Mon Jan 5 01:37:00 2004


Hi,

Don't do it this way. Never overwrite an existing kernel. That way you
won't be able to boot into a safe & working kernel if the new one
doesn't work.

Also, don't get the sources from kernel.org. Ben Herrenschmidt (benh)
has an rsync repository setup with patches specific to PPC.

Before doing the steps below, make sure your modutils package is
up-to-date. The one shipped with YDL 3.0.1 is too old. Get a newer one
from Fedora (ppc or source rpm). My version is modutils-2.4.25-13 which
works fine.

Do something like this (as root):

cd /usr/src
mkdir pmac-benh26
cd pmac-benh26
rsync -avvz --delete --partial --blocking-io
source.mvista.com::linuxppc-2.5-benh .
make pmac_defconfig
make
make modules_install
cp vmlinux /boot/vmlinux-2.6.1-rc1-ben1
cp System.map /boot/System.map-2.6.1-rc1-ben1
mkinitrd /boot/initrd-2.6.1-rc1-ben1.img 2.6.1-rc1-ben1

Now edit /etc/yaboot.conf and add the following lines:

image=/boot/vmlinux-2.6.1-rc1-ben1
        label=2.6.1
        root=/dev/hda5
        read-only
        initrd=/boot/initrd-2.6.1-rc1-ben1.img
 
Now don't forget to run 'ybin' to update yaboot.

Now reboot and choose "2.6.1" at the boot prompt.

NOTE: the current version of the kernel in benh's rsync repo is
2.6.1-rc1-ben1. You might want to change the strings in the future when
a newer version is available.

TODO: My soundcard in my powerbook doesn't work. This is probably
related to some sound module not being loaded. The following modules are
loaded when i boot with 2.6.1 (cat /proc/modules):

ohci1394 36928 0 - Live 0xe13f1000
ieee1394 82664 1 ohci1394, Live 0xe13fd000

If anyone can help me out with this, i'd greatly appreciate it (perhaps
a HOWTO to get ALSA working as well on PPC?)

Cheers,

Jeroen

On Sun, 2004-01-04 at 23:03, Fra wrote:
> >I was  wanting to try out the new 2.6 kernel.
> >Can anyone show me what to do to install and compile it?
> >Thanks Jim
> 
> 1) You must get it from www.kernel.org then unstuff it and with the
> terminal go in the kernel folder
> 2) type "make xconfig" and configure the kernel as u want
> 3) save the kernel settings
> 4) type "make modules && make modules_install"
> 5) type "make vmlinux"
> 6) type "cp ./System.map /boot/" it will ask u if u want to overwrite the
> file, type "y"
> 7) edit the yaboot configuration file typing "emacs /etc/yaboot.conf" or
> any other text editor, and put all the          new settings there
> 8) type "ybin"
> 9) reboot and good luck
>  
> Fra
> 
> Mac Os: Plug and Play
> Windows: Plug and Pray
> 
> 
> _______________________________________________
> yellowdog-general mailing list
> yellowdog-general@lists.terrasoftsolutions.com
> http://lists.terrasoftsolutions.com/mailman/listinfo/yellowdog-general