summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorOvidiu Panait <ovidiu.panait@windriver.com>2020-12-23 15:08:51 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-06-11 22:45:27 +0100
commit26428489f4ed53a4774d669f5ed28ccd0184be8c (patch)
treef0e46e4dd7694494bd7af5e46b0282c41a3062be /meta
parentab6b5e97cebe19938baa403da6307ca320294b3a (diff)
downloadpoky-26428489f4ed53a4774d669f5ed28ccd0184be8c.tar.gz
kernel-devicetree: Introduce KERNEL_DTC_FLAGS to pass dtc flags
Currently DTC_FLAGS kernel makefile parameter can be specified directly on the command line by adding it to KERNEL_EXTRA_ARGS. However, this prevents scripts/Makefile.lib logic from appending flags that silence dtc warnings (all assignments done from within a makefile, to a variable specified on the command line, are ignored). Because of this, the do_compile log is cluttered with dtc warnings that should only be printed when compiling with W="123": ... /soc: node has a reg or ranges property, but no unit name /soc/gpu: missing or empty reg/ranges property /soc/firmware/gpio: missing or empty reg/ranges property ... To fix this, introduce the dedicated KERNEL_DTC_FLAGS variable to hold dtc flags and export DTC_FLAGS in the environment before generating the dtbs (make allows "+=" operations on variables that come from the environment, so the warnings are silenced properly). (From OE-Core rev: 2246b0d7a71c69eb2e89c55991d1387069895466) Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 063b5de86624a42b0aa784db6dddc7552a6dee7f) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/kernel-devicetree.bbclass7
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/classes/kernel-devicetree.bbclass b/meta/classes/kernel-devicetree.bbclass
index 81dda8003f..d4f8864200 100644
--- a/meta/classes/kernel-devicetree.bbclass
+++ b/meta/classes/kernel-devicetree.bbclass
@@ -9,6 +9,9 @@ FILES_${KERNEL_PACKAGE_NAME}-image-zimage-bundle = "/${KERNEL_IMAGEDEST}/zImage-
9# Generate kernel+devicetree bundle 9# Generate kernel+devicetree bundle
10KERNEL_DEVICETREE_BUNDLE ?= "0" 10KERNEL_DEVICETREE_BUNDLE ?= "0"
11 11
12# dtc flags passed via DTC_FLAGS env variable
13KERNEL_DTC_FLAGS ?= ""
14
12normalize_dtb () { 15normalize_dtb () {
13 dtb="$1" 16 dtb="$1"
14 if echo $dtb | grep -q '/dts/'; then 17 if echo $dtb | grep -q '/dts/'; then
@@ -50,6 +53,10 @@ do_configure_append() {
50} 53}
51 54
52do_compile_append() { 55do_compile_append() {
56 if [ -n "${KERNEL_DTC_FLAGS}" ]; then
57 export DTC_FLAGS="${KERNEL_DTC_FLAGS}"
58 fi
59
53 for dtbf in ${KERNEL_DEVICETREE}; do 60 for dtbf in ${KERNEL_DEVICETREE}; do
54 dtb=`normalize_dtb "$dtbf"` 61 dtb=`normalize_dtb "$dtbf"`
55 oe_runmake $dtb CC="${KERNEL_CC} $cc_extra " LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS} 62 oe_runmake $dtb CC="${KERNEL_CC} $cc_extra " LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS}