Building BalenaOS for custom RK3588 board — U-Boot SPL issues and boot failure

Hi Balena Community,

I’m attempting to bring up BalenaOS on a custom Rockchip RK3588-based board. I successfully built the image:

balena-image-flasher-rk3588-rock.balenaos-img

However, when I flash this image to eMMC and try to boot, I’m hitting an issue during the U-Boot SPL stage. The board repeatedly shows the following logs:

U-Boot SPL board init
U-Boot SPL 2017.09-ge4e124926e-230922 ...
unknown raw ID 0 0 0
unrecognized JEDEC id bytes: 00, 00, 00
Trying to boot from MMC2
MMC: no card present
mmc_init: -123
spl: mmc init failed with error: -123
Trying to boot from MMC1
No misc partition
sys malloc pool space exhausted
alloc_read_gpt_entries: ERROR: Can't allocate lX bytes for GPT Entries
GPT: Failed to allocate memory for PTE
...

This repeats endlessly. From what I understand:

  • U-Boot SPL is running but can’t detect the MMC properly.
  • GPT parsing fails likely due to allocation errors (sys malloc pool space exhausted).
  • I’m using the Rockchip DDR/ATF binaries and U-Boot from the SDK.
  • This same DDR+U-Boot combo works fine when booting a standard Linux Yocto(Kirkstone) build.

The GPT of the flasher image looks like this (via gdisk):

Number  Start (sector)    End (sector)  Size       Code  Name
   1              64            8063   3.9 MiB     8300  loader1
   2           16384           25599   4.5 MiB     8300  loader2
   3           81920          344063   128.0 MiB   EF00  flash-boot
   4          344064         2949119   1.2 GiB     8300  flash-rootA
   5         2949120         2957311   4.0 MiB     8300  flash-rootB
   6         2957312         2965503   4.0 MiB     8300  flash-state
   7         2965504         2996223   15.0 MiB    8300  flash-data

This same board boots fine with a minimal Yocto image built using Rockchip’s BSP (same U-Boot and DDR binaries).

My questions:

  1. Is there anything specific BalenaOS expects in the bootloader or partition layout that I might be missing?
  2. Could the issue be due to how the balena-image-flasher is packaging or offsetting the boot files?
  3. Are there known memory pool limitations in U-Boot SPL that need to be increased for Balena’s default image size or structure?
  4. Has anyone successfully built and booted BalenaOS on RK3588 and can share working config fragments or hints?

Any guidance or direction would be really appreciated.

Thanks!