Sunday 15 July 2012

steps to make zimage, uimage

Here we attempt to create zimage and uimage associated with linux kernel required
to port linux on arm9

First download the kernel in our case,linux-2.6.24-rc8, from kernel.org.
Then extract the file.
Then type the following in terminal:
First make a directory

$ mkdir cs-e9302
$ cd cs-e9302
$ wget http://www.kernel.org/pub/linux/kernel/v2.6/testing/v2.6.24/linux-2.6.24-rc8.tar.bz2
$ wget http://dev.ivanov.eu/projects/cs-e9302/linux-2.6.24-rc8_ep93xx_mmc.patch.gz
$ tar -xjf linux-2.6.24-rc8.tar.bz2
$ cd linux-2.6.24-rc8
$ zcat ../linux-2.6.24-rc8_ep93xx_mmc.patch.gz | patch -p1
$ cp cs-e9302_kernel_config .config


$ cd linux-2.6.24-rc8
$ nano Makefile

in the makefile change:
ARCH? =arm
CROSS_COMPILE=arm-linux-gnueabi-


Then save the changes in the Makefile.
After that

$ cd linux-2.6.24-rc8
$ make oldconfig
$ make menuconfig

In the menuconfig file
Make sure your system type is "EP93xx-based" and "Support Cirrus Logic EDB9302" platform:
And for more functions check "Root file system on NFS" and SMB file system support".

after making these changes just write the make command:
$ make
we will get the kernel in the arch/arm/boot directory.




Now for creating the uImage:
We will need to install mkimage in the PC.
$ sudo apt-get install uboot-mkimage

After this to get the uImage:
$ mkimage -A arm -O linux -T kernel -C none -a 30008000 -e 30008000 -n \linux-2.6.24-rc8

This would create the uImage in the same directory as the zImage.(in  linux-2.6.24-rc8/arch/arm/boot)




No comments:

Post a Comment