summaryrefslogtreecommitdiff
path: root/conf/machine/tdx-utilities.inc
diff options
context:
space:
mode:
authorHiago De Franco <hiago.franco@toradex.com>2024-04-23 16:43:56 -0300
committerHiago De Franco <hiago.franco@toradex.com>2024-04-24 10:46:50 -0300
commit3c042fdce2c8d4e2fea5836be9fc49b49400fe7a (patch)
treefa4a2b30ba9c5d936868a8d267d4c574b81a4240 /conf/machine/tdx-utilities.inc
parentd5d48dc1cc1ab54b3a498a0d5ea19646cab381ee (diff)
machine: verdin-am62: make verdin-am62.inc name more generic
The make_dtb_boot_files python function can be also used to other future machines added to meta-toradex-ti, therefore make it naming more generic instead of calling it verdin-am62.inc. Related-to: ELB-5482 Signed-off-by: Hiago De Franco <hiago.franco@toradex.com>
Diffstat (limited to 'conf/machine/tdx-utilities.inc')
-rw-r--r--conf/machine/tdx-utilities.inc23
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])
+
+