From: Sam Edwards <cfsworks@gmail.com>
To: Heiko Schocher <hs@denx.de>, Simon Glass <sjg@chromium.org>
Cc: Kyungmin Park <kmpark@infradead.org>,
u-boot@lists.denx.de, Sam Edwards <CFSworks@gmail.com>
Subject: [RFC PATCH v2 0/4] mtd: ubi: Enable accessing RO filesystems in UBI vols
Date: Thu, 5 Oct 2023 17:08:27 -0600 [thread overview]
Message-ID: <20231005230831.4032070-1-CFSworks@gmail.com> (raw)
Hi list,
This is the second version of my RFC patchset to treat static UBI volumes as DM
block devices, allowing users to access read-only filesystems (SquashFS, EROFS)
contained within such volumes.
This is a rebased and updated version, as requested by Heiko.
Previously, we have agreed on a syntax, which my downstream is now starting to
use:
=> ls ubi 0:rootfs /boot
=> ls ubi 0:2 /boot
This is still not yet ready for mainline inclusion, because the actual UBI DM
access is happening in disk/part.c, which is not "clean" with the way the
DM/legacy switching is currently plumbed. I'm still looking for guidance on how
to name/implement block functions for looking up a *subvolume* block device by
type+parentidx+{name,ID}.
Changes v1->v2:
- Rebased onto next post-2023.10's release.
- Fix NULL dereference caused by passing NULL to `blk_create_device`
- Parse UBI index/volume numbers with `dectoul` instead of `hextoul`, to match
Linux's behavior of treating these numbers as decimal.
- Do not treat a valid decimal number as a volume name, even if the volume ID
doesn't exist, to match Linux's behavior of always treating decimal numbers
as volume IDs.
Cheers,
Sam
Sam Edwards (4):
mtd: ubi: register UBI attachments as DM devices
mtd: ubi: bind block device driver for static volumes
disk: part: fall-through if "ubi" requested but ubifs not mounted
HACK: enable access to `ubi 0:volname` block devices
cmd/ubi.c | 11 +++
disk/part.c | 69 +++++++++++--
drivers/mtd/ubi/Makefile | 1 +
drivers/mtd/ubi/ubi-uclass.c | 185 +++++++++++++++++++++++++++++++++++
include/dm/uclass-id.h | 1 +
include/ubi_uboot.h | 5 +
6 files changed, 264 insertions(+), 8 deletions(-)
create mode 100644 drivers/mtd/ubi/ubi-uclass.c
--
2.41.0
next reply other threads:[~2023-10-05 23:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-05 23:08 Sam Edwards [this message]
2023-10-05 23:08 ` [RFC PATCH v2 1/4] mtd: ubi: register UBI attachments as DM devices Sam Edwards
2023-10-05 23:08 ` [RFC PATCH v2 2/4] mtd: ubi: bind block device driver for static volumes Sam Edwards
2023-10-05 23:08 ` [RFC PATCH v2 3/4] disk: part: fall-through if "ubi" requested but ubifs not mounted Sam Edwards
2023-10-05 23:08 ` [RFC PATCH v2 4/4] HACK: enable access to `ubi 0:volname` block devices Sam Edwards
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=20231005230831.4032070-1-CFSworks@gmail.com \
--to=cfsworks@gmail.com \
--cc=hs@denx.de \
--cc=kmpark@infradead.org \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.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.