Skip to content

Commit d0e4387

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 d4ec644 commit d0e4387

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
@@ -351,6 +351,12 @@ do_deploy:append() {
351351
if grep -q -E '^.{80}.$' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt; then
352352
bbwarn "config.txt contains lines longer than 80 characters, this is not supported"
353353
fi
354+
355+
# Warn about too big file!
356+
size=$(stat -c '%s' $CONFIG)
357+
if [ "$size" -gt 16384 ]; then
358+
bbfatal "config.txt larger than 16k is not necessarily supported"
359+
fi
354360
}
355361
do_deploy[vardeps] += "${RPI_CONFIG_STRIP}"
356362

0 commit comments

Comments
 (0)