summaryrefslogtreecommitdiff
path: root/meta/classes/kernel-fitimage.bbclass
diff options
context:
space:
mode:
authorYannick Gicquel <yannick.gicquel@iot.bzh>2016-04-27 16:20:55 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-06 10:30:57 +0100
commit9a3f541da305c75418c2eec75ade902717a01b69 (patch)
treed363383c70c65f94245e12931cf440bec6a3a5cd /meta/classes/kernel-fitimage.bbclass
parent396a3fb0f55a443f73d6ddd99d8ba83412db2d40 (diff)
downloadopenembedded-core-9a3f541da305c75418c2eec75ade902717a01b69.tar.gz
openembedded-core-9a3f541da305c75418c2eec75ade902717a01b69.tar.bz2
openembedded-core-9a3f541da305c75418c2eec75ade902717a01b69.zip
kernel: fitimage: support device tree compiler options
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>
Diffstat (limited to 'meta/classes/kernel-fitimage.bbclass')
-rw-r--r--meta/classes/kernel-fitimage.bbclass8
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass
index e5b75edf5b..62e0017617 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -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
}