forked from RMerl/asuswrt-merlin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build24.sh
executable file
·69 lines (50 loc) · 2.32 KB
/
build24.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#########################################################################
# Toolchain Build Script #
#########################################################################
ROOTDIR=$PWD
GCCVER1=3.4.6
TARGETDIR1=hndtools-mipsel-uclibc-${GCCVER1}
DESTDIR1=/opt/brcm/${TARGETDIR1}
GCCVER2=4.2.4
TARGETDIR2=hndtools-mipsel-uclibc-${GCCVER2}
DESTDIR2=/opt/brcm/${TARGETDIR2}
make -C ../release/src prepk
#########################################################################
cd $ROOTDIR
rm -f .config
ln -sf config.2.4-${GCCVER1} .config
make clean; make dirclean; make V=99
cd $DESTDIR1/bin
ln -nsf mipsel-linux-uclibc-gcc-${GCCVER1} mipsel-linux-uclibc-gcc
ln -nsf mipsel-linux-uclibc-gcc-${GCCVER1} mipsel-linux-gcc-${GCCVER1}
ln -nsf mipsel-linux-uclibc-gcc-${GCCVER1} mipsel-uclibc-gcc-${GCCVER1}
#########################################################################
cd $ROOTDIR
rm -f .config
ln -sf config.2.4-${GCCVER2} .config
make clean; make dirclean; make V=99
cd $DESTDIR2/bin
ln -nsf mipsel-linux-uclibc-gcc-${GCCVER2} mipsel-linux-uclibc-gcc
ln -nsf mipsel-linux-uclibc-gcc-${GCCVER2} mipsel-linux-gcc-${GCCVER2}
ln -nsf mipsel-linux-uclibc-gcc-${GCCVER2} mipsel-uclibc-gcc-${GCCVER2}
#########################################################################
mv -f ${DESTDIR1}/bin/mipsel-linux-uclibc-gcc-${GCCVER1} ${DESTDIR2}/bin/
mv -f ${DESTDIR1}/include/c++/${GCCVER1} ${DESTDIR2}/include/c++/
mv -f ${DESTDIR1}/lib/gcc/mipsel-linux-uclibc/${GCCVER1} ${DESTDIR2}/lib/gcc/mipsel-linux-uclibc/
mv -f ${DESTDIR1}/libexec/gcc/mipsel-linux-uclibc/${GCCVER1} ${DESTDIR2}/libexec/gcc/mipsel-linux-uclibc/
mv -f ${DESTDIR1}/info/cppinternals.info ${DESTDIR2}/info/
mv -f ${DESTDIR1}/info/gccint.info ${DESTDIR2}/info/
cd $DESTDIR2/bin
ln -nsf mipsel-linux-uclibc-gcc-${GCCVER1} mipsel-linux-gcc-${GCCVER1}
ln -nsf mipsel-linux-uclibc-gcc-${GCCVER1} mipsel-uclibc-gcc-${GCCVER1}
#########################################################################
cd /opt/brcm
rm -f hndtools-mipsel-linux
rm -f hndtools-mipsel-uclibc
mkdir -p K24
rm -rf K24/hndtools-mipsel-uclibc-${GCCVER2}
mv -f hndtools-mipsel-uclibc-${GCCVER2} K24/
ln -nsf K24/hndtools-mipsel-uclibc-${GCCVER2} hndtools-mipsel-linux
ln -nsf K24/hndtools-mipsel-uclibc-${GCCVER2} hndtools-mipsel-uclibc
rm -rf ${DESTDIR1}
cd $ROOTDIR