diff options
Diffstat (limited to 'meta/classes/devicetree.bbclass')
-rw-r--r-- | meta/classes/devicetree.bbclass | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/meta/classes/devicetree.bbclass b/meta/classes/devicetree.bbclass index 8fe5a5ed79..2a62ae7bc8 100644 --- a/meta/classes/devicetree.bbclass +++ b/meta/classes/devicetree.bbclass @@ -15,10 +15,10 @@ SECTION ?= "bsp" # The default inclusion of kernel device tree includes and headers means that -# device trees built with them are at least GPLv2 (and in some cases dual -# licensed). Default to GPLv2 if the recipe does not specify a license. -LICENSE ?= "GPLv2" -LIC_FILES_CHKSUM ?= "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" +# device trees built with them are at least GPL-2.0-only (and in some cases dual +# licensed). Default to GPL-2.0-only if the recipe does not specify a license. +LICENSE ?= "GPL-2.0-only" +LIC_FILES_CHKSUM ?= "file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" INHIBIT_DEFAULT_DEPS = "1" DEPENDS += "dtc-native" @@ -27,10 +27,12 @@ inherit deploy kernel-arch COMPATIBLE_MACHINE ?= "^$" +PROVIDES = "virtual/dtb" + PACKAGE_ARCH = "${MACHINE_ARCH}" SYSROOT_DIRS += "/boot/devicetree" -FILES_${PN} = "/boot/devicetree/*.dtb /boot/devicetree/*.dtbo" +FILES:${PN} = "/boot/devicetree/*.dtb /boot/devicetree/*.dtbo" S = "${WORKDIR}" B = "${WORKDIR}/build" @@ -57,7 +59,7 @@ DT_BOOT_CPU ??= "0" DTC_FLAGS ?= "-R ${DT_RESERVED_MAP} -b ${DT_BOOT_CPU}" DTC_PPFLAGS ?= "-nostdinc -undef -D__DTS__ -x assembler-with-cpp" -DTC_BFLAGS ?= "-p ${DT_PADDING_SIZE}" +DTC_BFLAGS ?= "-p ${DT_PADDING_SIZE} -@" DTC_OFLAGS ?= "-p 0 -@ -H epapr" python () { @@ -114,15 +116,18 @@ def devicetree_compile(dtspath, includes, d): dtcargs += ["-o", "{0}.{1}".format(dtname, "dtbo" if isoverlay else "dtb")] dtcargs += ["-I", "dts", "-O", "dtb", "{0}.pp".format(dts)] bb.note("Running {0}".format(" ".join(dtcargs))) - subprocess.run(dtcargs, check = True) + subprocess.run(dtcargs, check = True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) python devicetree_do_compile() { includes = expand_includes("DT_INCLUDE", d) listpath = d.getVar("DT_FILES_PATH") for dts in os.listdir(listpath): - if not dts.endswith(".dts"): - continue # skip non-.dts files dtspath = os.path.join(listpath, dts) + try: + if not(os.path.isfile(dtspath)) or not(dts.endswith(".dts") or devicetree_source_is_overlay(dtspath)): + continue # skip non-.dts files and non-overlay files + except: + continue # skip if can't determine if overlay devicetree_compile(dtspath, includes, d) } |