Hammer How to build Kernel

From eLinux.org
Revision as of 00:32, 14 December 2008 by Keesj (talk | contribs)
Jump to: navigation, search

Here is how to build a custom kernel:

NOTE: If you are installing a custom rootfs, you may have to increase the size of the space in flash to hold the new rootfs image. You do this by editing the linux-<version>/arch/arm/mach-s3c2410/mach-tct_hammer.c file. Find the .size string and change the value to be a little larger than your rootfs image is. The image size is in hex, so you will have to do a conversion to get the right value.

Some common values for .size are:

 2 MB = 0x340000
 3 MB = 
 4 MB = 
 5 MB = 
 6 MB = 
 8 MB = 

You may have to increase the size of your initramfs/initrd to accomodate your ramdisk image if the uncompressed size is larger than about 12 MB. There will be both compressed and uncompressed rootfs images in the buildroot/binaries/<project> directory. To do this, you have to set the size of the initramfs/initrd in the kernel. Find Block Devices in the kernel configuration and set the size to be just a little larger than your uncompressed initramfs/initrd. Only add a multiple of 1024 bytes.


tar xzf linux-2.6.22.tar.gz
cd linux-2.6.22
zcat ../Hammer-linux-2.6.22-09122007.diff.gz | patch -p1
Edit linux-<version>/arch/arm/mach-s3c2410/mach-tct_hammer.c to change .size if needed.
cp hammer-config .config
make oldconfig
make zImage
make modules

The kernel can be found in arch/arm/boot/zImage