SD card format documentation

Hi, I’m trying to build an embedded OS image for ROCK Pi 4 with Yocto/OpenEmbedded. I understand there is no official support for this, so I’m on my own.

Right now I have the image building with my custom layer on top of meta-rockchip, that is using radxa/kernel and radxa/u-boot instead of the official ROCKCHIP-Linux BSP forks. So everything seems fine, except there is no HDMI output when I boot from the SD card, and there is no network connectivity. I’m able to boot the official Ubuntu Server image just fine, so I know there is nothing wrong with my ROCK Pi. I think there is something wrong with the way I’m building the SD card image.

I am waiting to get my USB-Serial device in the mail so I can debug via the UART serial console, but in the meantime… is there any documentation I can read about the way the SD card should be formatted, and what the ROCK Pi expects to see on the SD card so it can boot?

Just putting this here for anyone who’s searching for the same thing: I found documentation about the bootable format on the Rockchip wiki:

http://opensource.rock-chips.com/wiki_Boot_option

If anyone has any additional resources about this topic, please share them.

Buildroot is the official “commercial” distro supported by Rockchp.

http://opensource.rock-chips.com/wiki_Yocto

I agree that’s what it says on their documentation, however I evaluated Buildroot and unfortunately it won’t work for my purposes - I need a package repository.

Rockchip maintains a Yocto configuration layer that gets actively updated: https://github.com/rockchip-linux/meta-rockchip

Right now I’m pretty sure that the image is getting generated correctly. However, the boot.img that Yocto gives me isn’t readable by mount.vfat or mount.ext2 (or even mount -t auto), so I think something is going wrong there.

@wbn

yocto uses different image layout, not exactly as rockchip-bsp we use to generate debian. You can check out/tmp/deploy/images and ls everything, use file to check the image format. It maybe the android boot.img format.

It turns out this is the case. The boot.img generated by the linux-rockchip recipe is in the Android format. I generated an ext2 fs using the instructions here and supplanted boot.img with that, and now it boots.