No subject
total_size = vmlinux.gz size + ramdisk.image.gz size + sizeof(image_header_t)
----- Forwarded message from tguilliams at synergy.synergymicro.com -----
Sender: u-boot-users-admin at lists.sourceforge.net
Message-ID: <[email protected]>
User-Agent: Mutt/1.5.6i
Date: Tue, 17 Feb 2004 15:48:10 -0800
From: [email protected]
To: u-boot-users at 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.
Signature · 19 lines
Tom G. ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ U-Boot-Users mailing list U-Boot-Users at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users ----- End forwarded message ----- -- Tom Guilliams tguilliams at synergymicro.com 858.452.0020 x471