[yocto] [meta-raspberrypi][PATCH v3 3/5] Support for .dtbo files for dtb overlays, required by kernels 4.4.6+
Herve Jourdain
herve.jourdain at neuf.fr
Fri May 20 01:27:42 PDT 2016
Kernel 4.4.6+ on RaspberryPi support .dtbo files for overlays, instead of .dtb.
Add support for both variants of overlays ("-overlay.dtb" and ".dtbo") for the default KERNEL_DEVICETREE variable
Signed-off-by: Herve Jourdain <herve.jourdain at neuf.fr>
---
conf/machine/include/rpi-base.inc | 37 ++++++++++++++++++++++++++++++++++++-
1 file changed, 36 insertions(+), 1 deletion(-)
diff --git a/conf/machine/include/rpi-base.inc b/conf/machine/include/rpi-base.inc
index 56ca83e..23f8619 100644
--- a/conf/machine/include/rpi-base.inc
+++ b/conf/machine/include/rpi-base.inc
@@ -16,7 +16,7 @@ XSERVER = " \
"
# Really supported starting from linux-raspberrypi 3.18.y only
-KERNEL_DEVICETREE ?= " \
+KERNEL_DEVICETREE_OVERLAYS_DTB = " \
bcm2708-rpi-b.dtb \
bcm2708-rpi-b-plus.dtb \
bcm2709-rpi-2-b.dtb \
@@ -38,6 +38,40 @@ KERNEL_DEVICETREE ?= " \
overlays/w1-gpio-pullup-overlay.dtb \
overlays/pi3-miniuart-bt-overlay.dtb \
"
+KERNEL_DEVICETREE_OVERLAYS_DTBO = " \
+ bcm2708-rpi-b.dtb \
+ bcm2708-rpi-b-plus.dtb \
+ bcm2709-rpi-2-b.dtb \
+ bcm2710-rpi-3-b.dtb \
+ \
+ overlays/hifiberry-amp.dtbo \
+ overlays/hifiberry-dac.dtbo \
+ overlays/hifiberry-dacplus.dtbo \
+ overlays/hifiberry-digi.dtbo \
+ overlays/i2c-rtc.dtbo \
+ overlays/iqaudio-dac.dtbo \
+ overlays/iqaudio-dacplus.dtbo \
+ overlays/lirc-rpi.dtbo \
+ overlays/pitft22.dtbo \
+ overlays/pitft28-resistive.dtbo \
+ overlays/pps-gpio.dtbo \
+ overlays/rpi-ft5406.dtbo \
+ overlays/w1-gpio.dtbo \
+ overlays/w1-gpio-pullup.dtbo \
+ overlays/pi3-miniuart-bt.dtbo \
+ "
+
+def cmpver_strings(ver1, ver2, truevalue, falsevalue):
+ from distutils.version import LooseVersion
+ ver1 = ''.join(ch for ch in ver1 if ch in '0123456789.')
+ ver2 = ''.join(ch for ch in ver2 if ch in '0123456789.')
+ if LooseVersion(ver1) >= LooseVersion(ver2):
+ return truevalue
+ else:
+ return falsevalue
+
+KERNEL_DEVICETREE ?= "${@cmpver_strings("${PREFERRED_VERSION_linux-raspberrypi}", "4.4", "${KERNEL_DEVICETREE_OVERLAYS_DTBO}", "${KERNEL_DEVICETREE_OVERLAYS_DTB}")}"
+
KERNEL_IMAGETYPE ?= "Image"
MACHINE_FEATURES += "apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio"
--
2.7.4
More information about the yocto
mailing list