From 91767ab0824680a9c60d06aeb26ea7cc377e133d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 10 Oct 2023 16:32:16 +0200 Subject: [PATCH] kernel-install/90-loaderentry: do not read dtbs from /boot /boot is not trusted, so we shouldn't use load files from there. Also, space in /boot is limited, so it doesn't make sense to install the files under one location there and then copy them to a different location. We should only copy the files from /usr somewhere and then install it in the appropriate place under /boot. Also use "/usr/lib" instead of the "/lib" prefix. We don't support unmerged-user anymore. Addresses some of the feedback in https://github.com/systemd/systemd/pull/28582#discussion_r1285820556. --- src/kernel-install/90-loaderentry.install.in | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/kernel-install/90-loaderentry.install.in b/src/kernel-install/90-loaderentry.install.in index dc7c371e5a1..02497211b39 100755 --- a/src/kernel-install/90-loaderentry.install.in +++ b/src/kernel-install/90-loaderentry.install.in @@ -126,11 +126,9 @@ elif [ -f /usr/lib/kernel/devicetree ]; then fi if [ -n "$DEVICETREE" ]; then for prefix in \ - "/boot/dtb-$KERNEL_VERSION" \ - "/boot/dtbs/$KERNEL_VERSION" \ - "/lib/firmware/$KERNEL_VERSION/device-tree" \ - "/lib/linux-image-$KERNEL_VERSION" \ - "/lib/modules/$KERNEL_VERSION/dtb" + "/usr/lib/firmware/$KERNEL_VERSION/device-tree" \ + "/usr/lib/linux-image-$KERNEL_VERSION" \ + "/usr/lib/modules/$KERNEL_VERSION/dtb" do [ -f "$prefix/$DEVICETREE" ] || continue DEVICETREE_SRC="$prefix/$DEVICETREE" -- 2.47.3