Balena Custom Device Support (CDS) for Radxa Rock5b

As there is an existing github repo https://github.com/balena-os/balena-radxa, should I start my work by cloning this repo?

I maybe wrong but I think the latest Yocto layer Radxa is working on cannot build becase there’s some problems with Rust building for a target which chromium depends on which I’m looking into. I can build if I avoid building their browser.conf and strip away a few more things… But their aim is different from BalenaOS (Building a minimal Yocto with no devtools, web browser + all drivers for the hardware like WiFi/BT/USB3/HDMI/GPU/NPU/GPIO) while Radxa as a manufacturer aims to provide a full GUI experience etc.

I have read the docs for Balena Customer Device Support, maybe I have missed it, but how can I test my build works with BalenaOS?

Do I have to create a BalenaOS instance somewhere myself as a test environment?

As for the overall steps, I think I will first create a Yocto build for Radxa Rock5b, test the functionalities / drivers etc. Once it’s functional, I shall then follow the CDS docs.

As for the Yocto releases, from all the work Rockchip / Radxa / communities have done, it seems to me nanbield is the one that makes everything sort of work. Does BalenaOS has any requirement on the Yocto release codename (reference here)?

As my use case is to use Radxa Rock5b as a computer-vision enabled NVR running Frigate in Docker, hooking up a bunch of RTSP cameras and use the object detection feature in Frigate to segment out videos that has movements and use Frigate’s API to feed it to other cloud services for analysis / annotation, while also keeping the original footages in 1920x1080 h264 in the Radxa’s nVME drive. Would also throw some standard IoT server stacks like NodeRed and InfluxDB in, running on Docker. Secured connection will implement Tailscale.

As a result, I don’t think I will spend a lot of effort testing the Yocto build’s HDMI IN / OUT, audio, BT and GPIO / SPI / I2C etc.
So I wonder if it’s possible at all to use BalenaCloud but not to have a ‘open to public’, ‘official supported’ device type? I am more than happy to share my work to the community but I may not have the capacity to deliver a fully functional Yocto build for the all round BalenaCloud use case.

2 Likes

Hi, as per the response here from Radxa using the new Rock 5 Model B · Issue #221 · balena-os/balena-radxa · GitHub , for Rock 5 support the BSP layer should be switched to the new one they pointed to.
So you should work on GitHub - balena-os/balena-radxa with GitHub - radxa/meta-radxa at 95652e3ab0a8037e732adff6293556a4e995e194 changed to GitHub - radxa/meta-rockchip: Yocto BSP layer for the Rockchip SOC boards on the kirkstone branch (or let’s see what Radxa replies to using the new Rock 5 Model B · Issue #221 · balena-os/balena-radxa · GitHub) and then follow the guide meta-balena/contributing-device-support.md at master · balena-os/meta-balena · GitHub
While developing, to test your board you can use a config.json from a different device type, let’s say you create a Rockpi 4 fleet in your balena dashboard, download the config.json using the download modal and then when you have balenaOS build for the Rock Pi5 you would simply replace the config.json in the balena-boot partition with the one from the Rock Pi4 fleet which would make your device masquarade as a RockPi 4 and you’d be able to see it in the dashboard.

2 Likes

@csvke have you made any progress on this? I’m extremely interested in this.

Hello @bherbruck could you please tell us more about your use case? Why do you need the Rock5B?

Thanks!

Thanks for the info, I’ll have a go!

I’m waiting for my rock5b to be delivered by arace.tech

I have successfully compiled a core-image-full-cmdline image, I will test it and see if the functionalities I want works with my build - and then I will work on the Balena BSP integration.

I’m lucky enough to find a powerful server to build the image relatively quickly - because it will otherwise be a very frustrating experience.

@bherbruck Do you have any experience with Radxa / Yocto / Balena? I’m very new to this and I am happy to work together for our use case / community.

1 Like

Anyone here has experience using GitHub actions and a self-hosted runner in a form of Docker to compile Balana custom device support images?

I’d just start with getting the docker image working locally then use that in the published flow. Local actions runners can be a pain.

I’m more interested in the rk3588 working on balena. There are many boards (rockpi, orangepi, nanopc, …) for it and it is very powerful. Just doing CPU tasks is a start but the possibility of using the NPU could make it the best board for balena IMO.

I just found this: GitHub - edk2-porting/edk2-rk3588: EDK2 UEFI firmware for Rockchip RK3588 platforms
Maybe we could use generic AARCH64 balenaos build if we can get UEFI working on it!

I’ll take a stab at it tomorrow.