[U-Boot] [PATCH 1/2] gunzip: add gzwrite routine for extracting compresed images to block device

Eric Nelson eric.nelson at boundarydevices.com
Mon Feb 16 18:33:35 CET 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Tom and Marek,

On 02/16/2015 10:03 AM, Tom Rini wrote:
> On Mon, Feb 16, 2015 at 05:27:59PM +0100, Marek Vasut wrote:
>> On Monday, February 16, 2015 at 12:16:06 AM, Eric Nelson wrote:
>>> Initial filesystem images are generally highly compressible.
>>> 
>>> Add a routine gzwrite that allows gzip-compressed images to be 
>>> written to block devices.
>>> 
>>> Signed-off-by: Eric Nelson <eric.nelson at boundarydevices.com>
>> 
>> Hi!
>> 
>> Stupid question -- can't you compress the thing in DRAM and then
>> use fatwrite or ext4write to write it to FS? Or are you really
>> after writing the data to a raw block device (in which case, you
>> can use similar commands for raw block devices) ?
> 
> I _think_ (and I really hope so otherwise yes, this series needs
> more expanation) that was this adds is the ability to {de,}compress
> on the

(or explanation ;))

Sometimes words fail. I thought that was clear from the commit
message but apparently not.

> fly rather than need to duplicate in DDR which could be 
> hard-to-impossible depending on the size of the data in question.
> 

That's exactly right.

The purpose of this is to aid in loading images onto storage devices
like eMMC where the storage size usually exceeds the size of RAM,
but the compressed image size doesn't.

Even if the compressed image size does exceed RAM, the gzwrite
routine and command give you the ability to do things piecewise,
and save lots of read transfer time.

To give a quick concrete example, we were looking at programming a
relatively small (100's) batch of boards that use a very light
O/S, but have 4GiB of eMMC.

Using ums takes over 25 minutes per board, but loading board.img.gz
and using gzwrite takes 5-6, which is pretty close to optimal given
the speed of the eMMC chip.

My hope is that this is useful as is, and also that the gzwrite
routine can be worked into the fastboot protocol.

Transferring gigabytes of data is slow over USB 2.0 and storage
sizes keep getting bigger.

Regards,


Eric
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJU4invAAoJEFUqXmm9AiVrdAIH/0oP9xvgOOcSM3cI1i6TabDX
YDoQRrDjCwmJ7gSBJ6PDpaA8rR/bstdaaEHnbkldNr+r+1KK35zQ20sKT2LfaKtK
qoYbFDsflKuBng91m4qdIhrYRRNv6GgP/PtBFOSF9LOdHYTK18E11UD7cmXWKQga
j0oEoMXLg67Ye1FHKqmyPqmpcIq66k6slIVla4p+BJnkBfzb0Cw5GnuqVk1l212a
vrZIP/xBhCoxRcumzrI8Hh3WpND6CVfepe0EF6s9LNBbhYfFVZYH3lwMoZNM9v/S
EMi5bPqcQphmrM7aJ4/M3QXBr52Ffz5LWM85OwENqH2P9SH8L0nNhagNW/tSIQE=
=Tu5S
-----END PGP SIGNATURE-----


More information about the U-Boot mailing list