Friday, September 28, 2007

Embedded Linux - building the kernel

The next step is to build the kernel with our toolchain
you should download the kernel source and a patch

download kernel 2.6.20 (from
download the board kernel patch

now follow this:

# tar -xjvf ${DOWLOADDIR}/linux-${VERSION}.tar.bz2
# cp ${DOWLOADDIR}/patch-${VERSION}-omap1.bz2 .
# bunzip2 patch-${VERSION}-omap1.bz2
# cd linux-${VERSION}/
# cat ../patch-${VERSION}-omap1 | patch -p1

# make clean
# make omap_osk_5912_defconfig

make sure that the following options are set:

# make

now the kernel image is ready but we have to convert it to U-BOOT format

# arm-linux-objcopy -O binary -R .note -R .comment S
arch/arm/boot/compressed/vmlinux linux.bin
# gzip -9 linux.bin
# ${U-BOOTDIR}/tools/mkimage -A arm -O linux -T kernel -C gzip -a 0x10c08000 -e 0x10c08000 -n Linux Kernel Image -d linux.bin.gz is ready

for already made click here

for help and other learning materials
visit our site: Bina

No comments: