Skip to content

Commit

Permalink
switch incompatible apps to use 4K kernel
Browse files Browse the repository at this point in the history
  • Loading branch information
theofficialgman committed Oct 21, 2023
1 parent 9cd73f1 commit 57da186
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
14 changes: 14 additions & 0 deletions apps/Geekbench 6/install-64
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

version=6.2.1

# https://github.com/raspberrypi/bookworm-feedback/issues/107
PAGE_SIZE="$(getconf PAGE_SIZE)"
if [[ "$PAGE_SIZE" == "16384" ]]; then
#switch to 4K pagesize kernel
if [ -f /boot/config.txt ]; then
echo "[pi5]" | sudo tee --append /boot/config.txt >/dev/null
echo "kernel=kernel8.img" | sudo tee --append /boot/config.txt >/dev/null
echo -e "The 4K PageSize Kernel has been enabled by adding 'kernel=kernel8.img' to /boot/config.txt\nPlease reboot and install the Geekbench6 app again."
sleep infinity
else
error "User error (reporting allowed): Your current running kernel is build with 16K PageSize and is incompatible with Geekbench6. Changing kernels automatically cannot be done since no /boot/config.txt file was found."
fi
fi

wget -O /tmp/Geekbench6.tar.gz https://cdn.geekbench.com/Geekbench-${version}-LinuxARMPreview.tar.gz
tar -xf /tmp/Geekbench6.tar.gz -C /tmp || error "Failed to extract files!"
rm -f /tmp/Geekbench6.tar.gz ./Geekbench6.tar.gz
Expand Down
14 changes: 14 additions & 0 deletions apps/QEMU/install-64
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
#!/bin/bash

# https://github.com/raspberrypi/bookworm-feedback/issues/107
PAGE_SIZE="$(getconf PAGE_SIZE)"
if [[ "$PAGE_SIZE" == "16384" ]]; then
#switch to 4K pagesize kernel
if [ -f /boot/config.txt ]; then
echo "[pi5]" | sudo tee --append /boot/config.txt >/dev/null
echo "kernel=kernel8.img" | sudo tee --append /boot/config.txt >/dev/null
echo -e "The 4K PageSize Kernel has been enabled by adding 'kernel=kernel8.img' to /boot/config.txt\nPlease reboot and install the QEMU app again."
sleep infinity
else
error "User error (reporting allowed): Your current running kernel is build with 16K PageSize and is incompatible with QEMU. Changing kernels automatically cannot be done since no /boot/config.txt file was found."
fi
fi

if [[ "$(get_codename)" == "buster" ]]; then
#Remove any qemu packages first to prevent conflicting packages
apt_lock_wait
Expand Down
15 changes: 15 additions & 0 deletions apps/Wine (x64)/install-64
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
#note to maintainer, if you change the below version make sure to update it in the uninstall script as well
version=8.17

# https://github.com/raspberrypi/bookworm-feedback/issues/107
PAGE_SIZE="$(getconf PAGE_SIZE)"
if [[ "$PAGE_SIZE" == "16384" ]]; then
#switch to 4K pagesize kernel
if [ -f /boot/config.txt ]; then
echo "[pi5]" | sudo tee --append /boot/config.txt >/dev/null
echo "kernel=kernel8.img" | sudo tee --append /boot/config.txt >/dev/null
"${DIRECTORY}/manage" uninstall "Box64"
echo -e "The 4K PageSize Kernel has been enabled by adding 'kernel=kernel8.img' to /boot/config.txt\nPlease reboot and install the Wine (x64) app again."
sleep infinity
else
error "User error (reporting allowed): Your current running kernel is build with 16K PageSize and is incompatible with Wine (x64) with Box64. Changing kernels automatically cannot be done since no /boot/config.txt file was found."
fi
fi

#install box64
"${DIRECTORY}/manage" install-if-not-installed Box64 || error "Box64 failed to install somehow!"
if ! command -v box64 >/dev/null ;then
Expand Down

0 comments on commit 57da186

Please sign in to comment.