From: Peter Korsgaard <peter@korsgaard.com>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: michael@amarulasolutions.com, Xuanhao Shi <X15000177@gmail.com>,
Thomas Petazzoni via buildroot <buildroot@buildroot.org>,
Dario Binacchi <dario.binacchi@amarulasolutions.com>,
linux-amarula@amarulasolutions.com,
Anand Gadiyar <gadiyar@ti.com>
Subject: Re: [Buildroot] [RFC PATCH 1/2] support/scripts/genimage.sh: support creating a bmap image
Date: Fri, 30 Aug 2024 09:14:37 +0200 [thread overview]
Message-ID: <87le0e32jm.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <20240829234416.4131264b@windsurf> (Thomas Petazzoni's message of "Thu, 29 Aug 2024 23:44:16 +0200")
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:
Hi,
>> NIT: No, it is the sparseness (E.G. the holes). Compression in fact
>> breaks the holes (replaces them by zeros):
> You didn't understand my point, and Arnout explained it better on the
> chat.
> My point is that it is *very* easy to lose the sparseness. You copy the
> file around, you share it in Google Drive, or download it over HTTP or
> what not, and bang the sparseness is lost.
Sure, but that is all about distribution, where as mentioned before you
may want to compress it with gz/xz/zstd/.. and/or stick it in a sensible
archival format like tar, ..
The specifics of that is very use case specific, so IMHO not something
where we should enforce silly old .gz - Especially as bmap supports a
number of different formats (by shelling out to the extractors). From
bmaptool/TransRead.py:
This module allows opening and reading local and remote files and decompress
them on-the-fly if needed. Remote files are read using urllib (except of
"ssh://" URLs, which are handled differently). Supported file extentions are:
'bz2', 'gz', 'xz', 'lzo', 'zst' and a "tar" version of them: 'tar.bz2', 'tbz2',
'tbz', 'tb2', 'tar.gz', 'tgz', 'tar.xz', 'txz', 'tar.lzo', 'tzo', 'tar.lz4',
'tlz4', '.tar.zst', 'tzst'.
This module uses the following system programs for decompressing: pbzip2, bzip2,
gzip, pigz, xz, lzop, lz4, zstd, tar and unzip.
> Instead, with a compressed file, you get a file that has pretty much
> the same size as the sparse file, but you can move it around, transfer
> it, it won't consume its real size. And the bmap metadata file allows
> to use/flash that compressed file with the same efficiency as the
> original sparse file.
> In fact, bmap is quite useless is the file sparseness is retained:
> instead of using bmap metadata, you could just ask what are the holes
> of the file and skip them when flashing. So really the whole point of
> bmap metadata IMO is that they allow to do fast flashing (skipping
> holes) even if the sparseness of the file has been lost.
Does such a tool exist? I am not aware of one. If so, maybe we should
recommend that instead of dd for writing sdcard.img from the host?
Anyway, I find bmap a bit half-baked, E.G. rather than wasting time (and
space) compressing and decompressing all the holes that are then just
ignored it would make more sense to have a file format encoding the
holes (E.G. tar --sparse or something custom), then optionally compress
that for transmission and have something small and simple (E.G. not in
python) on the host/target to write it to a device.
But oh well, it is what it is. I don't need such a tool often enough to
care to write it ;)
I'll send a patch to drop the gzip step from genimage.sh.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2024-08-30 7:14 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-21 9:53 [Buildroot] [RFC PATCH 0/2] Add support to genimage.sh for creating a bmap image Dario Binacchi
2024-04-21 9:53 ` [Buildroot] [RFC PATCH 1/2] support/scripts/genimage.sh: support " Dario Binacchi
2024-04-23 11:33 ` Gero Schwäricke via buildroot
2024-04-23 12:55 ` Quentin Schulz via buildroot
2024-04-24 7:50 ` Gero Schwäricke via buildroot
2024-04-24 8:06 ` Gero Schwäricke via buildroot
2024-05-10 19:54 ` Thomas Petazzoni via buildroot
2024-05-10 20:17 ` Michael Nazzareno Trimarchi
2024-05-21 5:25 ` Yann E. MORIN
2024-05-21 9:28 ` Michael Nazzareno Trimarchi
2024-05-21 17:44 ` Yann E. MORIN
2024-05-22 15:19 ` Gero Schwäricke via buildroot
2024-05-31 9:47 ` Thomas Petazzoni via buildroot
2024-05-31 9:44 ` Thomas Petazzoni via buildroot
2024-05-20 8:05 ` Dario Binacchi
2024-05-20 9:23 ` Thomas Petazzoni via buildroot
2024-05-21 15:06 ` Dario Binacchi
2024-05-21 20:36 ` Yann E. MORIN
2024-05-22 15:59 ` Gero Schwäricke via buildroot
2024-07-15 14:05 ` Thomas Petazzoni via buildroot
2024-07-15 14:23 ` Arnout Vandecappelle via buildroot
2024-07-15 14:27 ` Thomas Petazzoni via buildroot
2024-07-16 6:16 ` Dario Binacchi
2024-08-27 18:55 ` Peter Korsgaard
2024-08-28 13:42 ` Thomas Petazzoni via buildroot
2024-08-28 13:58 ` Peter Korsgaard
2024-08-29 21:44 ` Thomas Petazzoni via buildroot
2024-08-30 7:14 ` Peter Korsgaard [this message]
2024-08-30 15:29 ` Thomas Petazzoni via buildroot
2024-08-30 15:32 ` Michael Nazzareno Trimarchi
2024-08-31 13:28 ` Peter Korsgaard
2024-08-31 13:20 ` Peter Korsgaard
2024-04-21 9:53 ` [Buildroot] [RFC PATCH 2/2] configs/ti_am62x_sk_defconfig: create the " Dario Binacchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87le0e32jm.fsf@dell.be.48ers.dk \
--to=peter@korsgaard.com \
--cc=X15000177@gmail.com \
--cc=buildroot@buildroot.org \
--cc=dario.binacchi@amarulasolutions.com \
--cc=gadiyar@ti.com \
--cc=linux-amarula@amarulasolutions.com \
--cc=michael@amarulasolutions.com \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.