initramfs: Fix the removal of GPU drivers from the minimal initrd
Thanks to the great report from Saurabh Charde, we noticed that the removal command used in the minimal initrd creation for deleting the GPU/DRM drivers wasn't working. Fix that so now GPU drivers aren't included for real (both for space and boot "issue-prone" criteria). Closes: https://gitlab.freedesktop.org/gpiccoli/kdumpst/-/issues/19 Reported-by: Saurabh Charde (@schardev) Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
This commit is contained in:
@ -10,9 +10,10 @@ installkernel() {
|
||||
# to reduce the size of the minimal initramfs being created - kdump
|
||||
# is an non-graphical environment. This should have been already done
|
||||
# via dracut cmdline arguments, but play safe and delete here as well.
|
||||
# Our list includes the most common FWs/drivers (amd, i915, nvidia).
|
||||
rm -rf "$initdir"/usr/lib/firmware/{amdgpu,i915,nvidia,radeon}
|
||||
rm -rf "$initdir"/usr/lib/modules/*/kernel/drivers/gpu/drm/{amd,i915,nouveau,radeon}
|
||||
# Our list includes the most common GFX FW blobs (AMD, i915, Nvidia)
|
||||
# and all GPU/DRM drivers.
|
||||
rm -rf "$initdir"/usr/lib/firmware/{amdgpu,i915,nvidia,radeon}/
|
||||
rm -rf "$initdir"/usr/lib/modules/*/kernel/drivers/gpu/drm/*
|
||||
|
||||
FSMOD="$(findmnt -n -o FSTYPE --target "${MOUNT_FOLDER}")"
|
||||
if [ -z "${FSMOD}" ]; then
|
||||
|
||||
@ -35,9 +35,10 @@ build() {
|
||||
|
||||
# Finally, we shouldn't have DRM/GPU drivers and firmwares here,
|
||||
# but...just in case, let's remove all of that nevertheless.
|
||||
# Our list includes the most common FWs/drivers (amd, i915, nvidia).
|
||||
rm -rf "${BUILDROOT}"/usr/lib/firmware/{amdgpu,i915,nvidia,radeon}
|
||||
rm -rf "${BUILDROOT}"/usr/lib/modules/*/kernel/drivers/gpu/drm/{amd,i915,nouveau,radeon}
|
||||
# Our list includes the most common GFX FW blobs (AMD, i915, Nvidia)
|
||||
# and all GPU/DRM drivers.
|
||||
rm -rf "${BUILDROOT}"/usr/lib/firmware/{amdgpu,i915,nvidia,radeon}/
|
||||
rm -rf "${BUILDROOT}"/usr/lib/modules/*/kernel/drivers/gpu/drm/*
|
||||
|
||||
add_runscript
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user