Hej Jonas and Alexey,

On Monday, July 13th, 2026 at 12:03 PM, Alexey Charkov <[email protected]> 
wrote:

> This aims to upstream Jonas Karlman's long-standing patch series fixing
> the boot from SDMMC on RK3576, which requires a hotfix to the boot ROM's
> global state area before any SDMMC reads are initiated to avoid clobbing
> the ROM's state and breaking the boot process.
> 

> The preparatory patches for the image tools are submitted verbatim from
> Jonas' version, while the "boost" code doing the actual hotfix is
> converted from using a pre-built tiny binary to a from-source build using
> the existing U-Boot build system.
> 

> From-source build also alleviates the problem with parallel out-of-tree
> builds, which could skip the pre-built binary but which always pick up the
> from-source build.
> 

> Tested on a number of RK3576 boards, including the Rockchip RK3576 EVB1,
> ArmSoM Sige5, FriendlyElec NanoPi M5, Luckfox Omni3576, Radxa Rock 4D and
> Flipper One, all of which fail to boot from SDMMC without this series but
> boot fine with it applied.

Thanks for the original patch and reviving it with this v2 !

Comes really at the right time as I'm trying to add Yocto support for the Radxa 
4D board.

Successfully tested this serie on my Radxa 4D board, even if already reported 
as tested.

Tested it on v2026.07 where it applies directly.
Also tested it on v2026.04, in this case 2 additional patches from Jonas 
already in v2026.07 must be backported, then it also applies without problems 
(little fuzz).

In both situations, once flashed to SPI it boots fine from SD !

Now no need to use the 'WiP' commit on Jonas' branch anymore with the pre-built 
boost.bin as it is now built with the added commit in new serie.

Still SPL is not able to load U-boot proper from SPI (probe failing) and falls 
back to SD. Saw a few WIP commits on Jonas' kwiboo branches that look like 
handling that, couldn't get that to work yet. Anyway that is out of scope of 
this patch. So for the scope of this patch it does what it's expected to do.

Will happily test a potential future v3 if that might be of any help.

Thanks and best regards,

Martin

> 

> I've also done some JTAG debugging of the boot process, and the single-
> word write which the boost binary performs to the SRAM at 0x3ff803b0
> appears to be relocating the base of the SDMMC IDMAC DMA descriptor buffer
> to the top of SRAM, which prevents large multi-page SDMMC reads from
> overrunning adjacent ROM state and thus breaking the boot process. A
> comment has been added to the boost code to reflect this.
> 

> Signed-off-by: Alexey Charkov <[email protected]>
> ---
> Jonas Karlman (7):
>       rockchip: mkimage: Split size_and_off and size_and_nimage
>       rockchip: mkimage: Print image information for all embedded images
>       rockchip: mkimage: Print boot0 and boot1 parameters
>       rockchip: mkimage: Add option to change image offset alignment
>       rockchip: mkimage: Add support for up to 4 input files
>       rockchip: mkimage: Add option for image load address and flag
>       rockchip: mkimage: Add rk3576 align and sd-card workaround
> 

>  arch/arm/mach-rockchip/rk3576/Makefile       |  10 +
>  arch/arm/mach-rockchip/rk3576/rk3576-boost.c |  31 +++
>  tools/rkcommon.c                             | 290 
> +++++++++++++++++----------
>  tools/rkcommon.h                             |   2 -
>  4 files changed, 228 insertions(+), 105 deletions(-)
> ---
> base-commit: 6741b0dfb41dc82a284ab1cff4c58af6ef2f3f9c
> change-id: 20260713-rk3576-boost-58a5f47e74e3
> 

> Best regards,
> --
> Alexey Charkov <[email protected]>
> 

> 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to