summaryrefslogtreecommitdiffstats
path: root/conf/machine/include
diff options
context:
space:
mode:
authorJacopo Dall'Aglio <jacopo.dallaglio@kynetics.com>2019-05-17 07:58:54 +0000
committerOtavio Salvador <otavio@ossystems.com.br>2019-05-17 07:49:00 -0300
commit01f28eb1c17d5390bcbcf3e6d7266f6253974256 (patch)
tree5e5b5a73fae559e3ba896c470ff58f6422e74370 /conf/machine/include
parentad02a20608b0bbb184fe633bd8a50c785d2002cd (diff)
downloadmeta-freescale-01f28eb1c17d5390bcbcf3e6d7266f6253974256.tar.gz
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 <jacopo.dallaglio@kynetics.com>
Diffstat (limited to 'conf/machine/include')
-rw-r--r--conf/machine/include/utilities.inc5
1 files 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):
7 alldtbs = d.getVar('KERNEL_DEVICETREE') 7 alldtbs = d.getVar('KERNEL_DEVICETREE')
8 8
9 def transform(dtb): 9 def transform(dtb):
10 if dtb.endswith('dtb') or dtb.endswith('dtbo'): 10 if not (dtb.endswith('dtb') or dtb.endswith('dtbo')):
11 # eg: whatever/bcm2708-rpi-b.dtb has: 11 # eg: whatever/bcm2708-rpi-b.dtb has:
12 # DEPLOYDIR file: bcm2708-rpi-b.dtb 12 # DEPLOYDIR file: bcm2708-rpi-b.dtb
13 # destination: bcm2708-rpi-b.dtb 13 # destination: bcm2708-rpi-b.dtb
14 return os.path.basename(dtb) 14 bb.error("KERNEL_DEVICETREE entry %s is not a .dtb or .dtbo file." % (dtb) )
15 return os.path.basename(dtb)
15 16
16 return ' '.join([transform(dtb) for dtb in alldtbs.split() if dtb]) 17 return ' '.join([transform(dtb) for dtb in alldtbs.split() if dtb])