[PATCH 0/3] Add support for RAM boot from maskrom mode
Arnaud Patard
arnaud.patard at collabora.com
Wed Mar 19 10:28:04 CET 2025
Hi,
On Thu, 2025-02-20 at 23:13 +0000, Jonas Karlman wrote:
> The BootROM in Rockchip SoCs will enter maskrom mode when boot
> firmware
> cannot be found in nand/spi/mmc storage.
>
> In maskrom mode the USB OTG port can accept one of two custom
> commands.
>
> Initially a 0x471 command to load TPL into SRAM. After TPL has been
> executed and it has returned back-to-BROM, a 0x472 command to load
> SPL
> into start of DRAM.
>
> This series add two binman images that can be used to RAM boot from
> maskrom mode:
> - u-boot-rockchip-usb471.bin that contains TPL to init DRAM.
> - u-boot-rockchip-usb472.bin that contains SPL and the normal FIT
> payload with i.e. U-Boot proper, TF-A and FDT.
>
> These images can be used with rkbin tools/boot_merger to create a
> loader
> image to be used with rkdeveloptool or rockusb tools, e.g.:
>
> Create loader image:
> $ ../rkbin/tools/boot_merger ./RK3588MINIALL.ini
>
> Boot from maskrom:
> $ rkdeveloptool db u-boot-rockchip-rk3588-loader.bin
> or
> $ rockusb download-boot u-boot-rockchip-rk3588-loader.bin
>
> Or directly with tools such as rkflashtool or rkusbboot:
>
> $ rkflashtool l < u-boot-rockchip-usb471.bin
> $ rkflashtool L < u-boot-rockchip-usb472.bin
> or
> $ rkusbboot u-boot-rockchip-usb471.bin u-boot-rockchip-usb472.bin
>
> This series depend on the "rockchip: ROCKCHIP_COMMON_STACK_ADDR
> improvements" series [1] and the "rockchip: dts: Create a template
> for
> the FIT" patch [2]. See [3] for a branch with all depends.
>
> [1] https://patchwork.ozlabs.org/cover/2050003/
> [2] https://patchwork.ozlabs.org/patch/2044607/
> [3]
> https://source.denx.de/u-boot/contributors/kwiboo/u-boot/-/commits/ramboot-v1
>
I've tested this tree tagged by "ramboot-v1" on rk3399 and rk3588 with
the generated u-boot-rockchip-usb47?.bin files and it's working fine.
This work sounds very useful imho, and possibly easier to use than DFU
in SPL. Any hope to see this merged in next release ?
If it helps:
Tested-by: Arnaud Patard <arnaud.patard at collabora.com>
More information about the U-Boot
mailing list