All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: "Tom Rini" <trini@konsulko.com>,
	"Heinrich Schuchardt" <xypron.glpk@gmx.de>,
	"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
	"Marek Vasut" <marex@denx.de>,
	"Sean Anderson" <seanga2@gmail.com>,
	"Marek Behún" <marek.behun@nic.cz>
Subject: RFC: Devices for files and partitions
Date: Tue, 6 Jul 2021 17:05:19 -0600	[thread overview]
Message-ID: <CAPnjgZ3txxwmNZx7dK+LxHJCNCH0i8EkpiOGq_RcDMa=Lc+3Uw@mail.gmail.com> (raw)

Hi,

At present U-Boot avoids the concept of 'opening' a file. Being in a
bootloader environment, it is normally better to take the action
immediately and avoid any caching, for example, since there is no
background task to clean up afterwards.

Having said that, the concept of a file is quite useful, for example
to write the output of a command to a file, or to open a file and read
it a line at a time.

Another case has come to light in that EFI wants to access files using
a file handle. This currently uses parallel data structures and does
not map very well in U-Boot.

Finally, partitions has a similar issue, where defining them as a
device can have benefits, e.g. to specify the device to use directly,
rather than with the 'type dev:part' approach, perhaps providing them
in the devicetree, etc.

For the above reasons, I propose that we implement, as an option,
support for files and partitions within driver model.

Regards,
Simon

             reply	other threads:[~2021-07-06 23:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-06 23:05 Simon Glass [this message]
2021-07-09  2:44 ` RFC: Devices for files and partitions AKASHI Takahiro
2021-07-09  5:27   ` Heinrich Schuchardt
2021-07-11  0:01     ` Simon Glass

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='CAPnjgZ3txxwmNZx7dK+LxHJCNCH0i8EkpiOGq_RcDMa=Lc+3Uw@mail.gmail.com' \
    --to=sjg@chromium.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=marek.behun@nic.cz \
    --cc=marex@denx.de \
    --cc=seanga2@gmail.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    /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.