Building yocto image for RPi CM4 #raspberrypi


Sourabh Hegde
 

Hello All,
 

Advice on working with Yocto and Raspberry Pi CM4 Lite would be helpful.

I recently got my hands on with CM4 and now I want to build Yocto image with u-boot as bootloader. I have few doubts before I start the build.

  1. Which machine to use in local.conf file? In the meta-raspberrypi there is no specific machine for CM4 https://github.com/agherzan/meta-raspberrypi/tree/master/conf/machine. Will the "raspberrypi4-64" and "raspberrypi4" also work for CM4? As per my understanding the Raspberry Pi 4 and CM4 are mostly the same except for the device tree and drivers. Which device tree will work with RPi CM4? Do I need to generate them separately for CM4?
  2. Since I have CM4 lite, there is no on board eMMC. I am using custom IO board and it has SD card slot. I can boot from SD card instead. Do I need to set anything specific for CM4 to work in my image recipe or local.conf? Is it same as booting RPi 4 from uSD card?

My intention is to use RPi CM4 for software updates using RAUC.

Can anyone please let me about these? This would help me to get started.

Thanks in advance.

Please let me know if any details are missing.