HowTo Compile my own kernel and make image?

Is there anywhere a howto for download, which explains 
compiling the kernel and making the image?
thanks a lot

Search for "Building Embedded Linux Systems.pdf"  Excellent book.

Here you will also find a Quick Start.

Vladimir Fonov
Unpack kernel from friendlyARM, install tools , setup environment

export CC=${CROSS_COMPILE}gcc;        
export AR=${CROSS_COMPILE}ar;         
export AS=${CROSS_COMPILE}as;         
export LD=${CROSS_COMPILE}ld;         
export NM=${CROSS_COMPILE}nm;         


cp config_mini2440_t35 .config
make oldconfig CROSS_COMPILE=arm-linux-
make zImage CROSS_COMPILE=arm-linux-

and you will have a new zImage.

I want a kernel u-image to run with u-boot.Can i create that with the
source i got in the dvd?

mkimage A
     arm O linux -T kernel -C none a
     0x30008000 e 0x30008000 -d kernel-
     bin/arch/arm/boot/zImage output/uImage

cd to where ever you have mkinage 
You will need to change to your path to kernel-bin/arch/arm/boot/zImage
output is just a directory to hold your uImage

well thankx for the reply but i cant make out anything of it.
could you write the steps in order please!:)

Have you got mkimage on your system?

1. mkdir output
2. cd to where ever you have mkimage on your system
3. then in the command line type in:

mkimage A arm O linux -T kernel -C none a
0x30008000 e 0x30008000 -d path/to/your/zImage path/to/output/uImage

If you study the script at

that may help.

I believe my copy of mkimage appeared after following this script, ie after
doing a kernel compilation.  I haven't tried running mkimage by itself.

export CC=${CROSS_COMPILE}gcc;        
export AR=${CROSS_COMPILE}ar;         
export AS=${CROSS_COMPILE}as;         
export LD=${CROSS_COMPILE}ld;         
export NM=${CROSS_COMPILE}nm;

the variable CXX must be exported too ?

export CXX=${CROSS_COMPILE}g++ ??


i did it thanks dave and all.

nw can anyone give me a kernel uImage??
tried downloading the git but i freezes after 16mb download

I am confused . . . you said "i did it", which I asume is generate a uImage
and now you want a uImage??

I will be posting a tutorial covering this topic on the Wiki this weekend
and if permitted I'll upload a uImage from that has a fair bit of
stuff stripped out of it and my_rootfs.jffs2.

Have a crack at this tutorial first, it is a good starting point.


To build your kernel:

Follow the steps described on chapter 5.4 user manual from micro2440 manual
(available on download area (only chinese)) to build your
development environment. Then go to linux-2.6.29 folder and type as root:

To change kernel options:
sudo make menuconfig

To build kernel:
sudo make zImage

After some minutes zImage will be available on ./arch/arm/boot.

Use usbpush (on linux) or dnw (on windows) and send it to your board.

try out and tell us your result.

useful link:

@dave.. :) i was happy i was able to convert zimage to uImage(the way u
told meh!).but that Uimage doesnt work with jffs2 .while kernel starts it
says loading yaffs.and i'm using U-boot.
Can u tell me how could i create a uImage with buildroot.?I tried seleting
both jffs2 and kernel in make menuconfig and when i make it says 
"No U-Boot board name set.BR2_TARGET_UBOOT_BOARDNAME setting. stop.

thanks.but i need steps for creating uImage.

Haven't used buildroot.

Think you need state what you are trying to do.

- which kernel image
- which file system
- modules built-in or loadable
- building your own rootfs?

just for starters.

Send your email address to:

dave_festing at hotmail dot com

and I'll send you a draft tutorial that might help.

How did you get on with the tutorial at:


Raja sekhar

Can any one help me to sort out this problem..
I am getting this error while image building.
(i have already configured arm-linux-gcc path)

ubuntu@ubuntu:/home/practise/linux-$ sudo make zImage
make: arm-linux-gcc: Command not found
scripts/kconfig/conf -s arch/arm/Kconfig
make: arm-linux-gcc: Command not found
  CHK     include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
  CHK     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-arm
  CC      kernel/bounds.s
/bin/sh: arm-linux-gcc: not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2

thanks in advance
raja sekhar

1. don't use sudo - you don't need root-permissions to compile stuff
2. does the following command work?
arm-linux-gcc --version

If not:
 - check if your cross-compiler's name is really "arm-linux-*"
 - export the path you have your cross-compiler installed to $PATH

Eng Halim
Raja sekhar 
check the cross compiler PATH

Raja Sekhar

Yeah, i have checked cross compiler PATH, it is working fine for the
command : "arm-linux-gcc -v".

thanks in advance
raja sekhar

kaushal billore
mkimage is a dependent or independent tool to create the uImage out of

I have copied the mkimage tool to linux2.6.24/ dir from some unknown source
linux2.6.24#make ARCH=arm CROSS_COMPILE=arm-linux- uImage

is not making the same uImage which I got from the vendor.

i have made kernel image and now i have my zimage inside boot folder.Now
what should i do to build it to mini2440.

You need to transfer the zImage to the mini2440 not build it.

Here is one tutorial:

Have you not got any of the standard mini2440 documentation, ie User manual

mini2440vietnam is a good site for tutorials