
Hello Alexey,
On 06.03.24 14:49, Alexey Romanov wrote:
UBI block is an virtual device, that runs on top of the MTD layer. The blocks are UBI volumes. Intended to be used in combination with other MTD drivers.
Despite the fact that it, like mtdblock abstraction, it used with UCLASS_MTD, they can be used together on the system without conflicting. For example, using bcb command:
# Trying to load bcb via mtdblock: $ bcb load mtd 0 mtd_partition_name
# Trying to load bcb via UBI block: $ bcb load ubi 1 ubi_volume_name
User always must attach UBI layer (for example, using ubi_part()) before using UBI block device.
Signed-off-by: Alexey Romanov avromanov@salutedevices.com
drivers/block/blk-uclass.c | 1 + drivers/mtd/ubi/Makefile | 1 + drivers/mtd/ubi/block.c | 130 +++++++++++++++++++++++++++++++++++++ include/ubi_uboot.h | 4 ++ 4 files changed, 136 insertions(+) create mode 100644 drivers/mtd/ubi/block.c
Reviewed-by: Heiko Schocher hs@denx.de Acked-by: Heiko Schocher hs@denx.de
bye, Heiko