Custom RPI CM4 Carrier Board

We have designed a custom RPI CM4-based carrier board, which we will be receiving the first prototype units in a few weeks. The manufacturer will be providing us with a Yocto Dunfell BSP layer with the carrier board, which reflects our custom hardware configuration - which inculdes relays, ADCs, RS232, RS485, etc. in addition to the CM4 module.

We are planning to create a custom Balena build to support this carrier, and I’ve been familiarizing myself with the Yocto environment in the meanwhile. I’ve managed to get it working under WSL2, and have been able to successfully build the Balena RPI images from scratch. Now I’d like to create my own board, and am looking for some guidance (I’ve already read the custom build doc at balenaOS - Docs):

  • Since this is a CM4 module, should I be starting with the balena-raspberrypi repository? If so, how do I incorporate my BSP layer into that build? It seems to already incorporate the meta-raspberrypi BSP, though that does not seem to cover the CM4.
  • Once I create and build a custom image, am I required to commit this to the public Balena repositories to be able to create and download images for my hardware from Balena Cloud similar to what I do for standard hardware? Is there any way to make those images only available to my team?

Any guidance would be appreciated, as I couldn’t find information on these topics in the public docs.


  • I have pinged our engineers working on CM4 for an idea of how we plan to support it, as there will be many such variants of boards based on CM4.

  • Along with the link you shared, do also check out wrt building balenaOS Custom board support - Balena Documentation

  • If you are working on creating a custom device, we actually do help with that as well. This involves initial development as well as ongoing support. You can check our pricing page for more info on that.

@anujdeshpande thanks for your reply, I will await word on how you plan to support CM4. In the meanwhile I am going to take the approach of creating a new BSP layer for my carrier board that sits on top of the meta-balena-raspberrypi layer and extends the raspberrypi400-64 device which is similar to the CM4 and where it appears you have already started to build in some base level CM4 support.

@drcnyc I wanted to clarify one of Anuj’s points above, in that the Custom Device Support (CDS) from balena is if you want us to continuously test your device with each revision of our OS and keep it up-to-date for you. It sounds though like you might be wanting to go down the Community Device Type path, which we also support.

As you mentioned, once you’re done with the device-type you want added to balenaCloud, you would do a PR in the right branch so that we can add it. That’s where it actually will make a difference on which repo you add to, so it will be good to hear back from our engineers which branch they recommend you use.

I see that you’ve worked with my colleague Daniel in the past, and I would actually recommend starting up another email chain with him on this. He can make sure that you have everything you need to get onboarded, whether you go the CDS or Community path, and also help you if you want to make those images private. That’s something we recently discussed internally, so he’ll have some good updates for you in that regard. Unfortunately it’s a new process for us, so there aren’t any docs yet around it. :confused:

Anyway, let us know if it’s okay for him to reach out to you.

@kenna-smith thank you for clarifying. I will reach out to Daniel via email.

@drcnyc you’re welcome. I’ll let Daniel know you’ll be reaching out to him. :slight_smile: