[U-Boot-Users] Re: mkimage multi file use?

Tom Guilliams tguilliams at san.rr.com
Mon Aug 18 20:24:44 CEST 2003


Wolfgang Denk wrote:

>Sorry,  I  have  no  idea.  If  really  needed,  I  can  arrange   to
>(temporarily) put a copy of the U-Boot archive on our FTP server (the
>bzip2ed tarball for U-Boot-Users is 22 MB, and 40 MB for PPCBoot).
>
OK, well I may take you up on that but I'll get back to you.  I hate 
having to ask questions I know have been answered already.

>So try:
>
>	bash$ mkimage -T multi -C gzip -a 0 -e 0 -n 'test multifile' \
>	-d /path/to/kernel_image:/path/to/ramdisk_image uMulti
>
Hmmm... include/image.h talks about having byte counts in there as 
well.  Maybe I'm just confused.  I'll recheck it.

>See the README (section "More About U-Boot Image Types") for the file
>format. This explains that with a mutlifile image with a kernel and a
>ramdisk you will  have  to  skip  a  total  of  76  bytes  of  header
>information (64 for U-Boot header + 4 for kernel size + 4 for ramdisk
>size + 4 for terminating null).
>
Thank you.  Very helpful.  Can't believe I missed the README reference!  
Ugh!

>
>So I recommend a three step approach:
>
>	bash$ mkimage -l uMulti
>	Image Name:   Linux-2.4.4-2003-04-05 Multiboot
>	Created:      Sun Apr  6 12:44:18 2003
>	Image Type:   PowerPC Linux Multi-File Image (gzip compressed)
>	Data Size:    2610664 Bytes = 2549.48 kB = 2.49 MB
>	Load Address: 0x00000000
>	Entry Point:  0x00000000
>	Contents:
>	   Image 0:   715859 Bytes =  699 kB = 0 MB
>	   Image 1:  1894792 Bytes = 1850 kB = 1 MB
>
>	bash$ dd if=uMulti bs=76 skip=1 of=foo
>	34350+1 records in
>	34350+1 records out
>	bash$ dd if=foo of=kernel.gz bs=715859 count=1
>	1+0 records in
>	1+0 records out
>	bash$ gzip -vt kernel.gz 
>	kernel.gz:       OK
>
>The "bs=715859" uses the kernel data size as printed by the  "mkimage
>-l" command.
>  
>
Very much appreciated.  Thanks again!

Tom





More information about the U-Boot mailing list