[PATCH v3 5/7] rockchip: cmd: add rkmtd command

Simon Glass sjg at chromium.org
Fri Oct 13 17:14:44 CEST 2023


On Thu, 12 Oct 2023 at 13:52, Johan Jonker <jbx6244 at gmail.com> wrote:
>
> The command rkmtd creates a virtual block device to transfer
> Rockchip boot block data to and from NAND with block orientated
> tools like "ums" and "rockusb".
>
> It uses the Rockchip MTD driver to scan for boot blocks and copies
> data from the first block in a GPT formated virtual disk.
> Data must be written in U-boot "idbloader.img" format and start at
> partition "loader1" offset 64. The data header is parsed
> for length and offset. When the last sector is received
> it erases up to 5 erase blocks on NAND and writes bootblocks
> in a pattern depending on the NAND ID. Data is then verified.
> When a block turns out bad the block header is discarded.
>
> Signed-off-by: Johan Jonker <jbx6244 at gmail.com>
> ---
>
> Changed V3:
>   Split driver from command
>   Split header
>   Restyle
> ---
>  cmd/Kconfig  |   8 ++
>  cmd/Makefile |   1 +
>  cmd/rkmtd.c  | 204 +++++++++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 213 insertions(+)
>  create mode 100644 cmd/rkmtd.c

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list