This is a script made for gentoo to debloat linux firmware package to the minimal required.
- What does this project do?
- Why is this project useful?
- How can you use this script?
- Current state
This project provides an automated script to debloat your linux-firmware package on Gentoo.
By default, linux-firmware can consume up to ~1.6GiB, including hundreds of firmware files you don't actually need. This script extracts only the firmware files that your system actively loads during boot, based on dmesg logs.
It also enables the savedconfig USE flag for linux-firmware automatically, so Portage will respect your minimal configuration.
This project is useful for users who want a minimalist Gentoo system with only the firmware that their hardware actually uses.
Benefits:
- Faster downloads when updating linux-firmware
- Less disk space used (especially on small SSDs or embedded systems)
- Less CPU usage when decompressing/installing large firmware archives
- Cleaner and more transparent system state
- This script needs root privileges because it modifies Portage configuration.
- gcc // clang main.c -o main .
- doas // sudo ./main
Already rewritted the script in C.
Waiting it to be merged into a useflag with emerge in the linux-firmware package.
The kernel ring buffer can be read already, i dont need to rely on log files. However, the kernel ring buffer is volatile, so i need to rely again on log files. Like for example the kind of log sysklogd generates to save the logs