From: Daniel Golle <daniel@makrotopia.org>
To: Richard Weinberger <richard@nod.at>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>,
Vignesh Raghavendra <vigneshr@ti.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-mtd <linux-mtd@lists.infradead.org>,
devicetree <devicetree@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
david oberhollenzer <david.oberhollenzer@sigma-star.at>
Subject: Re: [PATCH v7 7/7] mtd: ubi: provide NVMEM layer over UBI volumes
Date: Fri, 22 Mar 2024 15:56:49 +0000 [thread overview]
Message-ID: <Zf2qQSRWYDzKd4--@makrotopia.org> (raw)
In-Reply-To: <1196553263.78350.1710887478387.JavaMail.zimbra@nod.at>
On Tue, Mar 19, 2024 at 11:31:18PM +0100, Richard Weinberger wrote:
> ----- Ursprüngliche Mail -----
> > Von: "Daniel Golle" <daniel@makrotopia.org>
> >> BTW: Is there a nice way to test this with nandsim in qemu?
> >> I'd love being able to test all ubi attach code paths on my test setup.
> >
> > From what I can tell 'nandsim' doesn't have a way to be defined in
> > Device Tree, making it unsuitable to test the attachment of UBI in
> > this way.
> >
> > However, QEMU does support emulating TI OMAP's OneNAND controller, eg.
> > as part of the Nokia N810 hardware supported by qemu-system-arm, see
> >
> > https://www.qemu.org/docs/master/system/arm/nseries.html
> >
> > So we could use that and modify the device tree in Linux to have a MTD
> > partition for UBI and 'compatible = "linux,ubi";' set therein:
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/ti/omap/omap2420-n8x0-common.dtsi#n84
> >
> > If you like I can prepare such a test setup.
>
> This would be great!
>
> > Is there a repository for MTD/UBI tests to be run on QEMU which I should
> > contribute this to?
>
> UBI tests reside in the mtd-utils repository.
> http://git.infradead.org/?p=mtd-utils.git;a=tree;f=tests/ubi-tests;h=20fd6a043eeb96a81736dd07885f74e4e0bb0cc0;hb=HEAD
>
> Maybe you can provide a small shell script which configures qemu?
> It doesn't have to be fancy, just something David or I can use as staring point.
I'm working on it but it turns out to be a bit more difficult than I
thought it would be, because
* the only devices with NAND flash emulated in QEMU or Nokia N800 and
N810 as well as some even more ancient Intel PXA270 based PDA like
the Sharp 'spitz'.
* QEMU support for the N800 and N810 has apparently been bitrotting and
is broken at least since 2019, nobody seems to care much.
* The spitz predates device tree and hence is unsuitable for testing
attachment of UBI via DT. But it at least boots because Guenter Roeck
makes sure it does[1].
I was about to create a spitz-like imaginary board with DT, but also that
doesn't seem to be completely trivial.
So: hold my beer, I'll be back shortly ;)
If anyone has better ideas on how to utilize support for raw NAND or the
OneNAND controller in QEMU in a device-tree environment which actually
works, that'd be great. Obviously I don't care about other peripherals
like Bluetooth and all the complicated stuff of the N80x...
[1]: https://github.com/groeck/linux-build-test/blob/master/rootfs/arm/run-qemu-arm.sh#L64
next prev parent reply other threads:[~2024-03-22 15:57 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-19 2:31 [PATCH v7 0/7] mtd: ubi: allow UBI volumes to provide NVMEM Daniel Golle
2023-12-19 2:32 ` [PATCH v7 1/7] dt-bindings: mtd: add basic bindings for UBI Daniel Golle
2023-12-19 2:32 ` [PATCH v7 2/7] dt-bindings: mtd: ubi-volume: allow UBI volumes to provide NVMEM Daniel Golle
2023-12-19 2:32 ` [PATCH v7 3/7] mtd: ubi: block: use notifier to create ubiblock from parameter Daniel Golle
2023-12-19 2:33 ` [PATCH v7 4/7] mtd: ubi: attach from device tree Daniel Golle
2023-12-19 2:33 ` [PATCH v7 5/7] mtd: ubi: introduce pre-removal notification for UBI volumes Daniel Golle
2023-12-19 2:33 ` [PATCH v7 6/7] mtd: ubi: populate ubi volume fwnode Daniel Golle
2023-12-19 2:33 ` [PATCH v7 7/7] mtd: ubi: provide NVMEM layer over UBI volumes Daniel Golle
2024-02-19 11:01 ` Miquel Raynal
2024-02-25 22:12 ` Richard Weinberger
2024-02-26 0:05 ` Daniel Golle
2024-03-10 21:17 ` Richard Weinberger
2024-03-11 2:37 ` Daniel Golle
2024-03-19 22:31 ` Richard Weinberger
2024-03-22 15:56 ` Daniel Golle [this message]
2024-03-22 16:05 ` Richard Weinberger
2024-02-12 0:48 ` [PATCH v7 0/7] mtd: ubi: allow UBI volumes to provide NVMEM Daniel Golle
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=Zf2qQSRWYDzKd4--@makrotopia.org \
--to=daniel@makrotopia.org \
--cc=conor+dt@kernel.org \
--cc=david.oberhollenzer@sigma-star.at \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=robh+dt@kernel.org \
--cc=vigneshr@ti.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;
as well as URLs for NNTP newsgroup(s).