diff --git a/classes/linux-raspberrypi-base.bbclass b/classes/linux-raspberrypi-base.bbclass index e925d4e..0a21cc9 100644 --- a/classes/linux-raspberrypi-base.bbclass +++ b/classes/linux-raspberrypi-base.bbclass @@ -1,24 +1,7 @@ inherit linux-kernel-base -def get_dts(d, ver=None): - import re - - staging_dir = d.getVar("STAGING_KERNEL_BUILDDIR") - dts = d.getVar("KERNEL_DEVICETREE") - - # d.getVar() might return 'None' as a normal string - # leading to 'is None' check isn't enough. - # TODO: Investigate if this is a bug in bitbake - if ver is None or ver == "None": - ''' if 'ver' isn't set try to grab the kernel version - from the kernel staging ''' - ver = get_kernelversion_file(staging_dir) - - return dts - - def split_overlays(d, out, ver=None): - dts = get_dts(d, ver) + dts = d.getVar("KERNEL_DEVICETREE") if out: overlays = oe.utils.str_filter_out('\S+\-overlay\.dtb$', dts, d) overlays = oe.utils.str_filter_out('\S+\.dtbo$', overlays, d) diff --git a/classes/sdcard_image-rpi.bbclass b/classes/sdcard_image-rpi.bbclass index 42753d6..8099f77 100644 --- a/classes/sdcard_image-rpi.bbclass +++ b/classes/sdcard_image-rpi.bbclass @@ -86,7 +86,7 @@ IMAGE_CMD_rpi-sdimg () { echo "Creating filesystem with Boot partition ${BOOT_SPACE_ALIGNED} KiB and RootFS $ROOTFS_SIZE KiB" # Check if we are building with device tree support - DTS="${@get_dts(d)}" + DTS="${KERNEL_DEVICETREE}" # Initialize sdcard image file dd if=/dev/zero of=${SDIMG} bs=1024 count=0 seek=${SDIMG_SIZE} diff --git a/recipes-kernel/linux/linux-raspberrypi.inc b/recipes-kernel/linux/linux-raspberrypi.inc index b348a9d..8aa9577 100644 --- a/recipes-kernel/linux/linux-raspberrypi.inc +++ b/recipes-kernel/linux/linux-raspberrypi.inc @@ -30,14 +30,6 @@ UDEV_GE_141 ?= "1" KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains("MACHINE_FEATURES", "pitft28r", "stmpe-ts", "", d)}" -# Set programmatically some variables during recipe parsing -# See http://www.yoctoproject.org/docs/current/bitbake-user-manual/bitbake-user-manual.html#anonymous-python-functions -python __anonymous () { - kerneltype = d.getVar('KERNEL_IMAGETYPE') - kerneldt = get_dts(d, d.getVar('LINUX_VERSION')) - d.setVar("KERNEL_DEVICETREE", kerneldt) -} - do_compile_append_raspberrypi3-64() { cc_extra=$(get_cc_option) oe_runmake dtbs CC="${KERNEL_CC} $cc_extra " LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS}