From: liu.ming50@gmail.com
To: openembedded-core@lists.openembedded.org
Cc: Ming Liu <liu.ming50@gmail.com>
Subject: [PATCH] kernel-fitimage.bbclass: introduce OVERLAY_FDT_DEFAULT_BOOT
Date: Mon, 28 Jan 2019 09:23:50 +0000 [thread overview]
Message-ID: <1548667430-2086-1-git-send-email-liu.ming50@gmail.com> (raw)
From: Ming Liu <liu.ming50@gmail.com>
The FDT overlays can be applied to a base DT configuration by setting
this variable.
The FDT overlays set in this variable must be available in
KERNEL_DEVICETREE.
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
---
meta/classes/kernel-fitimage.bbclass | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass
index 718162a..71771dc 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -36,11 +36,23 @@ python __anonymous () {
if d.getVar('UBOOT_SIGN_ENABLE') == "1":
uboot_pn = d.getVar('PREFERRED_PROVIDER_u-boot') or 'u-boot'
d.appendVarFlag('do_assemble_fitimage', 'depends', ' %s:do_populate_sysroot' % uboot_pn)
+
+ # Verified any FDT listed in OVERLAY_FDT_DEFAULT_BOOT must be availabe
+ # in KERNEL_DEVICETREE.
+ kernel_devicetree = set((d.getVar('KERNEL_DEVICETREE') or '').split())
+ fdt_default_boot = set((d.getVar('OVERLAY_FDT_DEFAULT_BOOT') or '').split())
+ if fdt_default_boot:
+ missing = set.difference(fdt_default_boot, kernel_devicetree)
+ if missing:
+ bb.fatal("Any FDT set in OVERLAY_FDT_DEFAULT_BOOT must be available in KERNEL_DEVICETREE.")
}
# Options for the device tree compiler passed to mkimage '-D' feature:
UBOOT_MKIMAGE_DTCOPTS ??= ""
+# FDT Overlay to be set in the default boot configuration
+OVERLAY_FDT_DEFAULT_BOOT ??= ""
+
#
# Emit the fitImage ITS header
#
@@ -291,6 +303,12 @@ fitimage_emit_section_config() {
if [ "${6}" = "1" ]; then
default_line="default = \"conf@${3}\";"
+
+ for dtbo in ${OVERLAY_FDT_DEFAULT_BOOT}; do
+ dbto=$(echo "${dtbo}" | tr '/' '_')
+ dtbos="$dtbos, \"fdt@$dbto\""
+ done
+ fdt_line=$(echo $fdt_line | sed "s/;/$dtbos;/")
fi
cat << EOF >> ${1}
--
2.7.4
reply other threads:[~2019-01-28 9:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1548667430-2086-1-git-send-email-liu.ming50@gmail.com \
--to=liu.ming50@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox