From 9b41913c909c030b2a738e05f66f4078daceca04 Mon Sep 17 00:00:00 2001 From: antznin Date: Fri, 3 Jul 2020 15:07:36 +0200 Subject: ostree-kernel-initramfs: fix devicetree deployment Following the changes in ostree's deployment of the kernel, initramfs and devicetree in /lib/modules/$kver, the deployment method of the device tree also changed. Instead of picking the first device tree it finds at a given location, ostree looks at a file named devicetree, next to kernel and initramfs in /lib/modules/$kver. This commit modifies ostree-kernel-initramfs to deploy the devicetree from the sota-defined variable OSTREE_DEVICETREE. It will pick the first one from the list of device trees that OSTREE_DEVICETREE defines, and copy it to /lib/modules/$kver. Note that since OSTREE_DEVICETREE equals to KERNEL_DEVICETREE when it isn't explicitly defined, it could indeed be a list of device trees. Signed-off-by: antznin --- .../ostree-kernel-initramfs/ostree-kernel-initramfs_0.0.1.bb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/recipes-sota/ostree-kernel-initramfs/ostree-kernel-initramfs_0.0.1.bb b/recipes-sota/ostree-kernel-initramfs/ostree-kernel-initramfs_0.0.1.bb index 6159f00..136bb22 100644 --- a/recipes-sota/ostree-kernel-initramfs/ostree-kernel-initramfs_0.0.1.bb +++ b/recipes-sota/ostree-kernel-initramfs/ostree-kernel-initramfs_0.0.1.bb @@ -14,7 +14,9 @@ ALLOW_EMPTY_ostree-devicetrees = "1" FILES_ostree-kernel = "${nonarch_base_libdir}/modules/*/vmlinuz" FILES_ostree-initramfs = "${nonarch_base_libdir}/modules/*/initramfs.img" -FILES_ostree-devicetrees = "${nonarch_base_libdir}/modules/*/dtb/*" +FILES_ostree-devicetrees = "${nonarch_base_libdir}/modules/*/dtb/* \ + ${nonarch_base_libdir}/modules/*/devicetree \ +" PACKAGE_ARCH = "${MACHINE_ARCH}" @@ -45,6 +47,7 @@ do_install() { dts_file_basename=$(basename $dts_file) cp ${DEPLOY_DIR_IMAGE}/$dts_file_basename $kerneldir/dtb/$dts_file_basename done + cp $kerneldir/dtb/$(basename $(echo ${OSTREE_DEVICETREE} | awk '{print $1}')) $kerneldir/devicetree fi fi } -- cgit v1.2.3-54-g00ecf