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.
This commit is contained 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"
|
||||
|
||||
Reference in New Issue
Block a user