Skip to content

Commit 5e6d144

Browse files
committed
feat: disable 32bit enforcement on arm64
1 parent 63a864c commit 5e6d144

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

scripts/00-enforce-32bit-kernel

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,20 @@ export LC_ALL=C
66
source /common.sh
77
install_cleanup_trap
88

9+
env
10+
11+
# if we are building on a 64bit image, no need to do anything
12+
if [ "$EDITBASE_ARCH" == "aarch64" ] || [ "$EDITBASE_ARCH" == "arm64" ]; then
13+
exit 0
14+
fi
15+
916
## Taken from https://github.com/piwheels/piwheels/commit/63f2ac1f24ece782627dc47e9519f98222b27490
1017

1118
# Enforce 32-bit kernel as the 64-bit kernel is used by default (also on RPi OS 32-bit) since RPi Linux 6.1
12-
if [ -f /boot/config.txt ]; then
13-
sed -i '/^[[:blank:]]*arm_64bit=/d' /boot/config.txt # remove setting first
14-
sed -i '1iarm_64bit=0' /boot/config.txt # readd setting to top of file to assure it is effective on all RPi models
19+
CONFIG=$BOOT_PATH/config.txt
20+
if [ -f $CONFIG ]; then
21+
sed -i '/^[[:blank:]]*arm_64bit=/d' $CONFIG # remove setting first
22+
sed -i '1iarm_64bit=0' $CONFIG # readd setting to top of file to assure it is effective on all RPi models
1523
else
16-
echo 'arm_64bit=0' > /boot/config.txt
24+
echo 'arm_64bit=0' > $CONFIG
1725
fi

0 commit comments

Comments
 (0)