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

So, in looking into my question below a little further in the way that the U-Boot command "bootm" does it, I understand how I can retrieve the mkimage header (image_header_t) to get the file size a multi-boot image is compromised of.
From Linux, I can retrieve the header from the Flash image and use the image size info in it to determine everything I need - vmlinux.gz size, ramdisk.image.gz size and total size i-
total_size = vmlinux.gz size + ramdisk.image.gz size + sizeof(image_header_t)
----- Forwarded message from tguilliams@synergy.synergymicro.com -----
Sender: u-boot-users-admin@lists.sourceforge.net Message-ID: 20040217234810.GA3573@raptor.synergymicro.com User-Agent: Mutt/1.5.6i Date: Tue, 17 Feb 2004 15:48:10 -0800 From: tguilliams@synergy.synergymicro.com To: u-boot-users@lists.sourceforge.net Subject: [U-Boot-Users] 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.

In message 20040218175606.GB27963@raptor.synergymicro.com you wrote:
So, in looking into my question below a little further in the way that the U-Boot command "bootm" does it, I understand how I can retrieve the mkimage header (image_header_t) to get the file size a multi-boot image is compromised of.
[Ummm.. can you please hit "RETURN" every 70 characters or so? Your linelength is really a PITA.]
The same whaty is done by "bootm" internally is also done by "iminfo" and printed to the screen. You just have to read the information.
Read it.
Best regards,
Wolfgang Denk
participants (2)
-
tguilliams@synergymicro.com
-
Wolfgang Denk