Howto re-build dtb with bitbake cmd

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Howto re-build dtb with bitbake cmd

5,149 Views
floriankoenig
Contributor II

hi,

i builded a complete image, but now i want to change some properties in the device tree file (dts) and simply just want to rebuild the dts file into a dtb.

I saw on net, that "bitbake my-own-linux -f -c deploy"  should do the trick. But when i look at the date of the dtb-file in the build/arch/arm/boot/dts/ directory. it is not re-build ?

When i look at poky/meta/recipes-kernel/linux/linux-dtb.inc it seemed that the  do_compile_append task is building the dtb with "oe_runmake ${DTB}"  , but i think it is only callable with bitbake when i run "bitbake my-own-linux -c do_compile" , is that correct ?

Is there any way to re-build only the dtb with bitbake commands to have a consistent workflow ?

thanks

Labels (3)
6 Replies

3,254 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi Florian,

it is not necessary to use bitbake. You can just go to your kernel-source folder and execute

make imx_v7_defconfig

make file_name.dtb

and the new .dtb will be located at kernel-source/arch/arm/boot/dts/ directory.


Regards,
Carlos

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

3,254 Views
abhijeet_ghodga
Contributor III

What about the .dtb files generated in the deploy folder in /tmp directory? Do we have to delete those files or they get overwritten? Also how to find which .dts files are relevant as there are many made in the /kernel-source/arch/arm/boot/dts directory?

666 Views
Zater
Contributor II

Hello Mr. ghodga

did you find how to assign the desired  .dts file to bitbake to be build ?

0 Kudos

315 Views
naveenkumar_muthusamy
Contributor III

Hi all,

 

Below commands may work:

bitbake -c devshell virtual/kernel

make dtbs

304 Views
NunoVilaca
Contributor II

Where are the built blobs supposed to go? I tried it, it built the blobs, but I can't find them anywhere.

Nevermind, I found it on yocto's  tmp/work dir. I was expecting them to be on the kernel source dir.

 

One last note: make dtbs will build all dtbs. You can build just the dtb you want using, make <dtbname>.dtb

Beware you need the .dtb in the end. Also that the base dir is arch/arm/boot/dts, so if you want a dtb inside a sub-dir you must include it in the name:

make freescale/dtbname.dtb

288 Views
naveenkumar_muthusamy
Contributor III

Hi ,

 

Thanks for your reply. i have followed your input and it works well.

 

Tags (1)
0 Kudos