Hi Andrei, Sorry for the delay, but I've met some unexpected issue: when calling IMAGE_CMD (which is the code that lives in sdcard_image-rpi.bbclass in raspberrypi's case), TMPDIR is willfully deleted before the call... But STAGING_KERNEL_BUILDDIR, which is used to find out what version of kernel is used in case it's not passed, actually depends on it, so it's not expanded. So the kernel version test in linux-raspberrypi-base.bbclass fails when get_dts is called from sdcard_image-rpi.bbclass without specifying the kernel version - then just returns the default KERNEL_DEVICETREE value!
I believe it happens the same when testing with 3.18 - but I didn't build 3.18, and maybe it doesn't matter for building the image. I'm trying to work around this issue without too much side-effects, and I haven't found a nice solution so far - short from removing the line that deletes TMPDIR... Any suggestion is appreciated. Herve -----Original Message----- From: Andrei Gherzan [mailto:and...@gherzan.ro] Sent: mercredi 15 juin 2016 02:12 To: Herve Jourdain <herve.jourd...@neuf.fr> Cc: yocto@yoctoproject.org Subject: Re: [yocto] [meta-raspberrypi][PATCH v4 3/5] rpi-base.inc: support for .dtbo files for dtb overlays 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 -- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto