Skip to content

Conversation

@gportay
Copy link
Contributor

@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

@gportay gportay mentioned this pull request Dec 14, 2023
gdoffe and others added 2 commits September 22, 2025 21:32
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 force-pushed the rpi-config-add-RPI_CONFIG_STRIP branch from a61e6d9 to d0e4387 Compare September 22, 2025 19:32
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