blob: d7633f98ac169812e12abfd3af59740c846d1141 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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="${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
|