[OE-core] [PATCH v9] kernel-devicetree.bbclass: Add support to generate append to kernel

Otavio Salvador otavio.salvador at ossystems.com.br
Thu Sep 21 14:51:12 UTC 2017


On Thu, Sep 21, 2017 at 11:50 AM, Tom Rini <trini at konsulko.com> wrote:
> On Thu, Sep 21, 2017 at 11:48:39AM -0300, Otavio Salvador wrote:
>> On Thu, Sep 21, 2017 at 11:37 AM, Tom Rini <trini at konsulko.com> wrote:
>> > On Thu, Sep 21, 2017 at 10:58:33AM -0300, Otavio Salvador wrote:
>> >
>> >> The are use cases where the Device Tree appended to the kernel is
>> >> convinient, so we generate the bundle concatenating the kernel (and
>> >> potentionally the initramfs) and the Device Tree binaries.
>> >>
>> >> To enable it, set KERNEL_DEVICETREE_BUNDLE variable to '1'
>> >>
>> >> Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
>> > [snip]
>> >> diff --git a/meta/classes/kernel-devicetree.bbclass b/meta/classes/kernel-devicetree.bbclass
>> >> index 72814ca224..6e08be4b70 100644
>> >> --- a/meta/classes/kernel-devicetree.bbclass
>> >> +++ b/meta/classes/kernel-devicetree.bbclass
>> >> @@ -1,6 +1,13 @@
>> >>  # Support for device tree generation
>> >> -PACKAGES_append = " kernel-devicetree"
>> >> +PACKAGES_append = " \
>> >> +    kernel-devicetree \
>> >> +    ${@['kernel-image-zimage-bundle', ''][d.getVar('KERNEL_DEVICETREE_BUNDLE') != '1']} \
>> >> +"
>> >>  FILES_kernel-devicetree = "/${KERNEL_IMAGEDEST}/*.dtb /${KERNEL_IMAGEDEST}/*.dtbo"
>> >> +FILES_kernel-image-zimage-bundle = "/${KERNEL_IMAGEDEST}/zImage-*.dtb.bin"
>> >
>> > Frankly, the most common use case today for still needing to concat the
>> > dtb to the zImage is for very legacy U-Boot where 'bootz' doesn't exist,
>> > so we need uImage (which is in turn why we need to patch the kernel
>> > build process, or manually run mkimage, it must be (zImage + dtb) +
>> > uImage-header).
>>
>> There is also the use case of a single binary to boot. We use it in a
>> customer project and we found it quite useful.
>
> That's what FIT is for.

Without U-Boot.


-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750



More information about the Openembedded-core mailing list