mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-24 06:16:30 +03:00
Update get-openwrt.sh
This commit is contained in:
parent
b47343f9b5
commit
65e2057194
@ -4,13 +4,13 @@ set -ex
|
|||||||
|
|
||||||
eval "$OPENWRT_FLAGS"
|
eval "$OPENWRT_FLAGS"
|
||||||
|
|
||||||
sysroot=$PWD/out/sysroot-build/openwrt/$release/$arch
|
sysroot=$PWD/out/sysroot-build/openwrt/$release/${arch}
|
||||||
if [ -d $sysroot/lib ]; then
|
if [ -d $sysroot/lib ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
mkdir -p $sysroot
|
mkdir -p $sysroot
|
||||||
|
|
||||||
SDK_PATH=openwrt-sdk-$release-$target-${subtarget}_gcc-${gcc_ver}_musl.Linux-x86_64
|
SDK_PATH=openwrt-sdk-$release-$target-${subtarget}_gcc-${gcc_ver}_${abi}.Linux-x86_64
|
||||||
SDK_URL=https://downloads.openwrt.org/releases/$release/targets/$target/$subtarget/$SDK_PATH.tar.xz
|
SDK_URL=https://downloads.openwrt.org/releases/$release/targets/$target/$subtarget/$SDK_PATH.tar.xz
|
||||||
rm -rf $SDK_PATH
|
rm -rf $SDK_PATH
|
||||||
curl $SDK_URL | tar xJf -
|
curl $SDK_URL | tar xJf -
|
||||||
@ -23,8 +23,8 @@ for flag in ALL_NONSHARED ALL_KMODS ALL SIGNED_PACKAGES; do
|
|||||||
done
|
done
|
||||||
make oldconfig
|
make oldconfig
|
||||||
make
|
make
|
||||||
full_root=staging_dir/toolchain-*_gcc-${gcc_ver}_musl
|
full_root=staging_dir/toolchain-*_gcc-${gcc_ver}_${abi}
|
||||||
cp -r staging_dir/target-*_musl/usr $full_root
|
cp -r staging_dir/target-*_${abi}/usr $full_root
|
||||||
echo '
|
echo '
|
||||||
./include
|
./include
|
||||||
./lib/*.o
|
./lib/*.o
|
||||||
@ -43,5 +43,5 @@ echo '
|
|||||||
' >include.txt
|
' >include.txt
|
||||||
tar cf - -C $full_root --hard-dereference . | tar xf - -C $sysroot --wildcards --wildcards-match-slash -T include.txt
|
tar cf - -C $full_root --hard-dereference . | tar xf - -C $sysroot --wildcards --wildcards-match-slash -T include.txt
|
||||||
rm include.txt
|
rm include.txt
|
||||||
cd $sysroot/*-openwrt-linux-musl/bin
|
cd $sysroot/*-openwrt-linux-musl*/bin
|
||||||
mv .ld.bin ld
|
mv .ld.bin ld
|
||||||
|
Loading…
Reference in New Issue
Block a user