[U-Boot-Users] mkimage file size extraction?

tguilliams at synergymicro.com tguilliams at synergymicro.com
Wed Feb 18 00:48:10 CET 2004


I'm trying to retrieve a U-Boot multi-image from a Linux MTD flash partition.  I'm not sure, without knowing the file size of the image there, how to make sure I retrieve the image alone and not the entire partition.

My U-Boot question is -

Is there a way I can extract _just_ the data size from the U-Boot wrapper header info?

i.e., 

make[2]: Leaving directory `/home/tomg/eldk/eldk-sbs/0.2/work/linux/linuxsbs-2.4.20/arch/ppc/boot/images'
./utils/mkimage.wrapper -A ppc -O linux -T multi -C gzip -a 00000000 -e 00000000 \
	-n 'Linux-2.4.20 w/ ramdisk' \
	-d images/vmlinux.gz:images/ramdisk.image.gz images/vmlinux.initrd.UBoot
	Image Name:   Linux-2.4.20 w/ ramdisk
	Created:      Tue Feb 17 15:33:45 2004
	Image Type:   PowerPC Linux Multi-File Image (gzip compressed)
	Data Size:    4524955 Bytes = 4418.90 kB = 4.32 MB
	Load Address: 0x00000000
	Entry Point:  0x00000000
	Contents:
	Image 0:   823267 Bytes =  803 kB = 0 MB
	Image 1:  3701675 Bytes = 3614 kB = 3 MB

I'm thinking of some operations using "dd" to seek and copy the data size to a file or something.

If this is not possible, I will quickly try and write a Linux NVRAM driver for U-Boot environmentals so that I can set a variable to retain the file image size.

Any ideas are greatly appreciated.


-- 
Tom G.




More information about the U-Boot mailing list