-
Notifications
You must be signed in to change notification settings - Fork 1
/
build_asuswrt-mips.sh
executable file
·34 lines (22 loc) · 1.47 KB
/
build_asuswrt-mips.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
#! /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 copy of this repo
PATH="$PATH:$ASUSWRT_REPO_DIR/tools/brcm/hndtools-mipsel-uclibc/bin:$ASUSWRT_REPO_DIR/tools/brcm/hndtools-mipsel-linux/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
patch -i $ASUSWRT_PATCHES_DIR/mksquashfs.c.patch $ASUSWRT_REPO_DIR/release/src-rt/linux/linux-2.6/scripts/squashfs/mksquashfs.c
## 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 && make rt-n16 ## for rt-n16 do not start with rt-n66u from src-rt!
cd release/src-rt-6.x && make rt-ac66u ## for rt-ac66u
#cd release/src-rt-6.x && make rt-n66u ## for rt-n66u