mkimage file size extraction?
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.
Signature · 1 line
Tom G.
Quoted 2 lines · In message <[email protected]> you wrote:
Is there a way I can extract _just_ the data size from the U-Boot wrapper header info?
Run "mkimage -l".
And see my other message.
Best regards,
Wolfgang Denk
Signature · 5 lines
See us @ Embedded World, Nuremberg, Feb 17 - 19, Hall 12.0 Booth 440 Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de A person who is more than casually interested in computers should be well schooled in machine language, since it is a fundamental part of a computer. -- Donald Knuth