From 8311d16e5999566d01e6931003f858d979a6e46c Mon Sep 17 00:00:00 2001 From: Paul Barker Date: Fri, 8 Sep 2017 09:29:31 +0000 Subject: linux-raspberrypi: Drop unnecessary code * The kerneltype variable is not used anywhere after being set. * The manipulation of KERNEL_DEVICETREE is effectively a no-op, we read the current value in get_dts() and store this back into the same variable. Signed-off-by: Paul Barker --- classes/linux-raspberrypi-base.bbclass | 19 +------------------ classes/sdcard_image-rpi.bbclass | 2 +- 2 files changed, 2 insertions(+), 19 deletions(-) (limited to 'classes') 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} -- cgit v1.2.3-54-g00ecf