0

I have a project that worked in a karo qbase2 board, I'm trying to move this project to my own board, so I wanted to add my own custom .dts file. I that's the process that I've tried right now, but it's not working.

  • Created new example.dts, this is the file I want to use.
  • Add .dts in MakeFile, I've added the following inside the MakeFile in: build/tmp/work/qs8m_mq00-poky-linux/linux-karo/5.15-r0/git/arch/sh/boot/dts +dtb-$(CONFIG_USE_BUILTIN_DTB) += example.dtb
  • Add to device tree with KERNEL_DEVICETREE += "example.dtb". I'm actually not sure where to add this. I had it recpes-core/images/myimage.bb, now I've tried to move it to linux-karo_5.15.bbappend but then it's not compiling.
  • Add the dts file before compiling the kernel, for that I've created a linux-karo_5.15.bbappend and I've added this: FILESEXTRAPATHS:prepend := "${THISDIR}/files:" SRC_URI_append = " file:// example.dts;subdir=git/arch/arm/boot/dts"
  • Then I've build the image, and when trying on the board it seems that example.dtb doesn't seem to exist, I've changed the enviromental variable, but it doesn't exist.

If I move KERNEL_DEVICETREE to the .bbappend then I get an error like this: | SYNC include/config/auto.conf.cmd | GEN Makefile | make[1]: *** No rule to make target 'arch/arm64/boot/dts/0821.dtb'. Stop. | make: *** [/bitbucket/082x_linux/build/tmp/work-shared/qs8m-mq00/kernel-source/Makefile:1400: 0821.dtb] Error 2 | ERROR: oe_runmake failed | WARNING: exit code 1 from a shell command.

My guess is that KERNEL_DEVICETREE is now ok, but that I haven't correctly configured the MakeFile that has to take the .dts and make it a .dtb, but I'm a bit lost between all the layers and recipes.

Thanks!

Humusk
  • 5
  • 4
  • Recently I had to add a custom .dts to a rasbperrypi yocto based project. Maybe [my answer](https://stackoverflow.com/a/75734668/11287083) could help you? – Antoni Apr 12 '23 at 12:58

0 Answers0