Difference between revisions of "Hammer How to build Kernel"

From eLinux.org
Jump to: navigation, search
Line 2: Line 2:
  
 
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-2.6.22/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.
 
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-2.6.22/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:
 +
 +
  4 MB = 0x3E8000
 +
  6 MB = 0x5DC000
 +
  8 MB = 0x7D0000
 +
10 MB = 0x9C4000
 +
12 MB = 0xBB8000
 +
 +
Do:
  
 
  tar xzf linux-2.6.22.tar.gz
 
  tar xzf linux-2.6.22.tar.gz
 
  gunzip -c Hammer-linux-2.6.22-09122007.diff.gz | patch -p0
 
  gunzip -c Hammer-linux-2.6.22-09122007.diff.gz | patch -p0
 
  cd linux-2.6.22
 
  cd linux-2.6.22
 +
Edit linux-2.6.22/arch/arm/mach-s3c2410/mach-tct_hammer.c to change '''.size''' if needed.
 
  cp hammer-config .config
 
  cp hammer-config .config
 
  make oldconfig
 
  make oldconfig

Revision as of 05:41, 10 January 2008

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-2.6.22/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:

 4 MB = 0x3E8000
 6 MB = 0x5DC000
 8 MB = 0x7D0000
10 MB = 0x9C4000
12 MB = 0xBB8000

Do:

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

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