diff options
Diffstat (limited to 'conf/machine/include/utilities.inc')
-rw-r--r-- | conf/machine/include/utilities.inc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/conf/machine/include/utilities.inc b/conf/machine/include/utilities.inc new file mode 100644 index 00000000..e6cfda80 --- /dev/null +++ b/conf/machine/include/utilities.inc | |||
@@ -0,0 +1,16 @@ | |||
1 | ### Machine definition file utilities | ||
2 | |||
3 | def make_dtb_boot_files(d): | ||
4 | # Generate IMAGE_BOOT_FILES entries for device tree files listed in | ||
5 | # KERNEL_DEVICETREE. | ||
6 | # Use only the basename for dtb files: | ||
7 | alldtbs = d.getVar('KERNEL_DEVICETREE') | ||
8 | |||
9 | def transform(dtb): | ||
10 | if dtb.endswith('dtb') or dtb.endswith('dtbo'): | ||
11 | # eg: whatever/bcm2708-rpi-b.dtb has: | ||
12 | # DEPLOYDIR file: bcm2708-rpi-b.dtb | ||
13 | # destination: bcm2708-rpi-b.dtb | ||
14 | return os.path.basename(dtb) | ||
15 | |||
16 | return ' '.join([transform(dtb) for dtb in alldtbs.split(' ') if dtb]) | ||