Building Linux 2.4.18 for LN2410SBC
 
1. Install cross toolchain
   
• get gcc 2.95.3 and binutils 2.10 for Linux from the CD provided
   
• uncompress and copy them to /usr/local/arm/2.95.3
 
• set path and environment variables
 
 $setenv GCC_ARM_HOME/usr/local/arm/2.95.3
 
 $setenv GCC_EXEC_PREFIX $GCC_ARM_HOME/lib/gcc-lib/
 
 $set path=($GCC_ARM_HOME/bin $path)
 
 
2. Install kernel source and patches
 
 $tar -zxvf linux-2.4.18.tar.gz
 
 $gzip -dc patch-2.4.18-rmk7.gz | (cd linux;patch -p1)
 
 $gzip -dc patch-2.4.18-rmk7-swl8.gz | (cd linux;patch -p1)
 
 $gzip -dc patch-2.4.18-rmk7-swl8-cy2.gz | patch -p0
 
 $gzip -dc patch-2.4.18rmk7-swl8-cy2-lc2.gz | (cd linux;patch -p1)
 
 
3. Edit linux/.config to determine root file system
 
 $cd linux
 
 $vi .config
 
• 5 partitions (/dev/mtdblock0 ~ 4) in 32Mbytes NAND flash
 
default root file system is /dev/mtdblock4 of 16Mbytes (root=/dev/mtdblock4)
 
For different partition scheme, change partition table in drivers/mtd/nand/smdk2410.c
 
For RAM disk, set CONFIG_CMDLINE="root=/dev/ram0 console=ttyS0"
 
 
4. Configure kernel
 
 $make oldconfig
 
 
5. Build kernel
 
 $make dep
 
 $make clean
 
 $make zImage
 
 
5. Download linux/arch/arm/boot/zImage to the board via u-boot
 

 

© 2004-2008 LittleChips.com. All Rights reserved.