Re: [PATCH v7 7/7] mtd: ubi: provide NVMEM layer over UBI volumes
From: Richard Weinberger
Date: Tue Mar 19 2024 - 18:31:31 EST
----- Ursprüngliche Mail -----
> Von: "Daniel Golle" <daniel@xxxxxxxxxxxxxx>
>> 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.
Thanks,
//richard