Skip to content
This repository has been archived by the owner on Oct 9, 2022. It is now read-only.

Commit

Permalink
2020 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
liuqiuhui2015 committed May 1, 2020
1 parent 9a4d262 commit 96ab472
Show file tree
Hide file tree
Showing 5,209 changed files with 517,415 additions and 277,417 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
7 changes: 4 additions & 3 deletions scripts/install_Opt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ echo "-------------COPY-FILES---------------"

if [ -d "$ROOTDIR/trunk/user/" ] ; then

# cleaning before bump openvpn to 2.4.5, nfs-utils to 2.3.1, wpa_supplicant to 2.6, dnsmasq to 2.80, libxml2 to 2.9.8, libcurl to 7.62.0.
# cleaning before bump openvpn to 2.4.5, nfs-utils to 2.4.3, wpa_supplicant to 2.6, dnsmasq to 2.81, libxml2 to 2.9.10, libcurl to 7.70.0, dropbear to 2019.78.
rm -fr "$DESTDIR/trunk/user/openvpn/openvpn-2.4.x/"
rm -fr "$DESTDIR/trunk/user/nfsd/nfs-utils-1.2.3/"
rm -fr "$DESTDIR/trunk/user/wpa_supplicant/"
rm -fr "$DESTDIR/trunk/user/dropbear/dropbear-201X.XX/"
rm -fr "$DESTDIR/trunk/user/dnsmasq/"
rm -fr "$DESTDIR/trunk/libs/libxml2/"
rm -fr "$DESTDIR/trunk/libs/libcurl/"
Expand Down Expand Up @@ -57,8 +58,8 @@ if [ -f "$ROOTDIR/trunk/versions.inc" ] ; then
cp -fv "$ROOTDIR/trunk/versions.inc" "$DESTDIR/trunk/"
fi

if [ -d "$ROOTDIR/trunk/tools/mksquash_xz-4.0/" ] ; then
cp -fRv "$ROOTDIR/trunk/tools/mksquash_xz-4.0/" "$DESTDIR/trunk/tools/"
if [ -d "$ROOTDIR/trunk/tools/" ] ; then
cp -fRv "$ROOTDIR/trunk/tools/" "$DESTDIR/trunk/"
fi

