-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathbuild_RG351.sh
executable file
·42 lines (34 loc) · 1.11 KB
/
build_RG351.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
#!/bin/env bash
TOOLCHAIN_DIR="$HOME"/Dev/351ELEC/build.351ELEC-RG351V.aarch64/toolchain
VERSION="$1"
set -eE
# $1: DEVICE
# $2: FIRMWARE
# $3: START_PATH
# $4: RES_PATH
build351Files() {
DEVICE="$1"
FIRMWARE="$2"
START_PATH="$3"
RES_PATH="$4"
make clean
make CC="$TOOLCHAIN_DIR"/bin/aarch64-libreelec-linux-gnueabi-g++ DEVICE="$DEVICE" SDL2_CONFIG="$TOOLCHAIN_DIR"/aarch64-libreelec-linux-gnueabi/sysroot/usr/bin/sdl2-config START_PATH="$START_PATH" RES_PATH="$RES_PATH"
"$TOOLCHAIN_DIR"/aarch64-libreelec-linux-gnueabi/bin/strip 351Files
mkdir -p build/351Files
cp -r 351Files README.md res build/351Files
cp launchers/"$FIRMWARE"/351Files.sh build
cd build
tar zcf 351Files-"$VERSION"_"$DEVICE"_"$FIRMWARE".tgz 351Files.sh 351Files
rm -rf 351Files.sh 351Files
cd ..
}
# Clean up previous builds
rm -rf build
# Build for 351V, 351ELEC
build351Files RG351V 351ELEC /storage/roms ./res
# Build for 351P, 351ELEC
build351Files RG351P 351ELEC /storage/roms ./res
# Build for 351V, ArkOS
build351Files RG351V ArkOS /roms ./res
# Build for 351P, ArkOS
build351Files RG351P ArkOS /roms ./res