1
votes

I updated a fully worked board firmware from rocko to thud. I just updated poky and all the official repos. The kernel and bootloader are still in the same version. On startup the bootloader (little kernel) will stop and print the error message that he can't find dtb files.

DTB offset is incorrect, kernel image does not have appended DTB

I think the problem is the kernel compiling it self. For some reasons the dtb files will not append to the kernel. When I check the size of the builded kernel the "thud" version is a little bit smaller.

I found this usefull tool: https://github.com/PabloCastellano/extract-dtb

If I check the rocko kernel image the tool found 12 dtbs. But if I check the thud kernel image the tool found 0.

2

2 Answers

0
votes

For some reasons the dtb files will not append to the kernel.
...
But if I check the thud kernel image the tool found 0.

Apparently a build script to append a dtb file to the zImage file is missing.
According to Device Tree for Dummies, on page 8:

There is no built-in Makefile rule to produce such kernel, so one must manually do:

$ cat arch/arm/boot/zImage arch/arm/boot/dts/myboard.dtb > my-zImage  
$ mkimage ... -d my-zImage my-uImageI
0
votes

If I manually add with do_compile_append more than 1 dtb`s.

 cat arch/${ARCH}/boot/${KERNEL_IMAGETYPE}.backup arch/${ARCH}/boot/dts/MYDEVICETREEFILE.dtb > arch/${ARCH}/boot/${KERNEL_IMAGETYPE}

I find with the extract tool only 1 appended dtb.

And the system is not work correctly.

In case I add only 1 dtb like:

KERNEL_DEVICETREE := "MYDEVICETREEFILE.dtb"

This dtb will added and the system works without problems.

I found my problem:

I use the little kernel as bootloader. He want the Kernel in a specific format. For this I use mkbootimg. In my bb recipes the tool will execute. But for some arguments will not reach the mkbootimg tool.
Because of this the kernel was not in this specific format for the little kernel and he can not find the dtb files.