[U-Boot-Users] Using tools/mkimage

Wolfgang Denk wd at denx.de
Tue Aug 5 09:08:22 CEST 2003

In message <20030805020001.GA15284 at buici.com> you wrote:
> I'm having trouble understanding how an image should be created.  

See the README. See the U-Boot and Linux Guide
at http://www.denx.de/twiki/bin/view/DULG/WebHome

> It was my intention to use the zImage file already compressed with a
> loader.  RAM starts at 0xc0000000, the kernel wants to load, after

It makes no sense to use a zImage file. It was one of the  intentions
of  U-Bot  (well,  it  was PPCBoot then) to get rid of this bootstrap

> decompression, to 0xc00c8000.  Normally, compressed kernel images are
> loaded at 0xc0008000.
>   tools/mkimage -A arm -C none -a 0xc0008000 -d zImage image

I don't see any use of the "-e" option in this command. And zImage is
not what you want. If you want to use an  uncompressed  kernel  image
this should be something like

	mkimage -A arm -O linux -T kernel -C none -a 0x0C008000 \
	-e 0x0C008000 -n 'ARM Linux' \
	-d arch/arm/boot/compressed/piggy uImage

> The trouble is that it starts executing at 0xc0008000 which is the
> image header.

Why is there trouble? It is OK.

> Based on reading the README, I'm suspicious that I've misconstrued the
> load addresses and that the loader doesn't support uncompressed
> images.
> Any tips?

It works fine for me like this:

-> mkimage -A arm -O linux -T kernel -C none -a 0x0C008000\
>  -e 0x0C008000 -n 'ARM Linux-2.4.18' \
> -d arch/arm/boot/compressed/piggy  /tftpboot/TRAB/uImage-uncompressed
Image Name:   ARM Linux-2.4.18
Created:      Tue Aug  5 09:04:27 2003
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    1930071 Bytes = 1884.83 kB = 1.84 MB
Load Address: 0x0c008000
Entry Point:  0x0c008000

And on the target:

TRAB # tftp c400000 /tftpboot/TRAB/uImage-uncompressed
TRAB # run nfs_args add_net add_misc;bootm
## Booting image at 0c400000 ...
   Image Name:   ARM Linux-2.4.18
   Created:      2003-08-05   7:04:27 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1930071 Bytes =  1.8 MB
   Load Address: 0c008000
   Entry Point:  0c008000
   Verifying Checksum ... OK

Starting kernel ...

Linux version 2.4.18-rmk7 (wd at atlas.denx.de) (gcc version 2.95.4 20010319 (prerelease/franzo/20011204)) #2 Tue Aug 5 09:00:03 MEST 2003
CPU: ARM/CIRRUS Arm920Tsid(wb) revision 0
Machine: S3C2400
On node 0 totalpages: 4096
zone(0): 4096 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/nfs rw nfsroot= ethaddr=00:D0:93:00:88:FB ip= console=ttyS0 panic=1

Best regards,

Wolfgang Denk

Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
I can't say I've ever been lost, but I was bewildered once for  three
days.                                     - Daniel Boone (Attributed)

More information about the U-Boot mailing list