Skip to content

Commit 389aea0

Browse files
committed
Enforce 32bit kernel
1 parent 7fac47f commit 389aea0

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and provides the resulting image ready to flash. Checkout the [releases](https:/
99

1010
A bunch of simple update scripts are run via [CustoPiZer](https://github.com/OctoPrint/CustoPiZer):
1111

12+
* `00-enforce-32bit-kernel`: Ensures only 32bit kernels are installed (since RPi kernel 6.1 64bit will be installed even on 32bit)
1213
* `01-update-octoprint`: Updates OctoPrint to the latest version
1314
* `02-update-boot`: Updates bootloader and kernel to the latest version
1415
* `03-update-libcamera-apps`: Updates the the libcamera apps to the latest version

scripts/00-enforce-32bit-kernel

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
set -x
2+
set -e
3+
4+
export LC_ALL=C
5+
6+
source /common.sh
7+
install_cleanup_trap
8+
9+
## Taken from https://github.com/piwheels/piwheels/commit/63f2ac1f24ece782627dc47e9519f98222b27490
10+
11+
# 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
15+
else
16+
echo 'arm_64bit=0' > /boot/config.txt
17+
fi

0 commit comments

Comments
 (0)