diff options
author | Fabio Berton <fabio.berton@ossystems.com.br> | 2018-07-18 14:25:32 -0300 |
---|---|---|
committer | Fabio Berton <fabio.berton@ossystems.com.br> | 2018-07-20 14:06:57 -0300 |
commit | fd89a85eaafb4f26a11d96db5702eadb83c02813 (patch) | |
tree | 24cc031dbe82649eb567422d35baf025da6556e5 | |
parent | 54cfea29b1af7ab1302cd9dd5204a07a0b4a2ef3 (diff) | |
download | meta-freescale-fd89a85eaafb4f26a11d96db5702eadb83c02813.tar.gz |
utilities.inc: Use only the basename for dtb files
Use make_dtb_boot_files function to use basename from
KERNEL_DEVICETREE files. This is useful for dtb with name:
whatever/my_dtb_file.dtb
Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
-rw-r--r-- | conf/machine/include/imx-base.inc | 4 | ||||
-rw-r--r-- | conf/machine/include/utilities.inc | 16 |
2 files changed, 19 insertions, 1 deletions
diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc index b130ef72..52700105 100644 --- a/conf/machine/include/imx-base.inc +++ b/conf/machine/include/imx-base.inc | |||
@@ -3,6 +3,8 @@ | |||
3 | include conf/machine/include/fsl-default-settings.inc | 3 | include conf/machine/include/fsl-default-settings.inc |
4 | include conf/machine/include/fsl-default-versions.inc | 4 | include conf/machine/include/fsl-default-versions.inc |
5 | 5 | ||
6 | require conf/machine/include/utilities.inc | ||
7 | |||
6 | # Set specific make target and binary suffix | 8 | # Set specific make target and binary suffix |
7 | PREFERRED_PROVIDER_u-boot ??= "u-boot-fslc" | 9 | PREFERRED_PROVIDER_u-boot ??= "u-boot-fslc" |
8 | PREFERRED_PROVIDER_virtual/bootloader ??= "u-boot-fslc" | 10 | PREFERRED_PROVIDER_virtual/bootloader ??= "u-boot-fslc" |
@@ -291,7 +293,7 @@ IMAGE_FSTYPES ?= "${SOC_DEFAULT_IMAGE_FSTYPES}" | |||
291 | 293 | ||
292 | IMAGE_BOOT_FILES ?= " \ | 294 | IMAGE_BOOT_FILES ?= " \ |
293 | ${KERNEL_IMAGETYPE} \ | 295 | ${KERNEL_IMAGETYPE} \ |
294 | ${KERNEL_DEVICETREE} \ | 296 | ${@make_dtb_boot_files(d)} \ |
295 | " | 297 | " |
296 | 298 | ||
297 | ### wic default support | 299 | ### wic default support |
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]) | ||