[oe-commits] [openembedded-core] 01/02: devicetree.bbclass: don't pad DT overlays
git at git.openembedded.org
git at git.openembedded.org
Tue Sep 11 16:29:31 UTC 2018
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 237a42306aef1e2b21cd22c21f0c05cb41779e14
Author: Luca Ceresoli <luca at lucaceresoli.net>
AuthorDate: Tue Sep 11 13:13:59 2018 +0200
devicetree.bbclass: don't pad DT overlays
By default the devicetree class adds padding to the generated .dtb
files, which can be needed by the bootloader. However it also pads
.dtbo files, which is not useful.
Don't apply padding to the overlay devicetrees.
To achieve this:
* move "-p ${DT_PADDING_SIZE}" to a new variable, DTB_BFLAGS (B for
"base")
* add "-p 0" to DTC_OFLAGS to disable padding for overlays
Cc: Nathan Rossi <nathan at nathanrossi.com>
Signed-off-by: Luca Ceresoli <luca at lucaceresoli.net>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/devicetree.bbclass | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/meta/classes/devicetree.bbclass b/meta/classes/devicetree.bbclass
index dbc83f2..8fe5a5e 100644
--- a/meta/classes/devicetree.bbclass
+++ b/meta/classes/devicetree.bbclass
@@ -55,9 +55,10 @@ DT_RESERVED_MAP ??= "8"
DT_BOOT_CPU[doc] = "The boot cpu, defaults to 0"
DT_BOOT_CPU ??= "0"
-DTC_FLAGS ?= "-R ${DT_RESERVED_MAP} -p ${DT_PADDING_SIZE} -b ${DT_BOOT_CPU}"
+DTC_FLAGS ?= "-R ${DT_RESERVED_MAP} -b ${DT_BOOT_CPU}"
DTC_PPFLAGS ?= "-nostdinc -undef -D__DTS__ -x assembler-with-cpp"
-DTC_OFLAGS ?= "-@ -H epapr"
+DTC_BFLAGS ?= "-p ${DT_PADDING_SIZE}"
+DTC_OFLAGS ?= "-p 0 -@ -H epapr"
python () {
if d.getVar("KERNEL_INCLUDE"):
@@ -106,6 +107,8 @@ def devicetree_compile(dtspath, includes, d):
dtcargs = ["dtc"] + (d.getVar("DTC_FLAGS") or "").split()
if isoverlay:
dtcargs += (d.getVar("DTC_OFLAGS") or "").split()
+ else:
+ dtcargs += (d.getVar("DTC_BFLAGS") or "").split()
for i in includes:
dtcargs += ["-i", i]
dtcargs += ["-o", "{0}.{1}".format(dtname, "dtbo" if isoverlay else "dtb")]
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list