agherzan / meta-raspberrypi

Yocto/OE BSP layer for the Raspberry Pi boards
https://www.yoctoproject.org/
MIT License
532 stars 410 forks source link

how to add customer dtbo into target image #921

Closed bigbearishappy closed 3 years ago

bigbearishappy commented 3 years ago

Description I have create a new layer of my own raspberrypi CM4, which is based on the meta-raspberrypi. And I write my own customer dtoverlay file and can compile it to dtbo. The question is that I don't know how to install my dtbo into the target image's /boot/overlays/

I have tried to add the following code into my bb file: install -d ${D}/boot/overlays/ install -m 0755 ${S}/overlays/rpi/my-own-overlay.dtbo ${D}/boot/overlays/

but it didn't work. when I try to install my-own-overlay.dtbo into other directory of the target image with the following code: install -d ${D}/home/root/ install -m 0755 ${S}/overlays/rpi/my-own-overlay.dtbo ${D}/home/root/

it works fine and I can find my-own-overlay.dtbo in target image.

Also,I have take a deep look into meta-raspberrypi.I find that in the file sdcard_image-rpi.bbclass, all the dtbo files are copied into a dedicated folder and packaged into the boot.img. these dtbo file are from kernel source code(arch/arm/boot/dts).

Can anyone help me out? thanks ~

bigbearishappy commented 3 years ago

https://stackoverflow.com/questions/68222619/update-custom-device-tree-on-yocto