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

Raspberry Pi 5 fails to boot with a large config.txt #1848

Closed
leon-anavi opened this issue Nov 24, 2023 · 3 comments
Closed

Raspberry Pi 5 fails to boot with a large config.txt #1848

leon-anavi opened this issue Nov 24, 2023 · 3 comments

Comments

@leon-anavi
Copy link

Is this the right place for my bug report?

Yes, because it is related to the boot process and config.txt size.

Describe the bug

While adding Raspberry Pi 5 support in Yocto/OpenEmbedded BSP meta-raspberrypi we noticed that the board doesn't boot with a large config.txt file: agherzan/meta-raspberrypi#1237

I haven't seen this issue before on previous Raspberry Pi models and versions. @floion started a discussion in the Raspberry Pi forum. jamesh, Raspberry Pi Engineer & Forum Moderator, recommended to get rid of the comments and reduce the file size. In meta-raspberrypi we can do this easily with sed -i '/^##/d' $CONFIG (at least temporary until we have a better solution) but let's also report the issue here too.

To reproduce

Try booting Raspberry Pi 5 with a large config.txt: https://raw.githubusercontent.com/Evilpaul/RPi-config/master/config.txt

Expected behaviour

The expected behavior is Raspberry Pi 5 to boot.

Actual behaviour

Raspberry Pi 5 doesn't boot.

System
Copy and paste the results of the raspinfo command in to this section. Alternatively, copy and paste a pastebin link, or add answers to the following questions:

  • Which model of Raspberry Pi? e.g. Pi3B+, PiZeroW

Raspberry Pi 5

  • Which OS and version (cat /etc/rpi-issue)?

Raspberry Pi OS or image built with agherzan/meta-raspberrypi#1237

  • Which firmware version (vcgencmd version)?
  • Which kernel version (uname -a)?

Logs
If applicable, add the relevant output from dmesg or similar.

raspberrypi5-large-config-20231124.txt

Additional context

leon-anavi added a commit to leon-anavi/meta-raspberrypi-1 that referenced this issue Nov 24, 2023
Remove some comments to reduce config.txt file size to avoid file
corruption and make sure Raspberry Pi 5 will boot successfully.

The issue with large config.txt has been reported to related
projects:
raspberrypi/firmware#1848
Evilpaul/RPi-config#9

This work was sponsored by GOVCERT.LU.

Signed-off-by: Leon Anavi <[email protected]>
@timg236
Copy link

timg236 commented Nov 24, 2023

Edit: The limit for a single config.txt file or include is 16K. There's no need to support arbitrarily large config.txt files.

@leon-anavi
Copy link
Author

@timg236 thank you for the quick feedback and the shared technical details. Noted down. In the particular case config.txt is 49K so your explanation makes sense:

$ ls -lah config.txt
-rw-r--r-- 1 leon leon 49K ное 24 13:55 config.txt

Regarding these circumstances in short term at Yocto/OpenEmbedded BSP layer meta-raspbebrrypi we will just remove various comments from config.txt to reduce the file size and in long term we will come up with more sustainable solution for config.txt.

@timg236
Copy link

timg236 commented Nov 24, 2023

For larger config.txt files using include statements may be helpful. I think there's possibly room for improvement with error messages in future bootloader updates so we can add that to the backlog.
Amongst other reasons the bounded size is that config.txt is now parsed earlier by the bootloader code which is has a bounded size for signature checks

floion pushed a commit to floion/meta-raspberrypi that referenced this issue Nov 25, 2023
Remove some comments to reduce config.txt file size to avoid file
corruption and make sure Raspberry Pi 5 will boot successfully.

The issue with large config.txt has been reported to related
projects:
raspberrypi/firmware#1848
Evilpaul/RPi-config#9

This work was sponsored by GOVCERT.LU.

Signed-off-by: Leon Anavi <[email protected]>
floion pushed a commit to floion/meta-raspberrypi that referenced this issue Nov 25, 2023
Remove some comments to reduce config.txt file size to avoid file
corruption and make sure Raspberry Pi 5 will boot successfully.

The issue with large config.txt has been reported to related
projects:
raspberrypi/firmware#1848
Evilpaul/RPi-config#9

This work was sponsored by GOVCERT.LU.

Signed-off-by: Leon Anavi <[email protected]>
floion pushed a commit to floion/meta-raspberrypi that referenced this issue Dec 6, 2023
Remove some comments to reduce config.txt file size to avoid file
corruption and make sure Raspberry Pi 5 will boot successfully.

The issue with large config.txt has been reported to related
projects:
raspberrypi/firmware#1848
Evilpaul/RPi-config#9

This work was sponsored by GOVCERT.LU.

Signed-off-by: Leon Anavi <[email protected]>
floion pushed a commit to floion/meta-raspberrypi that referenced this issue Dec 7, 2023
Remove some comments to reduce config.txt file size to avoid file
corruption and make sure Raspberry Pi 5 will boot successfully.

The issue with large config.txt has been reported to related
projects:
raspberrypi/firmware#1848
Evilpaul/RPi-config#9

This work was sponsored by GOVCERT.LU.

Signed-off-by: Leon Anavi <[email protected]>
floion pushed a commit to floion/meta-raspberrypi that referenced this issue Dec 11, 2023
Remove some comments to reduce config.txt file size to avoid file
corruption and make sure Raspberry Pi 5 will boot successfully.

The issue with large config.txt has been reported to related
projects:
raspberrypi/firmware#1848
Evilpaul/RPi-config#9

This work was sponsored by GOVCERT.LU.

Signed-off-by: Leon Anavi <[email protected]>
gportay added a commit to gportay/meta-raspberrypi that referenced this issue Dec 14, 2023
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 added a commit to gportay/meta-raspberrypi that referenced this issue Dec 14, 2023
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 added a commit to gportay/meta-raspberrypi that referenced this issue Dec 14, 2023
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]>
floion pushed a commit to floion/meta-raspberrypi that referenced this issue Dec 15, 2023
Remove some comments to reduce config.txt file size to avoid file
corruption and make sure Raspberry Pi 5 will boot successfully.

The issue with large config.txt has been reported to related
projects:
raspberrypi/firmware#1848
Evilpaul/RPi-config#9

This work was sponsored by GOVCERT.LU.

Signed-off-by: Leon Anavi <[email protected]>
leon-anavi added a commit to leon-anavi/meta-raspberrypi-1 that referenced this issue Jan 2, 2024
Remove some comments to reduce config.txt file size to avoid file
corruption and make sure Raspberry Pi 5 will boot successfully.

The issue with large config.txt has been reported to related
projects:
raspberrypi/firmware#1848
Evilpaul/RPi-config#9

This work was sponsored by GOVCERT.LU.

Signed-off-by: Leon Anavi <[email protected]>
floion pushed a commit to floion/meta-raspberrypi that referenced this issue Jan 4, 2024
Remove some comments to reduce config.txt file size to avoid file
corruption and make sure Raspberry Pi 5 will boot successfully.

The issue with large config.txt has been reported to related
projects:
raspberrypi/firmware#1848
Evilpaul/RPi-config#9

This work was sponsored by GOVCERT.LU.

Signed-off-by: Leon Anavi <[email protected]>
kraj pushed a commit to floion/meta-raspberrypi that referenced this issue Jan 21, 2024
Remove some comments to reduce config.txt file size to avoid file
corruption and make sure Raspberry Pi 5 will boot successfully.

The issue with large config.txt has been reported to related
projects:
raspberrypi/firmware#1848
Evilpaul/RPi-config#9

This work was sponsored by GOVCERT.LU.

Signed-off-by: Leon Anavi <[email protected]>
agherzan pushed a commit to agherzan/meta-raspberrypi that referenced this issue Jan 25, 2024
Remove some comments to reduce config.txt file size to avoid file
corruption and make sure Raspberry Pi 5 will boot successfully.

The issue with large config.txt has been reported to related
projects:
raspberrypi/firmware#1848
Evilpaul/RPi-config#9

This work was sponsored by GOVCERT.LU.

Signed-off-by: Leon Anavi <[email protected]>
daregit pushed a commit to daregit/yocto-combined that referenced this issue May 22, 2024
Remove some comments to reduce config.txt file size to avoid file
corruption and make sure Raspberry Pi 5 will boot successfully.

The issue with large config.txt has been reported to related
projects:
raspberrypi/firmware#1848
Evilpaul/RPi-config#9

This work was sponsored by GOVCERT.LU.

Signed-off-by: Leon Anavi <[email protected]>
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

No branches or pull requests

2 participants