]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
kernel-install/90-loaderentry: do not read dtbs from /boot
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 10 Oct 2023 14:32:16 +0000 (16:32 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 11 Oct 2023 15:28:29 +0000 (17:28 +0200)
/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

index dc7c371e5a195292095f7c7bc8c29707289ab760..02497211b39123b093096d112b395da3f69b4960 100755 (executable)
@@ -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"