-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathprepare-openwrt-a31.sh
executable file
·39 lines (30 loc) · 1.04 KB
/
prepare-openwrt-a31.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
#!/bin/bash
#
# (C) 2024 Hajo Noerenberg
#
# http://www.noerenberg.de/
# https://github.com/hn/linkplay-a31
#
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
if [ ! -d ./target/linux/ramips/dts ]; then
echo "Change to OpenWrt source dir!" >&2
exit 1
fi
echo "Adding Linkplay A31 SoM support to OpenWrt"
# Kernel support
cp -v -n $SCRIPT_DIR/mt7628an_linkplay_a31.dts ./target/linux/ramips/dts/
patch -p1 < $SCRIPT_DIR/mt7628an_linkplay_a31-mk.diff
cp -v $SCRIPT_DIR/defconfig .config
# I2S crash workaround
cp -v -n $SCRIPT_DIR/836-mt7688-i2s-audio-crash-workaround.patch ./target/linux/ramips/patches-5*/
# Linkplay sound control daemon
cp -v -r -n $SCRIPT_DIR/linkplay-emu ./package/
# Shairport-sync mixer name
patch -p1 < $SCRIPT_DIR/shairport-sync-config.diff
# System config
cp -v -r -n $SCRIPT_DIR/files/ ./
# Additionally generate web firmware
if [ "$1" = "-fw" ]; then
cp -v -n $SCRIPT_DIR/842-linkplay-os-workaround.patch ./target/linux/ramips/patches-5*/
patch -p1 < $SCRIPT_DIR/linkplay-firmware-bin.diff
fi