]> code.ossystems Code Review - openembedded-core.git/commitdiff
kernel: fitimage: support device tree compiler options
authorYannick Gicquel <yannick.gicquel@iot.bzh>
Wed, 27 Apr 2016 14:20:55 +0000 (16:20 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 6 May 2016 09:30:57 +0000 (10:30 +0100)
This introduces a new variable to set the device tree compiler options while
calling mkimage ('-D' option). By default, this variable is not set but it can
be defined in a configuration file, as following example:

UBOOT_MKIMAGE_DTCOPTS = "-I dts -O dtb -p 2000"

Signed-off-by: Yannick Gicquel <yannick.gicquel@iot.bzh>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/kernel-fitimage.bbclass

index e5b75edf5bef657b96cf0626f0db790533175cda..62e001761782b3e6a1366ce5bb7102b6ea717479 100644 (file)
@@ -17,6 +17,9 @@ python __anonymous () {
             d.appendVarFlag('do_assemble_fitimage', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete')
 }
 
+# Options for the device tree compiler passed to mkimage '-D' feature:
+UBOOT_MKIMAGE_DTCOPTS ??= ""
+
 #
 # Emit the fitImage ITS header
 #
@@ -209,7 +212,10 @@ do_assemble_fitimage() {
                #
                # Step 4: Assemble the image
                #
-               uboot-mkimage -f fit-image.its arch/${ARCH}/boot/fitImage
+               uboot-mkimage \
+                       ${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \
+                       -f fit-image.its \
+                       arch/${ARCH}/boot/fitImage
        fi
 }