summaryrefslogtreecommitdiff
path: root/conf
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2023-02-07 17:45:52 +0100
committerMax Krummenacher <max.krummenacher@toradex.com>2023-02-13 14:43:52 +0100
commit7b186f18a718d889b5f2a986958b109bf6e9ded6 (patch)
tree9d59e0450ca6a840c14217bfb2d6dcae3875f4f4 /conf
parent3d3f03492053111e0205394c705ac6a276bcb252 (diff)
verdin-am62: add kernel and friends to bootfs
We want to load the kernel/device tree/device tree overlays from the first partition. So deploy them there and stop having them in the rootfs /boot/. Related-to: ELB-5012 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'conf')
-rw-r--r--conf/machine/verdin-am62.conf10
-rw-r--r--conf/machine/verdin-am62.inc23
2 files changed, 33 insertions, 0 deletions
diff --git a/conf/machine/verdin-am62.conf b/conf/machine/verdin-am62.conf
index 76bdee4..9f59443 100644
--- a/conf/machine/verdin-am62.conf
+++ b/conf/machine/verdin-am62.conf
@@ -5,8 +5,12 @@
MACHINE_NAME = "Verdin-AM62"
+require conf/machine/verdin-am62.inc
require conf/machine/include/am62xx.inc
+# Don't include kernels in standard images
+# keep it for now RRECOMMENDS:${KERNEL_PACKAGE_NAME}-base = ""
+
PREFERRED_PROVIDER_virtual/kernel = "linux-toradex-ti"
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-toradex-ti-staging"
PREFERRED_PROVIDER_u-boot = "u-boot-toradex-ti-staging"
@@ -28,6 +32,12 @@ TEZI_EXTERNAL_KERNEL_DEVICETREE_BOOT = ""
UBOOT_MACHINE = "am62x_evm_a53_defconfig"
+IMAGE_BOOT_FILES:append = " \
+ boot.scr-${MACHINE};boot.scr \
+ ${KERNEL_IMAGETYPE} \
+ ${@make_dtb_boot_files(d)} \
+"
+
WKS_FILE_DEPENDS:append = " u-boot-distro-boot"
WIC_CREATE_EXTRA_ARGS:append = " --no-fstab-update"
diff --git a/conf/machine/verdin-am62.inc b/conf/machine/verdin-am62.inc
new file mode 100644
index 0000000..a1c4a22
--- /dev/null
+++ b/conf/machine/verdin-am62.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])
+
+