更新 toolchain/build.sh
Signed-off-by: zhao <zhao@noreply.localhost>
This commit is contained in:
parent
f6c16a2924
commit
9cf32a34dd
@ -18,11 +18,13 @@ cd openwrt
|
||||
|
||||
# Load devices Config
|
||||
if [ "$model" = "Padavanonly_MT798X_v24.10" ]; then
|
||||
cp -f defconfig/mt7981-ax3000.config .config
|
||||
curl -s https://git.kejizero.online/zhao/files/raw/branch/main/toolchain/Configs/padavanonly_mt798x.config > .config
|
||||
elif [ "$model" = "Hanwckf_MT798X_v21.02" ]; then
|
||||
cp -f defconfig/mt7981-ax3000.config .config
|
||||
elif [ "$model" = "OpenWrt_Rockchip_v24.10" ] || [ "$model" = "OpenWrt_X86_64_v24.10" ]; then
|
||||
cp -f defconfig/mt7981-ax3000.config .config
|
||||
curl -s https://git.kejizero.online/zhao/files/raw/branch/main/toolchain/Configs/hanwckf_mt798x.config > .config
|
||||
elif [ "$model" = "OpenWrt_Rockchip_v24.10" ]; then
|
||||
curl -s https://git.kejizero.online/zhao/files/raw/branch/main/toolchain/Configs/immortalwrt_rockchip.config > .config
|
||||
elif [ "$model" = "OpenWrt_X86_64_v24.10" ]; then
|
||||
curl -s https://git.kejizero.online/zhao/files/raw/branch/main/toolchain/Configs/immortalwrt_x86_64.config > .config
|
||||
fi
|
||||
|
||||
# Compile
|
||||
@ -30,6 +32,7 @@ make defconfig
|
||||
make -j$(nproc)
|
||||
|
||||
# Organize files
|
||||
if [ "$model" = "Padavanonly_MT798X_v24.10" ] || [ "$model" = "Hanwckf_MT798X_v21.02" ]; then
|
||||
rm -rf build_dir/hostpkg
|
||||
rm -rf staging_dir/hostpkg
|
||||
rm -rf staging_dir/packages
|
||||
@ -38,12 +41,28 @@ rm -rf staging_dir/target-aarch64_cortex-a53_musl/packages
|
||||
rm -rf staging_dir/target-aarch64_cortex-a53_musl/pkginfo
|
||||
rm -rf staging_dir/target-aarch64_cortex-a53_musl/root-mediatek
|
||||
find build_dir/target-aarch64_cortex-a53_musl -mindepth 1 -maxdepth 1 ! -name 'stamp' -exec rm -rf {} +
|
||||
|
||||
elif [ "$model" = "OpenWrt_Rockchip_v24.10" ]; then
|
||||
rm -rf build_dir/hostpkg
|
||||
rm -rf staging_dir/hostpkg
|
||||
rm -rf staging_dir/packages
|
||||
rm -rf staging_dir/target-aarch64_cortex-a53_musl/host
|
||||
rm -rf staging_dir/target-aarch64_cortex-a53_musl/packages
|
||||
rm -rf staging_dir/target-aarch64_cortex-a53_musl/pkginfo
|
||||
rm -rf staging_dir/target-aarch64_cortex-a53_musl/root-mediatek
|
||||
find build_dir/target-aarch64_cortex-a53_musl -mindepth 1 -maxdepth 1 ! -name 'stamp' -exec rm -rf {} +
|
||||
elif [ "$model" = "OpenWrt_X86_64_v24.10" ]; then
|
||||
rm -rf build_dir/hostpkg
|
||||
rm -rf staging_dir/hostpkg
|
||||
rm -rf staging_dir/packages
|
||||
rm -rf staging_dir/target-aarch64_cortex-a53_musl/host
|
||||
rm -rf staging_dir/target-aarch64_cortex-a53_musl/packages
|
||||
rm -rf staging_dir/target-aarch64_cortex-a53_musl/pkginfo
|
||||
rm -rf staging_dir/target-aarch64_cortex-a53_musl/root-mediatek
|
||||
find build_dir/target-aarch64_cortex-a53_musl -mindepth 1 -maxdepth 1 ! -name 'stamp' -exec rm -rf {} +
|
||||
fi
|
||||
|
||||
# Create folder
|
||||
mkdir toolchain-cache
|
||||
|
||||
# Compression toolchain
|
||||
tar -I zstd -cvf toolchain-cache/toolchain_mediatek.tar.zst build_dir dl tmp staging_dir
|
||||
|
||||
# tar -czvf toolchain-cache/toolchain.tar.gz tools toolchain
|
||||
|
Loading…
Reference in New Issue
Block a user