Re: block devices on MTD and UBI

2025-03-26 Thread Oskar Nilsson
Hello Heiko, On Wednesday, 26 March 2025 at 06:21:35 +01:00, Heiko Schocher wrote: > Hello Oskar, > > Hmm... yep, so the theory ... but let me first look if this is used in > mainline: > > hs@threadripper:u-boot [master] $ grep -lr UBI_BLOCK configs/ > hs@threadripper:u-boot [master] $ > > S

[PATCH v2] ubi: fix bug creating partitions for non-existent volumes

2025-03-26 Thread Oskar Nilsson
...@1806000.blk:4 simple_bus  1  [ + ]  simple_bus |   |-- bus@200 Signed-off-by: Oskar Nilsson Cc: Kyungmin Park Cc: Heiko Schocher Cc: Alexey Romanov Changed in v2: - Change return from -1 to -ENOENT --- drivers/mtd/ubi/part.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH] ubi: fix bug creating partitions for non-existent volumes

2025-03-25 Thread Oskar Nilsson
...@1806000.blk:4 simple_bus  1  [ + ]  simple_bus |   |-- bus@200 Signed-off-by: Oskar Nilsson Cc: Kyungmin Park Cc: Heiko Schocher Cc: Alexey Romanov --- drivers/mtd/ubi/part.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/ubi/part.c b/drivers/mtd/ubi

block devices on MTD and UBI

2025-03-25 Thread Oskar Nilsson
128 blk_partitions => dm tree Class Index Probed Driver Name --- root 0 [ + ] root_driver root_driver thermal 0 [ ] imx_thermal |-- imx_thermal simple_bus 0 [ + ] simple_bus |-- soc mtd 0 [ + ] mxs-nand-dt | |-- nand-controller@1806000 blk 0 [ ] ubi_blk | | `-- partition 0 [ ] blk_partition | | |-- :1 partition 1 [ ] blk_partition | | |-- :2 partition 2 [ ] blk_partition | | |-- :3 partition 3 [ ] blk_partition | | |-- :4 partition 4 [ ] blk_partition | | |-- :5 ... At first I also got the error "UBIFS not mounted, use ubifsmount to mount volume first!" To fix that I added this small patch: diff --git a/disk/part.c b/disk/part.c index 8982ef3bae..f168311e9a 100644 --- a/disk/part.c +++ b/disk/part.c @@ -524,7 +524,7 @@ int blk_get_device_part_str(const char *ifname, const char *dev_part_str, } #endif -#if IS_ENABLED(CONFIG_CMD_UBIFS) && !IS_ENABLED(CONFIG_SPL_BUILD) +#if IS_ENABLED(CONFIG_CMD_UBIFS) && !IS_ENABLED(CONFIG_SPL_BUILD) && !IS_ENABLED(CONFIG_UBI_BLOCK) /* * Special-case ubi, ubi goes through a mtd, rather than through * a regular block device. Reagrds, Oskar Nilsson