Skip to content

Commit

Permalink
detect architecture and give error if running on reMarkable paper pro
Browse files Browse the repository at this point in the history
  • Loading branch information
xugro committed Dec 21, 2024
1 parent 66c02ec commit 0a81080
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions scripts/bootstrap/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,27 @@ if [ -z "$BASH" ] || [[ "$(ps | awk '$1=='$$' { n=split($5,a,"/"); print a[n] }'
exit 1
fi

arch=""
device=""
unam="$(uname -m)"

if [ "$unam" = "armv7l" ]; then
arch="armv7sf-k3.2"
device="rmall" #rmall is only rm1 and rm2 to keep compatibility with older toltec versions
fi

if [ "$unam" = "aarch64" ]; then
arch="aarch64-k3.10"
device="rmpp"
echo "The reMarkable Paper Pro is not yet supported!"
exit 1
fi

if [ -z "$arch" ]; then
echo "Device architecture not recognised."
exit 1
fi

set -eEuo pipefail

# Path to the temporary local wget and Opkg binaries
Expand All @@ -33,8 +54,8 @@ toltecctl_path="${toltecctl_path:-/home/root/.local/bin/toltecctl}"
toltec_branch="${toltec_branch:-stable}"

# Base URLs for bootstrapping from the Entware and Toltec repositories
entware_remote="${entware_remote:-https://bin.entware.net/armv7sf-k3.2/installer}"
toltec_remote="${toltec_remote:-https://toltec-dev.org/$toltec_branch/rmall}"
entware_remote="${entware_remote:-https://bin.entware.net/$arch/installer}"
toltec_remote="${toltec_remote:-https://toltec-dev.org/$toltec_branch/$device}"

# Remove all temporary files
cleanup() {
Expand Down

0 comments on commit 0a81080

Please sign in to comment.