From 259b41333e0e3343e2694f2779aa7960863b0911 Mon Sep 17 00:00:00 2001 From: xugro <82907135+xugro@users.noreply.github.com> Date: Sun, 5 Jan 2025 08:20:03 +0300 Subject: [PATCH] detect architecture and give error if running on reMarkable paper pro (#933) * detect architecture and give error if running on an unsupported architecture --------- Co-authored-by: Nathaniel van Diepen --- scripts/bootstrap/bootstrap | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/scripts/bootstrap/bootstrap b/scripts/bootstrap/bootstrap index 15da30019..71691c1d0 100755 --- a/scripts/bootstrap/bootstrap +++ b/scripts/bootstrap/bootstrap @@ -20,6 +20,20 @@ if [ -z "$BASH" ] || [[ "$(ps | awk '$1=='$$' { n=split($5,a,"/"); print a[n] }' exit 1 fi +arch="" +case "$(uname -m)" in + "armv7l") + arch="armv7sf-k3.2" + ;; + #"aarch64) + # arch="aarch64-k3.10" + # ;; + *) + echo "Unsupported device architecture" + exit 1 + ;; +esac + set -eEuo pipefail # Path to the temporary local wget and Opkg binaries @@ -33,7 +47,7 @@ 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}" +entware_remote="${entware_remote:-https://bin.entware.net/$arch/installer}" toltec_remote="${toltec_remote:-https://toltec-dev.org/$toltec_branch/rmall}" # Remove all temporary files