Skip to content

Commit

Permalink
Enforce 32bit kernel
Browse files Browse the repository at this point in the history
  • Loading branch information
foosel committed May 4, 2023
1 parent 7fac47f commit 389aea0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and provides the resulting image ready to flash. Checkout the [releases](https:/

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

* `00-enforce-32bit-kernel`: Ensures only 32bit kernels are installed (since RPi kernel 6.1 64bit will be installed even on 32bit)
* `01-update-octoprint`: Updates OctoPrint to the latest version
* `02-update-boot`: Updates bootloader and kernel to the latest version
* `03-update-libcamera-apps`: Updates the the libcamera apps to the latest version
Expand Down
17 changes: 17 additions & 0 deletions scripts/00-enforce-32bit-kernel
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
set -x
set -e

export LC_ALL=C

source /common.sh
install_cleanup_trap

## Taken from https://github.com/piwheels/piwheels/commit/63f2ac1f24ece782627dc47e9519f98222b27490

# Enforce 32-bit kernel as the 64-bit kernel is used by default (also on RPi OS 32-bit) since RPi Linux 6.1
if [ -f /boot/config.txt ]; then
sed -i '/^[[:blank:]]*arm_64bit=/d' /boot/config.txt # remove setting first
sed -i '1iarm_64bit=0' /boot/config.txt # readd setting to top of file to assure it is effective on all RPi models
else
echo 'arm_64bit=0' > /boot/config.txt
fi

0 comments on commit 389aea0

Please sign in to comment.