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:
Guilherme G. Piccoli
2024-05-06 15:12:37 -03:00
parent 6141e3c4cb
commit 4767b8095f
2 changed files with 8 additions and 6 deletions

View File

@ -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
}