if [ -d "$ROOTDIR/trunk/user/busybox/busybox-1.24.x/scripts/kconfig/" ] ; then
Expand Down
2 changes: 1 addition & 1 deletion scripts/rebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ chmod a+x scripts/*.sh
bash scripts/install_Opt.sh

cd ..
pypy $pname/tools/redirectOptimize.py rt-n56u O2 O3
python3 $pname/tools/redirectOptimize.py rt-n56u O2 O3

cd rt-n56u/trunk
bash ../../$pname/scripts/rebuild_core.sh
Expand Down
14 changes: 7 additions & 7 deletions toolchain-mipsel/build_toolchain_O3
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ if [ "$DO_UNPACK" = "YES" ]; then
[ -f ${i} ] && patch -p1 < ${i}
done
cd ..
pypy /media/Storage/workspace/router/TMRAF/tools/redirectOptimize.py /media/Storage/workspace/router/rt-n56u/toolchain-mipsel/ O2 O3
python3 /media/Storage/workspace/router/TMRAF/tools/redirectOptimize.py /media/Storage/workspace/router/rt-n56u/toolchain-mipsel/ O2 O3
fi

if [ "$DO_HEADERS" = "YES" ]; then
Expand All @@ -123,7 +123,7 @@ if [ "$DO_HEADERS" = "YES" ]; then
rm -rf "$PREFIX/usr/include"
cp -rf "$TARGET_DIR/include" "$PREFIX/include"
cp -fv ${ID_UCLIBC}.config $ID_UCLIBC/.config
pypy /media/Storage/workspace/router/TMRAF/tools/redirectOptimize.py /media/Storage/workspace/router/rt-n56u/toolchain-mipsel/ O2 O3
python3 /media/Storage/workspace/router/TMRAF/tools/redirectOptimize.py /media/Storage/workspace/router/rt-n56u/toolchain-mipsel/ O2 O3
make -C $ID_UCLIBC install_headers
mkdir -p "$PREFIX/usr"
ln -sf ../include "$PREFIX/usr/include"
Expand All @@ -135,7 +135,7 @@ if [ "$DO_BINUTILS" = "YES" ]; then
(../$ID_BINUTILS/configure --target=$TARGET --prefix="$PREFIX" \
--with-sysroot="$PREFIX" --with-build-sysroot="$PREFIX" \
--disable-nls --disable-werror --disable-multilib &&
pypy /media/Storage/workspace/router/TMRAF/tools/redirectOptimize.py /media/Storage/workspace/router/rt-n56u/toolchain-mipsel/ O2 O3
python3 /media/Storage/workspace/router/TMRAF/tools/redirectOptimize.py /media/Storage/workspace/router/rt-n56u/toolchain-mipsel/ O2 O3
make -j${HOST_NCPU} && \
make install) || exit 1
cd ..
Expand All @@ -152,7 +152,7 @@ if [ "$DO_GCC" = "YES" ]; then
--disable-libgomp --disable-nls \
--with-sysroot="$PREFIX" \
--enable-languages=c && \
pypy /media/Storage/workspace/router/TMRAF/tools/redirectOptimize.py /media/Storage/workspace/router/rt-n56u/toolchain-mipsel/ O2 O3
python3 /media/Storage/workspace/router/TMRAF/tools/redirectOptimize.py /media/Storage/workspace/router/rt-n56u/toolchain-mipsel/ O2 O3
make -j${HOST_NCPU} && \
make install) || exit 1
cd ..
Expand All @@ -161,7 +161,7 @@ fi
if [ "$DO_UCLIBC" = "YES" ]; then
echo "=====================BUILD-UCLIBC======================="
cp -fv ${ID_UCLIBC}.config $ID_UCLIBC/.config
pypy /media/Storage/workspace/router/TMRAF/tools/redirectOptimize.py /media/Storage/workspace/router/rt-n56u/toolchain-mipsel/ O2 O3
python3 /media/Storage/workspace/router/TMRAF/tools/redirectOptimize.py /media/Storage/workspace/router/rt-n56u/toolchain-mipsel/ O2 O3
cd $ID_UCLIBC
(make -j${HOST_NCPU} && \
make install) || exit 1
Expand All @@ -179,13 +179,13 @@ if [ "$DO_GCCCPP" = "YES" ]; then
--disable-libgomp --disable-nls \
--with-sysroot="$PREFIX" \
--enable-languages=c++ && \
pypy /media/Storage/workspace/router/TMRAF/tools/redirectOptimize.py /media/Storage/workspace/router/rt-n56u/toolchain-mipsel/ O2 O3
python3 /media/Storage/workspace/router/TMRAF/tools/redirectOptimize.py /media/Storage/workspace/router/rt-n56u/toolchain-mipsel/ O2 O3
make -j${HOST_NCPU} all-host all-target-libgcc all-target-libstdc++-v3 && \
make install-host install-target-libgcc install-target-libstdc++-v3) || exit 1
cd ..
fi

pypy /media/Storage/workspace/router/TMRAF/tools/redirectOptimize.py /media/Storage/workspace/router/rt-n56u/toolchain-mipsel/ O2 O3
python3 /media/Storage/workspace/router/TMRAF/tools/redirectOptimize.py /media/Storage/workspace/router/rt-n56u/toolchain-mipsel/ O2 O3

# sanity
if [ "$GCCMJ" = "4.4" ] ; then
Expand Down
11 changes: 5 additions & 6 deletions tools/redirectOptimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@ def rfile(fname, old, new):
cache = []
rwt = False
try:
with open(fname) as f:
with open(fname, "rb") as f:
for line in f:
tmp = line.strip("\r\n")
tmp = tmp.decode("utf-8")
tmp = line.decode("utf-8").strip("\r\n")
if tmp.find("redirectOptimize.py") != -1:
tmp = rebuildcmd(tmp, old, new)
rwt = True
Expand All @@ -50,7 +49,7 @@ def rfile(fname, old, new):
cache.append("")
cache = "\n".join(cache).encode("utf-8")
print("edit:" + fname)
with open(fname, "w") as f:
with open(fname, "wb") as f:
f.write(cache)
return rwt

Expand All @@ -59,12 +58,12 @@ def walkdir(dname, old, new):
for root, dirs, files in os.walk(dname):
for file in files:
#if file == "Makefile":
if file.lower().find("makefile") != -1:
if file.lower().find("makefile") >= 0:
rp = rfile(os.path.join(root, file), old, new)
if rp:
count += 1
if count > 0:
print(str(count)+" files edited")

if __name__ == "__main__":
walkdir(sys.argv[1].decode("utf-8"), sys.argv[2].decode("utf-8"), sys.argv[3].decode("utf-8"))
walkdir(sys.argv[1], sys.argv[2], sys.argv[3])
2 changes: 1 addition & 1 deletion trunk/libs/libcurl/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SRC_NAME=curl-7.62.x
SRC_NAME=curl-7.x

all: config_test
$(MAKE) -C $(SRC_NAME)
Expand Down
Loading

0 comments on commit 96ab472

Please sign in to comment.