public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* ubiupdatevol from pipe/compressed file
@ 2008-05-19  8:47 Hamish Moffatt
  2008-05-19  8:54 ` Artem Bityutskiy
  0 siblings, 1 reply; 6+ messages in thread
From: Hamish Moffatt @ 2008-05-19  8:47 UTC (permalink / raw)
  To: dedekind, linux-mtd

Hi,

We discussed this briefly a few months back but I want to investigate a
bit further.

I would like to be able to update a ubi volume from a compressed file.
My system has limited RAM so I can't always keep the whole file
uncompressed in RAM, and I'd prefer not to uncompress it to temporary
space on flash, just to copy it somewhere else.

I'm doing this on a block device with "zcat img.gz | dd of=..." but
ubiupdatevol doesn't accept a pipe.

Reading the source this looks quite difficult to fix - it really must
know how many bytes are to be programmed in advance because it
communicates that to the kernel.

One solution I see is to add decompression support directly into
ubiupdatevol. eg with zlib it can gzseek() to the end of the file to get
the length, then rewind. I modified flashcp once to do this. However I
prefer to use better compression (lzma or bzip2) and we don't want to
add all of these to mtd-utils I think.

Alternatively allow the uncompressed file size to be specified as a
ubiupdatevol parameter. In my application I can store the uncompressed
file size and provide it to ubiupdatevol ok.

Artem, do you have any other ideas?

Thanks
Hamish
-- 
Hamish Moffatt VK3SB <hamish@debian.org> <hamish@cloud.net.au>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-06-27 14:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-19  8:47 ubiupdatevol from pipe/compressed file Hamish Moffatt
2008-05-19  8:54 ` Artem Bityutskiy
2008-05-20  8:39   ` Hamish Moffatt
2008-05-20 11:19     ` Artem Bityutskiy
2008-05-20 11:53     ` Artem Bityutskiy
2008-06-27 14:36     ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox