diff options
Diffstat (limited to 'conf/machine/tdx-utilities.inc')
-rw-r--r-- | conf/machine/tdx-utilities.inc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/conf/machine/tdx-utilities.inc b/conf/machine/tdx-utilities.inc new file mode 100644 index 0000000..a1c4a22 --- /dev/null +++ b/conf/machine/tdx-utilities.inc @@ -0,0 +1,23 @@ +# taken from meta-freescale/conf/machine/include/utilities.inc +def make_dtb_boot_files(d): + # Generate IMAGE_BOOT_FILES entries for device tree files listed in + # KERNEL_DEVICETREE. + # Use only the basename for dtb files: + alldtbs = d.getVar('KERNEL_DEVICETREE') + + + # DTBs may be built out of kernel with devicetree.bbclass + if not alldtbs: + return '' + + def transform(dtb): + 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 + 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]) + + |