From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Tue, 17 Feb 2015 20:46:14 +0100 Subject: [U-Boot] [PATCH 1/2] gunzip: add gzwrite routine for extracting compresed images to block device In-Reply-To: <54E229EF.2080307@boundarydevices.com> References: <1424042167-27008-1-git-send-email-eric.nelson@boundarydevices.com> <20150216170354.GM7086@bill-the-cat> <54E229EF.2080307@boundarydevices.com> Message-ID: <201502172046.14198.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Monday, February 16, 2015 at 06:33:35 PM, Eric Nelson wrote: > 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 > >> > >> 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. Cool, thanks for explaining :) Best regards, Marek Vasut