30 lines
749 B
Bash
30 lines
749 B
Bash
#!/bin/bash -e
|
|
|
|
# Clone source code
|
|
if [ "$model" = "Padavanonly_MT798X_v24.10" ]; then
|
|
git clone -b 2410 --single-branch --filter=blob:none https://github.com/padavanonly/immortalwrt-mt798x-24.10 openwrt
|
|
elif [ "$model" = "Hanwckf_MT798X_v21.02" ]; then
|
|
git clone --depth=1 https://github.com/hanwckf/immortalwrt-mt798x openwrt
|
|
fi
|
|
|
|
# Enter source code
|
|
cd openwrt
|
|
|
|
# Load devices Config
|
|
cp -f defconfig/mt7981-ax3000.config .config
|
|
|
|
# Init feeds
|
|
./scripts/feeds update -a
|
|
./scripts/feeds install -a
|
|
|
|
# Compile
|
|
make -j$(nproc)
|
|
|
|
# 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
|