Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rpi config add rpi config strip #1255

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gportay
Copy link

@gportay gportay commented Dec 14, 2023

Hello maintainers,

The config.txt is taken from repository and it is big.

The firmware has a size limit in handling that file which is not documented yet and some say it is 16k.

This PR adds the variable RPI_CONFIG_STRIP which strips the comments, empty lines and leading space (due to ${RPI_EXTRA_CONFIG}) if set to "1".

The second adds a warning if the deployed config.txt exceeds 16k.

Note: The worst part is that it prevent from the pi 5 to boot.

Regards,
Gaël

gdoffe and others added 2 commits December 14, 2023 21:34
The size of the file config.txt is over 52k, and it may grows over the
versions of the firmware. Even the deprecated options are maintained.

This adds the variable RPI_CONFIG_STRIP to allow the strip down of the
file config.txt to the very bare minimal: it removes the leading white
spaces, the empty lines and the comments.

Signed-off-by: Gilles Doffe <[email protected]>
Signed-off-by: Gaël PORTAY <[email protected]>
The firmware has a size limit in handling config.txt depending the
hardware and it may prevent the hardware from booting if file exceeds
it.

That limit is not documented yet[1] but the links[2][3] mention about
16k.

This warns if the config.txt is larger than 16k.

[1]: https://www.raspberrypi.com/documentation/computers/config_txt.html
[2]: https://forums.raspberrypi.com/viewtopic.php?p=2159238
[3]: raspberrypi/firmware#1848

Signed-off-by: Gaël PORTAY <[email protected]>
@gportay gportay mentioned this pull request Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants