On Tue, May 31, 2016 at 04:46:33AM +0800, Herve Jourdain wrote: > 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.jourd...@neuf.fr> > --- > conf/machine/include/rpi-base.inc | 36 +++++++++++++++++++++++++++++++++++- > 1 file changed, 35 insertions(+), 1 deletion(-) > > diff --git a/conf/machine/include/rpi-base.inc > b/conf/machine/include/rpi-base.inc > index 56ca83e..2c9d8e0 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" >
Can we avoid this duplication by translating dtbo->dtb for kernels before 4.4? And I would suggest doing this in linux-raspberrypi-base.bbclass . What do you think? We should reuse code there for version too. > MACHINE_FEATURES += "apm usbhost keyboard vfat ext2 screen touchscreen alsa > bluetooth wifi sdio" > -- > 2.7.4 > > -- > _______________________________________________ > yocto mailing list > yocto@yoctoproject.org > https://lists.yoctoproject.org/listinfo/yocto -- Andrei Gherzan
signature.asc
Description: PGP signature
-- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto