Skip to content

Commit a61e6d9

Browse files
committed
rpi-config: warn on config.txt exceeding 16k
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]>
1 parent 836d83d commit a61e6d9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

recipes-bsp/bootfiles/rpi-config_git.bb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,12 @@ do_deploy:append() {
341341
if grep -q -E '^.{80}.$' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt; then
342342
bbwarn "config.txt contains lines longer than 80 characters, this is not supported"
343343
fi
344+
345+
# Warn about too big file!
346+
size=$(stat -c '%s' $CONFIG)
347+
if [ "$size" -gt 16384 ]; then
348+
bbfatal "config.txt larger than 16k is not necessarily supported"
349+
fi
344350
}
345351
do_deploy[vardeps] += "${RPI_CONFIG_STRIP}"
346352

0 commit comments

Comments
 (0)