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

Tom Rini trini at konsulko.com
Thu Sep 21 14:37:47 UTC 2017


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).

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20170921/4c1e7b16/attachment-0002.sig>


More information about the Openembedded-core mailing list