From: Christoph Hellwig <hch@infradead.org>
To: Daniel Golle <daniel@makrotopia.org>
Cc: Christoph Hellwig <hch@infradead.org>,
Richard Weinberger <richard@nod.at>,
Matthew Wilcox <willy@infradead.org>,
Jens Axboe <axboe@kernel.dk>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Chaitanya Kulkarni <kch@nvidia.com>,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 1/4] init: move block device helpers from init/do_mounts.c
Date: Mon, 12 Dec 2022 22:48:12 -0800 [thread overview]
Message-ID: <Y5ggLBy+XBjl/vYj@infradead.org> (raw)
In-Reply-To: <Y5cKSRmZ45OJq6Qq@makrotopia.org>
On Mon, Dec 12, 2022 at 11:02:33AM +0000, Daniel Golle wrote:
> The thing is that there isn't anything extraordinarily complex here,
> just dynamically partitioning a block device based on a well-known
> format.
Yes, but a completely non-standard format that nests inside an
partition.
> Using initramfs implies that we would need a 2nd copy of the standard C
> library and libfdt, both alone will already occupy more than just a
> single 64kB block of flash.
Why do you need libfdt? And with a simple statically linked kpartx
you won't pull in much of libc either.
> I understand that from the point of view of
> classic x86 servers or even embedded devices with eMMC this seems
> negligible. However, keep in mind that a huge number of existing
> devices and also new designs of embedded devices often boot from just a
> few megabytes of NOR flash, and there every byte counts.
So I've worked quite a bit on really small deeply embedded systems,
and for those I wouldn't even think of using strange image formats
or the rather wasteful GPT partition format.
There we wouldn't dare to use paritions or weird image formats, but
> > What is the point of the uImage.FIT?
>
> It is the format used by Das U-Boot, which is by far the most common
> bootloader found on small embedded devices running Linux.
> Is is already used by Das U-Boot to validate and load kernel,
> devicetree, initramfs, ... to RAM before launching Linux.
> I've included a link to the documentation[1] which gives insights
> regarding the motivation to create such a format.
That doesn't explain why you'd want to use it. Nor how people
came up with it.
> In fact, that's only one out of three possible uses in which parsing
> the contained sub-image boundaries can be useful:
> * On devices with NOR flash uImage.FIT is stored in an MTD partition,
> hence the uImage.FIT partition parser (or small stackable block
> driver) would then operate on top of /dev/mtdblockX.
>
> * On devices with NAND flash uImage.FIT is stored in a UBI volume,
> hence in this case /dev/ubiblockX needs to be processed.
And all the mtdblock / ubiblock is due to the lack of a native
mtd/ubi backend for squashfs? Why can't we take the block layer
out of the loop entirely?
> I hope this explains my motivation. Please ask should there by any
> doubts or if any of my explainations above are not clear.
None of this explains the silly nesting inside the GPT partition.
It is not needed for the any use cases and the root probem here.
Without that you could simply implement a parition format, with that
you get into crazy nesting behavior. Note that it would have
any benefit over just not doing this silly image.
Maybe someone just needs to go back and come up wit ha scheme that
actually works and implement that in uboot as well.
next prev parent reply other threads:[~2022-12-13 6:48 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-17 0:42 [RFC PATCH 0/4] block: uImage.FIT filesystem image mapper Daniel Golle
2022-11-17 0:42 ` [RFC PATCH 1/4] init: move block device helpers from init/do_mounts.c Daniel Golle
2022-11-17 5:55 ` Christoph Hellwig
2022-11-19 16:03 ` Daniel Golle
2022-11-22 12:37 ` Christoph Hellwig
2022-12-09 17:00 ` Daniel Golle
2022-12-12 9:03 ` Christoph Hellwig
2022-12-12 11:02 ` Daniel Golle
2022-12-13 6:48 ` Christoph Hellwig [this message]
2022-12-13 12:45 ` Daniel Golle
2022-12-14 16:43 ` Christoph Hellwig
2022-12-14 20:01 ` Daniel Golle
2022-12-15 8:09 ` Christoph Hellwig
2023-03-30 14:43 ` Daniel Golle
2022-11-17 0:43 ` [RFC PATCH 2/4] block: add new flag to add partitions read-only Daniel Golle
2022-11-17 0:44 ` [RFC PATCH 3/4] blkdev: add function to add named read-only partitions Daniel Golle
2022-11-17 5:56 ` Christoph Hellwig
2022-11-17 17:12 ` Daniel Golle
2022-11-17 0:45 ` [RFC PATCH 4/4] block: add uImage.FIT block partition driver Daniel Golle
2022-11-17 5:58 ` Christoph Hellwig
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=Y5ggLBy+XBjl/vYj@infradead.org \
--to=hch@infradead.org \
--cc=axboe@kernel.dk \
--cc=daniel@makrotopia.org \
--cc=kch@nvidia.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=richard@nod.at \
--cc=willy@infradead.org \
--cc=wsa+renesas@sang-engineering.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
all inboxes | Powered by JetHome®