Hello,
No idea whether it is the correct place to ask such a question. Giving it a try.
I’m looking for the best / cleanest way to build an SPI bootloader image for some specific machines / SoCs.
For context I’m trying to add support for the Rockchip rk3576 SoC and the Radxa Rock 4D SBC to meta-rockchip.
Some machines require to load the bootloader from SPI as they seam not able to directly load it from an SD card for example. For such machines we need to first flash the SPI with a bootloader. The pre-flashed vendor bootloader is unusable.
Currently I generate a .bin file with some `dd` commands from the main image file to get a blob to flash to SPI to have a bootable system. I’d rather have bitbake build the correct spi image.
Is there some ‘best practice’ on how to do it or are there already some boards for which it is done from where I could take inspiration ?
My idea now is to create a 2nd wks file for the SPI image and then add some ‘glue code’ to build the spi image along the main image. This seems a little messy.
To ‘activate’ the build of the SPI image I’m adding a new IMAGE_FSTYPES. This will be activated by default for some machines while being optional for others.
Does this make sense ? Would a ‘multiconfig’ approach be better ?
Also haven’t find a way to create an image with wks without a partition table. Is that possible ?
Thanks !