[ubiblock PATCH] Read-only block driver on top of UBI volumes
Simon Glass
sjg at chromium.org
Sat Dec 28 03:26:45 CET 2019
Hi Juha,
On Wed, 20 Nov 2019 at 17:40, Juha Sarlin <jsub at sarlin.mobi> wrote:
>
> Add "ubi block" command to create a block device on top of a UBI volume.
> This block device can be used with some U-Boot commands, eg: fstype, ls
> and load.
>
> Example use:
> => ubi part fs
> => ubi block root
> root dev=0
> => fstype ubi 0
> squashfs
>
> ubiblock_read() is based on drivers/mtd/ubi/block.c from Linux 4.19.75.
>
> Signed-off-by: Juha Sarlin <jsub at sarlin.mobi>
> ---
>
> cmd/ubi.c | 36 ++++++++++
> disk/part.c | 22 ------
> drivers/block/blk-uclass.c | 4 +-
> drivers/mtd/ubi/Kconfig | 15 ++++
> drivers/mtd/ubi/Makefile | 2 +
> drivers/mtd/ubi/block.c | 134 +++++++++++++++++++++++++++++++++++
> drivers/mtd/ubi/build.c | 1 +
> drivers/mtd/ubi/ubi-uclass.c | 74 +++++++++++++++++++
> drivers/mtd/ubi/ubi.h | 19 +++--
> include/blk.h | 1 +
> include/dm/uclass-id.h | 1 +
> include/linux/mtd/ubi.h | 2 +-
> include/ubi_uboot.h | 2 -
> 13 files changed, 276 insertions(+), 37 deletions(-)
> create mode 100644 drivers/mtd/ubi/block.c
> create mode 100644 drivers/mtd/ubi/ubi-uclass.c
Thank you for the patch.
Please can you add comments to all the functions (see standard format).
Also I think you should split this patch up a bit, so that your
changes to cmd/, disk/ and {drivers,include}/block* are in in separate
patches.
Regards,
Simon
More information about the U-Boot
mailing list