diff options
| author | Jacopo Dall'Aglio <jacopo.dallaglio@kynetics.com> | 2019-05-17 07:58:54 +0000 |
|---|---|---|
| committer | Otavio Salvador <otavio@ossystems.com.br> | 2019-05-17 07:56:07 -0300 |
| commit | ad77ed4e5b6370abc1bc7813684b1808a5c18185 (patch) | |
| tree | 5e5b5a73fae559e3ba896c470ff58f6422e74370 /conf | |
| parent | 8e6d49add68fad7519e10bf6c99ca7db4c3a5d33 (diff) | |
| download | meta-freescale-ad77ed4e5b6370abc1bc7813684b1808a5c18185.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')
| -rw-r--r-- | conf/machine/include/utilities.inc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/conf/machine/include/utilities.inc b/conf/machine/include/utilities.inc index a56fd9636..164d77f42 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]) |
