You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can I suggest a feature for achieving even-smaller resultant images, by allowing a user to supply a "config.txt" file, which could be read to manipulate the inclusion/exclusion of files that normally end up in /boot/firmware? For example, lets say a user has this in their config.txt file...
...against this text string (for example, destined for a headless Compute Module 4 with on-board storage, but no WiFi/Bluetooth module)...
This could instruct to add the bcm2711-rpi-cm4.dtb device tree base, the latest Pi arm64 v8+ kernel8.img, and, through via a match-all regex expression with the multi-line flag...
^dtoverlay=(.+?)[,\n$]
...to include the disable-bt, disable-wifi and i2c-fan device tree overlays. Another possibility is, by searching for gpu_mem=16, to determine whether or not to use the smaller fixup4cd.dat and start4cd.elf firmware files over the full size fixup4.dat and start.elf ones (subject to if the intended Pi board/CPU model uses them).
The text was updated successfully, but these errors were encountered:
In regards to dtoverlays, yes, but maybe that can be opt-in as a "comfort" feature for those seeking a maximum reduction.
In the same vein, the main DTB files, and as of writing there's 26 of them, make up ~1.22MiB, and yet only one will ever get used once-installed. Maybe the detection can be achieved with one-or-more always-commented #model=bcm2711-rpi-cm4 using the regex...
^#model=(.+)$
This part can be reduced to less than 85KB.
Then, there's the kernel, five of those in the official firmware repository amounting to ~41MB, only need one of them in a deployment install, so another average ~30MB in savings can be achieved there by using just the one; could be fished out with:
^#arch=(.+)$
The result is below 10MB as of kernel version 6.6.74.
Since opening this issue thread, I have spotted another avenue for kernel-linked reductions, but it's outside of /boot/firmware, so I'll explore in opening a new issue on that once I've an A-to-B way on it.
britkig
changed the title
"config.txt"-based control for inc/exclusion of /boot/firmware files
Feature Suggestion: "config.txt"-based control for inc/exclusion of /boot/firmware files
Jan 31, 2025
Can I suggest a feature for achieving even-smaller resultant images, by allowing a user to supply a "config.txt" file, which could be read to manipulate the inclusion/exclusion of files that normally end up in
/boot/firmware
? For example, lets say a user has this in theirconfig.txt
file......against this text string (for example, destined for a headless Compute Module 4 with on-board storage, but no WiFi/Bluetooth module)...
This could instruct to add the
bcm2711-rpi-cm4.dtb
device tree base, the latest Pi arm64 v8+kernel8.img
, and, through via a match-all regex expression with the multi-line flag......to include the
disable-bt
,disable-wifi
andi2c-fan
device tree overlays. Another possibility is, by searching forgpu_mem=16
, to determine whether or not to use the smallerfixup4cd.dat
andstart4cd.elf
firmware files over the full sizefixup4.dat
andstart.elf
ones (subject to if the intended Pi board/CPU model uses them).The text was updated successfully, but these errors were encountered: