From ad77ed4e5b6370abc1bc7813684b1808a5c18185 Mon Sep 17 00:00:00 2001 From: Jacopo Dall'Aglio Date: Fri, 17 May 2019 07:58:54 +0000 Subject: [PATCH] utilities.inc: fix return None type error Function make_dtb_boot_files now always returns and raises an error if a KERNEL_DEVICETREE entry filename extension is not .dtb or .dtbo. Signed-off-by: Jacopo Dall'Aglio --- conf/machine/include/utilities.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/conf/machine/include/utilities.inc b/conf/machine/include/utilities.inc index a56fd963..164d77f4 100644 --- a/conf/machine/include/utilities.inc +++ b/conf/machine/include/utilities.inc @@ -7,10 +7,11 @@ def make_dtb_boot_files(d): alldtbs = d.getVar('KERNEL_DEVICETREE') def transform(dtb): - if dtb.endswith('dtb') or dtb.endswith('dtbo'): + if not (dtb.endswith('dtb') or dtb.endswith('dtbo')): # eg: whatever/bcm2708-rpi-b.dtb has: # DEPLOYDIR file: bcm2708-rpi-b.dtb # destination: bcm2708-rpi-b.dtb - return os.path.basename(dtb) + bb.error("KERNEL_DEVICETREE entry %s is not a .dtb or .dtbo file." % (dtb) ) + return os.path.basename(dtb) return ' '.join([transform(dtb) for dtb in alldtbs.split() if dtb]) -- 2.40.1