Include only device-specific modules in initramfs if MODULES=dep
I'm running Debian on a Samsung Chromebook Plus v1, where I'm unable to boot if I install plymouth due to the firmware supporting a limited-size kernel + initramfs + dtb package. To solve this I can remove (with an initramfs-tools hook) modules and firmware like amdgpu,radeon,nvidia,nouveau that my device doesn't use, but there're most likely more that I could remove. Instead, it would be better if plymouth only includes the necessary ones, like initramfs-tools does.
I've tested this on my machine, it reduces the initramfs by quite a lot and seems to work fine with the futureprototype theme. I didn't test on anything else though.
(I also had to remove the panfrost module with another initramfs-tools hook to avoid a system freeze, but plymouth already includes panfrost even without this MR, and the freeze is probably a panfrost problem not a plymouth problem).