So, each time I modify the device tree I typically change the dts in a custom recipe and rebuild the image. The rebuild takes a long time since it rebuilds the entire kernel, and then the image needs to be built and finally deployed to the target device.
Is there any trick that I'm missing that rebuilds only the device tree?
UPDATE:
I've marked g0hl1n's answer as the correct one, since it is the answer to my question. However, I found it to be very cumbersome to work with the kernel in Yocto: strange, long paths and risk of files being overwritten on each rebuild, source of kernel in tmp/work-shared while the kernel is being built in tmp/work.
Instead I've moved the kernel development out of Yocto. Yocto has good tools for creating an SDK (see populate_sdk task) and with that it's easy to setup an environment for kernel development with quick rebuilds and manual (or scripted) deployments. Once the work is done the changes can be moved to a recipe using git diff.
The instructions on the following page was very helpful: http://jumpnowtek.com/beaglebone/Working-on-the-BeagleBone-kernel.html
Bitbake is a task scheduler that parses Python and Shell script mixed code, which we called Recipes. The code parsed generates and runs tasks. They are a set of steps orders according to the code's dependencies. Metadata is where all the Recipes are located.
AFAIK there are two different ways of doing this.
<build dir>/tmp/work/<machine>/<kernel-name>/<kernel-version>/git/
)./scripts/dtc/dtc -I dts -O dtb -o ./devicetree.dtb path/to/devicetree.dts
$ bitbake <kernel-name> -f -c deploy
<build dir>/tmp/work/<machine>/<kernel-name>/<kernel-version>/build/arch/arm/boot/dts/
)At least for me both versions worked in a quick test.
UPDATE: I just came over a third version of building the dtb with yocto on the net. That one uses yocto's devshell
of the kernel build. For more information see the original authors page at https://splefty.blogspot.co.at/2015/09/compiling-device-tree-using-yocto.html.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With