diff options
| author | Serge Schneider <serge@raspberrypi.com> | 2024-10-29 15:32:15 +0000 |
|---|---|---|
| committer | Serge Schneider <serge@raspberrypi.com> | 2024-10-29 15:32:19 +0000 |
| commit | df6d0e2a25d920aa32f8f90fe7662ba8b98d2e4a (patch) | |
| tree | 2823209d5ff452da3b158d9d73e1108a86427286 | |
| parent | 2aa7133eea9d20721db43e00e3307a707d5eea49 (diff) | |
Add kernel page size check
| -rwxr-xr-x | build.sh | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -260,6 +260,13 @@ if ! arch-test -n "$ARCH"; then echo "WARNING: Only a native build environment is supported. Checking emulated support..." if ! arch-test "$ARCH"; then echo "No fallback mechanism found. Ensure your OS has binfmt_misc support enabled and configured." + PAGESIZE=$(getconf PAGESIZE) + if [ "$ARCH" == "armhf" ] && [ "$PAGESIZE" != "4096" ]; then + echo + echo "Building an $ARCH image requires a kernel with a 4k page size" + echo "Current pagesize: $PAGESIZE" + echo "On Raspberry Pi OS, you can switch to a suitable kernel by adding kernel=kernel8.img to /boot/firmware/config.txt and rebooting" + fi exit 1 fi fi |
