-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbox64.sh
47 lines (42 loc) · 1.1 KB
/
box64.sh
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
#!/bin/bash
if [[ -z "$ARM64_DEVICE" ]]; then
echo "ARM64_DEVICE environment variable is not set, using generic Box64 build."
fi
export BOX64_ROLLING_LOG=1
# Define the path to binaries based on the ARM64_DEVICE environment variable
case $ARM64_DEVICE in
rpi5)
BINARY_PATH="/usr/local/bin/box64-rpi5"
;;
rpi5_16k)
BINARY_PATH="/usr/local/bin/box64-rpi5-16k"
;;
rpi4)
BINARY_PATH="/usr/local/bin/box64-rpi4"
;;
rpi4-pre3)
BINARY_PATH="/usr/local/bin/box64-rpi4-0_2_7"
;;
rpi3)
BINARY_PATH="/usr/local/bin/box64-rpi3"
;;
rk3588)
BINARY_PATH="/usr/local/bin/box64-rk3588"
;;
m1)
BINARY_PATH="/usr/local/bin/box64-m1"
;;
adlink)
BINARY_PATH="/usr/local/bin/box64-adlink"
;;
*)
BINARY_PATH="/usr/local/bin/box64-generic"
;;
esac
# Check if the box64 exists
if [[ ! -f $BINARY_PATH ]]; then
echo "Error: Box64 file '$BINARY_PATH' not found for architecture '$ARM64_DEVICE'."
exit 1
fi
# Pass all arguments to box64
"$BINARY_PATH" "$@"