-
Notifications
You must be signed in to change notification settings - Fork 1
/
build_asuswrt-arm.sh
executable file
·30 lines (20 loc) · 1.2 KB
/
build_asuswrt-arm.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
#! /bin/sh
ASUSWRT_REPO_DIR=$HOME/asuswrt-merlin ## path to your local "Asuswrt-Merlin_John_fork" repo
ASUSWRT_PATCHES_DIR=$HOME/Artix_asuswrt ## path to your local "Artix_Asuswrt-Merlin_John_fork" repo
PATH="$PATH:$ASUSWRT_REPO_DIR/release/src-rt-6.x.4708/toolchains/hndtools-arm-linux-2.6.36-uclibc-4.5.3/bin"
cd $ASUSWRT_REPO_DIR
git clean -dxf
git reset --hard
#git pull
git checkout 374.43_2-update
## patch because of newer awk in Artix; Makefile.in need to be patched not Makefile.am (not used)!
patch -p1 -d$ASUSWRT_REPO_DIR/release/src/router/libgpg-error-1.10 < $ASUSWRT_PATCHES_DIR/libgpg-error.patch
## if Makefile.in exists, autotools insists on automake 1.15, without Makefile.in it uses existing host version of automake
rm -f $ASUSWRT_REPO_DIR/release/src/router/wget/Makefile.in
patch -i $ASUSWRT_PATCHES_DIR/Makefile.patch $ASUSWRT_REPO_DIR/release/src/router/Makefile
## needed for gcc 10
patch -p1 -d$ASUSWRT_REPO_DIR/release/src/router/config < $ASUSWRT_PATCHES_DIR/config_gcc10.patch
## needed for autoconf2.70
patch -i $ASUSWRT_PATCHES_DIR/libxml2_configure.in.patch $ASUSWRT_REPO_DIR/release/src/router/libxml2/configure.in
cd release/src-rt-6.x.4708
time make rt-ac56u ## e.g. for ac56u