aboutsummaryrefslogtreecommitdiff
path: root/distro
diff options
context:
space:
mode:
Diffstat (limited to 'distro')
-rwxr-xr-xdistro/_ubuntu_arm64_box86.sh71
-rwxr-xr-xdistro/ubuntu.sh29
2 files changed, 100 insertions, 0 deletions
diff --git a/distro/_ubuntu_arm64_box86.sh b/distro/_ubuntu_arm64_box86.sh
new file mode 100755
index 0000000..85f9bfa
--- /dev/null
+++ b/distro/_ubuntu_arm64_box86.sh
@@ -0,0 +1,71 @@
+#!/bin/sh
+set -ex
+# Automatically install box86/box64 on ARM64 SBCs
+# Largely based on:
+# https://github.com/ptitSeb/box86/blob/master/docs/COMPILE.md
+codedir="$HOME/scm/pub"
+box86dir="$codedir/box86"
+box64dir="$codedir/box64"
+winedir="$HOME/wine"
+
+if false ; then
+
+if [ "$(uname -m)" = "aarch64" ] ; then
+sudo dpkg --add-architecture armhf
+sudo apt update
+sudo apt install -y libc6:armhf
+sudo apt install -y gcc-arm-linux-gnueabihf
+# sudo apt install libc6-dev-armhf-cross # Might need if you get crt1.o errors
+fi
+
+fi # end if false
+
+cmakeflags=""
+makeopts=""
+_system="$(cat /sys/firmware/devicetree/base/model)"
+echo "Found '$_system'..."
+case $_system in
+ Orange\ Pi\ 5\ Plus) cmakeflags="-DRK3588=1"; makeopts="-j4"; ;;
+ *) echo "Unknown system, please add it"; exit 1; ;;
+esac
+
+if ! [ -d "$box86dir" ] ; then
+ git clone https://github.com/ptitSeb/box86 "$box86dir"
+fi
+cd "$box86dir"; mkdir -p build; cd -; cd "$box86dir"/build
+cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo $cmakeflags
+make $makeopts
+sudo make install
+sudo systemctl restart systemd-binfmt
+
+
+# Now for box64
+# https://github.com/ptitSeb/box64/blob/main/docs/COMPILE.md
+
+if ! [ -d "$box64dir" ] ; then
+ git clone https://github.com/ptitSeb/box64 "$box64dir"
+fi
+cd "$box64dir"; mkdir -p build; cd -; cd "$box64dir"/build
+cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo $cmakeflags
+make $makeopts
+sudo make install
+sudo systemctl restart systemd-binfmt
+
+
+# Now for wine32 and wine64...
+# https://github.com/ptitSeb/box86/blob/master/docs/X86WINE.md
+# https://github.com/ptitSeb/box64/blob/main/docs/X64WINE.md
+# TODO, finish this part...
+
+mkdir -p "$winedir"
+x86winever="PlayOnLinux-wine-9.0-upstream-linux-x86"
+x86winedest="$winedir/${x86winever}.tar.gz"
+if ! [ -e "$x86winedest" ] ; then
+ wget -O "$x86winedest" \
+ "https://www.playonlinux.com/wine/binaries/phoenicis/upstream-linux-x86/$x86winever.tar.gz"
+fi
+
+if sha256sum "$x86winedest" | grep -q 2c99f45688eeb75a9c28303223edcede700ed2b1 ; then
+ echo "Failed to verify x86 wine package, exiting"
+ exit 1
+fi
diff --git a/distro/ubuntu.sh b/distro/ubuntu.sh
index 17916ce..e80ab9f 100755
--- a/distro/ubuntu.sh
+++ b/distro/ubuntu.sh
@@ -2,6 +2,15 @@
set -ex
nvimdir="$HOME/scm/pub/neovim-nvim"
+sudo apt update
+
+# arm64/rockchip
+case "$(uname -r)" in
+*rockchip)
+sudo apt install -y cryptsetup vlc zram-config
+;;
+esac
+
sudo apt install -y \
btop \
curl \
@@ -17,6 +26,8 @@ sudo apt install -y \
scdaemon \
tmux \
vim \
+ wl-clipboard \
+
sudo apt build-dep -y neovim
@@ -28,3 +39,21 @@ rm -rf build || echo ""
make CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=$HOME/.local" -j"$(nproc)"
make install
cd -
+
+if echo "$XDG_CURRENT_DESKTOP" | grep -qi gnome ; then
+ sudo apt install -y \
+ gnome-tweaks flatpak gnome-software-plugin-flatpak
+
+ chksum="dbf3f104767455a7a3d16608a515e0888661782abee372a443e23cebca63239c"
+ commit=4a90c70fa68641ed34a9a4b892064bb51b276b06
+ tmpf="$(mktemp)"
+ trap "rm -f $tmpf" EXIT INT
+ curl https://raw.githubusercontent.com/nordtheme/gnome-terminal/$commit/src/nord.sh \
+ > "$tmpf"
+ if sha256sum "$tmpf" | grep -qi "$chksum"; then
+ bash "$tmpf"
+ else
+ echo "bad checksum"
+ fi
+
+fi