On Tue, 2017-09-12 at 17:36 -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 <ota...@ossystems.com.br> > --- > > Changes in v8: > - rework append support to support ARM and MIPS (obi) > > Changes in v7: > - simplified code > - rename bundle to use .bin extension > > Changes in v6: None > Changes in v5: > - add support for initramfs bundle > > Changes in v4: > - new patch > > Changes in v3: None > Changes in v2: None > > meta/classes/kernel-devicetree.bbclass | 62 > +++++++++++++++++++++++++++++++++- > 1 file changed, 61 insertions(+), 1 deletion(-) > > diff --git a/meta/classes/kernel-devicetree.bbclass b/meta/classes/kernel- > devicetree.bbclass > index 8723f24212..c618594c96 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" > + > +# Generate kernel+devicetree bundle > +KERNEL_DEVICETREE_BUNDLE ?= "0" > > normalize_dtb () { > DTB="$1" > @@ -20,6 +27,38 @@ get_real_dtb_path_in_kernel () { > echo "${DTB_PATH}" > } > > + > +do_configure_devicetree() { > + if [ "${KERNEL_DEVICETREE_BUNDLE}" = "1" ]; then > + if echo ${KERNEL_IMAGETYPE_FOR_MAKE} | grep -q 'zImage'; > then > + case "${ARCH}" in > + "arm") > + config="${B}/.config" > + if ! grep -q 'CONFIG_ARM_APPENDED_DTB=y' > $config; then > + bbwarn 'CONFIG_ARM_APPENDED_DTB > is NOT enabled in the kernel. Enabling it to allow the kernel to boot with > the Device Tree appended!' > + sed -i "/CONFIG_ARM_APPENDED_DTB[ > =]/d" $config > + echo "CONFIG_ARM_APPENDED_DTB=y" > >> $config > + echo "# > CONFIG_ARM_ATAG_DTB_COMPAT is not set" >> $config > + fi > + ;; > + "mips")
AFAICS, zImage is specific to x86 and arm, all other arches, including MIPS have no zImage Makefile target, so we'll never get here. Cheers, Andre' -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core