diff options
| author | Serge Schneider <serge@raspberrypi.com> | 2024-10-30 11:33:22 +0000 |
|---|---|---|
| committer | Serge Schneider <serge@raspberrypi.com> | 2024-10-30 11:33:22 +0000 |
| commit | ccc23c6738915e57485a7606b777556a36e26892 (patch) | |
| tree | ab0937b880b825c99012bd333f0ffda454faf085 | |
| parent | 150246acda0b29dcdeed865f7ec0e82602774aef (diff) | |
| parent | 9dbd88221cdc7fa074242eca580d367758fd9023 (diff) | |
Merge branch 'master' into arm64
| -rw-r--r-- | README.md | 5 | ||||
| -rwxr-xr-x | build.sh | 20 |
2 files changed, 17 insertions, 8 deletions
@@ -6,6 +6,9 @@ which was in turn derived from the Raspbian project. **Note**: Raspberry Pi OS 32 bit images are based primarily on Raspbian, while Raspberry Pi OS 64 bit images are based primarily on Debian. +**Note**: 32 bit images should be built from the `master` branch. +64 bit images should be built from the `arm64` branch. + ## Dependencies pi-gen runs on Debian-based operating systems released after 2017, and we @@ -152,7 +155,7 @@ The following environment variables are supported: * `TIMEZONE_DEFAULT` (Default: 'Europe/London' ) - Default keyboard layout. + Default time zone. To get the current value from a running system, look in `/etc/timezone`. @@ -255,18 +255,24 @@ trap term EXIT INT TERM dependencies_check "${BASE_DIR}/depends" + +PAGESIZE=$(getconf PAGESIZE) +if [ "$ARCH" == "armhf" ] && [ "$PAGESIZE" != "4096" ]; then + echo + echo "ERROR: Building an $ARCH image requires a kernel with a 4k page size (current: $PAGESIZE)" + echo "On Raspberry Pi OS (64-bit), you can switch to a suitable kernel by adding the following to /boot/firmware/config.txt and rebooting:" + echo + echo "kernel=kernel8.img" + echo "initramfs initramfs8 followkernel" + echo + exit 1 +fi + echo "Checking native $ARCH executable support..." 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 |
