From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Michael Nazzareno Trimarchi <michael@amarulasolutions.com>
Cc: Xuanhao Shi <X15000177@gmail.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
buildroot@buildroot.org, Romain Naour <romain.naour@smile.fr>,
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: Tue, 21 May 2024 07:25:11 +0200 [thread overview]
Message-ID: <ZkwwN1NKZ2o1xMba@landeda> (raw)
In-Reply-To: <CAOf5uwkDmcxhWJUFhxjw_GJTiTEO5oEexb0Xjh6aNJx+K_9dXA@mail.gmail.com>
Michael, All,
On 2024-05-10 22:17 +0200, Michael Nazzareno Trimarchi spake thusly:
> On Fri, May 10, 2024 at 9:54 PM Thomas Petazzoni
> <thomas.petazzoni@bootlin.com> wrote:
> > On Sun, 21 Apr 2024 11:53:52 +0200
> > Dario Binacchi <dario.binacchi@amarulasolutions.com> wrote:
> > > The patch adds an option to create, in addition to the usual image, an
> > > image of type bmap that drastically reduces the amount of data that
> > > needs to be written to an SD card, resulting in time savings.
[--SNIP--]
> > Another question, perhaps for Dario, or other people familiar with
> > genimage: if the rootfs.ext4 generated by Buildroot is sparse, is
> > genimage able to preserve the "holes" when generating the sdcard.img
> > that includes the rootfs.ext4 ?
> Arnout, Yann, Peter, Romain, what do you think? Do you see other
> approaches to easily allow generating bmap-compatible images?
I wonder if we should really do that, in fact.
I believe it is in-scope that we do generate disk images, which we do
with genimage. However, transferring, distributing, writing, etc.. the
generated images I think is out of scope. We may provide tools to help
with that, though, and we do by providing {host-,}bmap-tools.
> If you consider sparse the way that fastboot handle it, so I have
> quick tested and seems
> genimage can create sdcard.img and sdcard-sparse.img using a specific genconfig
I think the question by Thomas was whether, given an input sparse file,
genimage will keep the generated image sparse in the same places the
input file was (only shifted by the offset that input file was copied
at in the image).
For example, mkfs.ext can create sparse files, and such a file can be
fed to genimage, to create a disk image. We want the generated disk
image to be sparsed in the same positions the ext2 image was, e.g. with
'X' as no-hole blocks, '.' as holes, and 'B' as the bootloader:
rootfs.ext2 XXXXX........XXX...XXXX....XXXXX........X....
disk.img BBBBXXXXX........XXX...XXXX....XXXXX........X....
Note that some X block can be all-zeroes, because they are the bitmap of
the filesystem; those must not be skipped when writing to the final
storage, otherwise the filesystem would be corrupted. If genimage
decides that all-zeroes block are sparsed, then this is broken.
I think that was the question raised by Thomas, and I don't understand
how your reply answers that, so maybe I missed something...
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2024-05-21 5:25 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 [this message]
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
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=ZkwwN1NKZ2o1xMba@landeda \
--to=yann.morin.1998@free.fr \
--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=romain.naour@smile.fr \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox