Debonaras
view · edit · print · history

N2100 Building a new Kernel

Download the latest kernel from http://www.kernel.org, or patch a kernel tree with the latest patches. You can use 'ketchup' which downloads and applies the patches automatically. For the kernel kernel sourcetree:

  • make iop32x_defconfig (only basic settings) or better copy .config from the debian iop32x kernel header package to /usr/src/linux and compare the kernel configuration
  • make
  • make modules_install
  • cp arch/arm/boot/zImage /boot/vmlinuz-2.6.xx-myversion
  • cp /user/src/linux/System.map /boot/System.map

For the initramfs

  • update-initramfs -k 2.6.xx-myversion -c

Be patient! Unless your kernel is stripped down to the absolute minimum you should expect a clean build to take four hours.

You can also use an installkernel script, to automate the kernel image copy and run update-initramfs. This will avoid mistakes like omitting the vital -c option. Create a script called installkernel and place it in your ~/bin. The script will receive four arguments:

  • $1 - kernel version
  • $2 - kernel image file
  • $3 - kernel map file
  • $4 - default install path (blank if root directory)

In the script you can copy the kernel binary to /boot, run update-initramfs and possibly copy the files over to your tftp server ready for a network boot.

If you like to flash the kernel you can use the command

  • flash-kernel 2.6.x-iop32x

(The current versions of flash kernel checks the sub architecture, by checking the name of the kernel with the system hardware)


view · edit · print · history · Last edited by Peter.
Based on work by Peter, Peter pebainodeat, and Frank Kingswood.
Originally by Frank Kingswood.
Page last modified on March 15, 2009, at 09:36 AM