Compare commits

..
30 Commits
Author SHA1 Message Date
remittor f0703a0e7a xmake: Fix compile libutp 2026-02-21 08:40:51 +03:00
remittor 050e11496a build: Use separated tools cache for TRX builds 2026-02-09 12:46:44 +03:00
remittor c516910a95 base: Add ip-full and tc-full 2026-02-09 12:39:48 +03:00
remittor 7cbc8a5396 build: Fix error on "Prepare for host tools" 2026-02-06 21:04:30 +03:00
remittor f8bd84161f build: Fix NEW_OUT_DIR 2026-02-06 20:46:50 +03:00
remittor ec51d4d719 xmake: Fix typo 2026-02-06 20:31:18 +03:00
remittor c8b20b80db build: Add show disabled_services.lst 2026-02-06 20:13:17 +03:00
remittor ee50ded9ed build: Fix dir for .prereq-build-list 2026-02-06 20:00:19 +03:00
remittor 60569faf5c build: Add ext output collapsed sections 2026-02-06 19:53:32 +03:00
remittor 4bf7b9f5f4 build: Fix step "Show host tools stamps" for TRX 2026-02-06 17:17:10 +03:00
remittor ee1b28746a build: Fix directory name into "Prepare for host tools" 2026-02-06 16:42:39 +03:00
remittor c79b2afda1 build: Add step "Build the TRX image without WiFi activation" 2026-02-06 16:25:38 +03:00
remittor c8bbce4d22 xmake: Add option -W for build without WiFi activation 2026-02-06 15:32:05 +03:00
remittor 4be0aa94a4 xmake: Always try create vermagic-*.list file 2026-02-04 12:42:46 +03:00
remittor c86f52cdb4 xmake: Add check for CONFIG_BUILD_ALL_HOST_TOOLS option 2026-02-04 11:56:44 +03:00
remittor e7b3d9673d build: Add check for CONFIG_BUILD_ALL_HOST_TOOLS option 2026-02-04 11:56:21 +03:00
remittor ebd2e371f2 build: Add step "Prepare for host tools" and rewrite cache for tools 2026-02-03 19:28:07 +03:00
remittor d03288513f xmake: Add patch for tools/Makefile which disable yafut 2026-02-03 19:19:08 +03:00
remittor f4480242f8 build: Add step "Show host tools stamps" 2026-02-02 17:09:45 +03:00
remittor 80aca373ac config: Remove package lm-sensors-detect
Depends on perl and libperl.so
2026-02-02 17:08:48 +03:00
remittor 56dad16b45 xmake: Add patch for BatMan Adv proto 2026-01-29 12:07:32 +03:00
remittor a71f68d967 readme: Fix badges 2026-01-21 12:16:51 +03:00
remittor 5b6e495bc8 build: Fix step "Upload assets" 2026-01-20 17:23:19 +03:00
remittor e4a6502e6f build: Add support TRX-images 2026-01-20 15:18:56 +03:00
remittor 8c4beac735 base: Add lscpu and bind-tools 2026-01-17 11:21:33 +03:00
remittor ac0bf84ce1 xmake: Fix patches for podkop 2026-01-10 09:16:06 +03:00
remittor 488be8d6d1 Add support Asus TUF-AX4200q 2026-01-08 17:05:22 +03:00
remittor 0babf26e52 Fix for use new directories 2026-01-08 16:47:23 +03:00
remittor 0aeee17021 Rename base directories 2026-01-08 14:25:42 +03:00
remittor 0fc5ed4afe config: Rename config files 2026-01-08 14:22:13 +03:00
33 changed files with 529 additions and 172 deletions

No files matched your search

+306 -101
View File
@@ -42,6 +42,14 @@ on:
options:
- true
- false
trx_build:
description: 'TRX images build'
required: true
default: 'false'
type: choice
options:
- true
- false
suffix:
description: 'TAG suffix'
required: false
@@ -50,7 +58,6 @@ on:
env:
TEST_BUILD: ${{ github.event.inputs.test_build == 'true' }}
FAKE_BUILD: ${{ github.event.inputs.fake_build == 'true' }}
TAG_SUFFIX: ${{ github.event.inputs.fake_build == 'true' && '-fake' || github.event.inputs.test_build == 'true' && '-test' || '' }}
TARGET_NAME: ${{ github.event.inputs.target_name }}
G_PKG_DIR: ${{ github.event.inputs.package_dir }}
@@ -157,8 +164,9 @@ jobs:
- rt-ax57m
- rt-ax59u
- rt-ax89x
- tuf_ax4200
- tuf_ax6000
- tuf-ax4200
- tuf-ax4200q
- tuf-ax6000
- zen-bt8
isTest:
- ${{ needs.check.outputs.test_build == 'true' }}
@@ -203,6 +211,31 @@ jobs:
- name: Checkout builder
uses: actions/checkout@main
- name: Prepare env params
env:
INP_FAKE_BUILD: ${{ github.event.inputs.fake_build == 'true' }}
INP_TRX_BUILD: ${{ github.event.inputs.trx_build == 'true' }}
TARGET: ${{ matrix.target }}
run: |
FAKE_BUILD=$INP_FAKE_BUILD
TRX_BUILD=false
if [ "$INP_TRX_BUILD" = true ]; then
CFG="./_initramfs/$TARGET.config"
if [ -f "$CFG" ]; then
TRX_BUILD=true
echo "Start TRX build for $CFG"
echo "OPT_INITRAMFS=-i" >> $GITHUB_ENV
else
FAKE_BUILD=true
echo "Start FAKE build for $TARGET"
echo "SKIP_ME=true" >> $GITHUB_ENV
fi
fi
echo "FAKE_BUILD = $FAKE_BUILD"
echo "TRX_BUILD = $TRX_BUILD"
echo "FAKE_BUILD=$FAKE_BUILD" >> $GITHUB_ENV
echo "TRX_BUILD=$TRX_BUILD" >> $GITHUB_ENV
- name: Download OpenWrt sources
run: |
git clone --branch $REPO_BRANCH $REPO_URL.git openwrt
@@ -211,9 +244,12 @@ jobs:
rm -rf openwrt
- name: Init builder
env:
TOOLS_SRC_HASH: ${{ hashFiles('tools/**') }}
run: |
chmod +x *.sh
wget https://github.com/fantastic-packages/packages/raw/refs/heads/24.10/keys/usign/53FF2B6672243D28.pub
echo "TOOLS_SRC_HASH=$TOOLS_SRC_HASH" >> $GITHUB_ENV
- name: Update OpenWrt packages
id: update
@@ -222,75 +258,14 @@ jobs:
mkdir -p logs
echo "status=success" >> $GITHUB_OUTPUT
- name: Prepare for cache
id: cache_prepare
env:
TARGET: ${{ matrix.target }}
USE_CACHE: ${{ github.event.inputs.use_cache }}
CACHE_VER: ${{ github.event.inputs.cache_ver }}
run: |
if [ "$USE_CACHE" = "true" ]; then
rm -rf staging_dir/
mkdir -p staging_dir/host
rm -rf build_dir/
mkdir -p build_dir/host
fi
if [[ " kng_re r3g r3p " == *" $TARGET "* ]]; then
CACHE_ARCH=mips
else
CACHE_ARCH=arm
fi
echo "CACHE_ARCH = $CACHE_ARCH"
echo "USE_CACHE=$USE_CACHE" >> $GITHUB_ENV
echo "CACHE_VER=$CACHE_VER" >> $GITHUB_ENV
echo "CACHE_ARCH=$CACHE_ARCH" >> $GITHUB_ENV
echo "status=success" >> $GITHUB_OUTPUT
- name: Restore cache for host tools
id: tools_cache_restore
if: github.event.inputs.use_cache == 'true'
uses: actions/cache/restore@v4
with:
key: host-tools-${{ env.CACHE_VER }}-${{ env.CACHE_ARCH }}-${{ hashFiles('tools/**') }}
path: |
staging_dir/host
build_dir/host
- name: Fix time stamps into restored dirs
if: github.event.inputs.use_cache == 'true' && steps.tools_cache_restore.outputs.cache-hit == 'true'
run: |
touch staging_dir/host/.prepared
touch staging_dir/host/.prereq-build
touch staging_dir/host/stamp/.* 2>/dev/null
find build_dir/host -name ".prepared*" -exec touch {} +
find build_dir/host -name ".configured" -exec touch {} +
find build_dir/host -name ".built" -exec touch {} +
- name: Inspect restored host tools
if: github.event.inputs.use_cache == 'true'
run: |
echo "====== openwrt-native.txt ======"
cat build_dir/host/pkgconf-*/openwrt-native.txt || true
echo "====== staging_dir/host ====="
du -sh staging_dir/host || true
ls -la staging_dir/host || true
echo "====== staging_dir/host/bin ====="
du -sh staging_dir/host/bin || true
ls -1 staging_dir/host/bin | head -20 || true
echo "====== build_dir/host ======="
du -sh build_dir/host || true
ls -1 build_dir/host | head -20 || true
echo "====== path info ========"
grep -R "/home/runner" build_dir/host | head
- name: Configure
id: configure
if: steps.update.outputs.status == 'success'
env:
env:
TARGET: ${{ matrix.target }}
FW_VER: ${{ needs.check.outputs.fw_ver }}
run: |
./xmake.sh -I -t $TARGET
./xmake.sh $OPT_INITRAMFS -I -t $TARGET
G_DEVICE_NAME=$( grep -so '^CONFIG_TARGET.*DEVICE.*=y' .config | sed -r 's/.*DEVICE_(.*)=y/\1/' )
[ -z "$G_DEVICE_NAME" ] && exit 31
G_BOARD_NAME=$( grep -so '^CONFIG_TARGET_BOARD=.*' .config | cut -d'"' -f2 )
@@ -306,6 +281,9 @@ jobs:
if [ $(find . -maxdepth 1 -name "$VERMAGIC_LIST" | wc -l) = "0" ]; then
exit 41
fi
echo "::group::disabled_services.lst"
cat disabled_services.lst || echo '<<< file disabled_services.lst not found >>>'
echo "::endgroup::"
FILE_DATE=$(date --utc +'%y%m%d')
echo "status=success" >> $GITHUB_OUTPUT
echo "FW_VER=$FW_VER" >> $GITHUB_ENV
@@ -323,6 +301,139 @@ jobs:
cp -f .config logs/config1
cp -f .config config1
- name: Prepare for host tools
id: tools_prepare
env:
TARGET: ${{ matrix.target }}
USE_CACHE: ${{ github.event.inputs.use_cache }}
CACHE_VER: ${{ github.event.inputs.cache_ver }}
INP_TRX_BUILD: ${{ github.event.inputs.trx_build == 'true' }}
run: |
echo USE_CACHE = $USE_CACHE
HOST_TOOLS_STG_DIR=staging_dir/host
HOST_TOOLS_BLD_DIR=build_dir/host
rm -rf build_dir/
mkdir -p staging_dir/host
mkdir -p build_dir/host
#############################################
CONFIG_BUILD_ALL_HOST_TOOLS=n
if grep '^CONFIG_BUILD_ALL_HOST_TOOLS=y' $CFG ; then
CONFIG_BUILD_ALL_HOST_TOOLS=y
fi
########### check tools Makefile ############
if [ "$CONFIG_BUILD_ALL_HOST_TOOLS" != y ]; then
if grep -q '(CONFIG_USES_MINOR),y) += yafut' tools/Makefile ; then
echo WARN: file tools/Makefile allowed compile yafut
echo ERROR: yafut compile not supported !!!
exit 51
fi
fi
########### get hash of dir with tools Makefiles ############
TOOLS_SRC_CRC=$( echo $TOOLS_SRC_HASH | cksum | awk '{print $1}' )
echo $TOOLS_SRC_CRC > logs/host_tools_sources.crc
echo "TOOLS_SRC_CRC=$TOOLS_SRC_CRC" >> $GITHUB_ENV
########### get prereq tools (w/o compile) ############
ls -la $HOST_TOOLS_STG_DIR/bin | awk '{print $9 " -> " $11}' | sort > $HOST_TOOLS_STG_DIR/.prereq-build-list
TOOLS_PREREQ_CRC=$( cat $HOST_TOOLS_STG_DIR/.prereq-build-list | cksum | awk '{print $1}' )
cp -f $HOST_TOOLS_STG_DIR/.prereq-build-list logs/prereq-build-list.txt
echo "TOOLS_PREREQ_CRC=$TOOLS_PREREQ_CRC" >> $GITHUB_ENV
echo "::group::prereq-build-list"
cat $HOST_TOOLS_STG_DIR/.prereq-build-list
echo "::endgroup::"
########### patch for tools/Makefile ###############
cat <<'EOF' >> tools/Makefile
###
### patch for getinfo
###
TOOLS_COMPILE_LIST := $(STAGING_DIR_HOST)/.tools_compile_list
define gen_tools_compile_list
@echo "Generating $(TOOLS_COMPILE_LIST)"
@mkdir -p $(STAGING_DIR_HOST)
rm -f $(STAGING_DIR_HOST)/.tools_compile_*
@{ \
TOOLS_STATUS=""; \
for tool in $(sort $(tools-y) $(tools-)); do \
T_STATUS="n"; \
if echo " $(tools-y) " | grep -q " $$tool " ; then T_STATUS="y"; printf "+"; else printf " "; fi; \
TOOLS_STATUS="$${TOOLS_STATUS}$${T_STATUS}" ; \
printf " %s\n" "$$tool"; \
done; \
printf "$$TOOLS_STATUS" > $(STAGING_DIR_HOST)/.tools_compile_mask; \
} > $(TOOLS_COMPILE_LIST)
endef
$(curdir)/getinfo: .config prereq
$(call gen_tools_compile_list)
$(curdir)/prepare: $(curdir)/getinfo
EOF
########## end of patch tools/Makefile ############
make tools/getinfo
if [ ! -f $HOST_TOOLS_STG_DIR/.tools_compile_list ]; then
echo ERROR: File $HOST_TOOLS_STG_DIR/.tools_compile_list not found!
exit 55
fi
cp -f $HOST_TOOLS_STG_DIR/.tools_compile_list logs/tools_compile_list.txt
TOOLS_COMPILE_CRC=$( cat $HOST_TOOLS_STG_DIR/.tools_compile_list | cksum | awk '{print $1}' )
echo "TOOLS_COMPILE_CRC=$TOOLS_COMPILE_CRC" >> $GITHUB_ENV
echo "::group::tools_compile_list"
cat $HOST_TOOLS_STG_DIR/.tools_compile_list
echo "::endgroup::"
#######
TOOLS_COMPILE_MASK=$( cat $HOST_TOOLS_STG_DIR/.tools_compile_mask )
cp -f $HOST_TOOLS_STG_DIR/.tools_compile_mask logs/tools_compile_mask.txt
touch logs/tools_compile_$TOOLS_COMPILE_MASK
echo TOOLS_COMPILE_MASK = $TOOLS_COMPILE_MASK
###################################################
if [ "$USE_CACHE" = "true" ]; then
echo USE_CACHE = $USE_CACHE
fi
if [ "$INP_TRX_BUILD" = true ]; then
CACHE_VER=$CACHE_VER-trx
fi
echo "USE_CACHE=$USE_CACHE" >> $GITHUB_ENV
echo "CACHE_VER=$CACHE_VER" >> $GITHUB_ENV
echo "HOST_TOOLS_STG_DIR=$HOST_TOOLS_STG_DIR" >> $GITHUB_ENV
echo "HOST_TOOLS_BLD_DIR=$HOST_TOOLS_BLD_DIR" >> $GITHUB_ENV
echo "status=success" >> $GITHUB_OUTPUT
- name: Restore host tools from cache
id: tools_cache_restore
if: github.event.inputs.use_cache == 'true'
uses: actions/cache/restore@v4
with:
key: host-tools-${{ env.CACHE_VER }}-${{ env.TOOLS_SRC_CRC }}-${{ env.TOOLS_PREREQ_CRC }}-${{ env.TOOLS_COMPILE_CRC }}
path: |
staging_dir/host
build_dir/host
- name: Fix time stamps into restored dirs
if: github.event.inputs.use_cache == 'true' && steps.tools_cache_restore.outputs.cache-hit == 'true'
run: |
touch $HOST_TOOLS_STG_DIR/.prepared
touch $HOST_TOOLS_STG_DIR/.prereq-build
touch $HOST_TOOLS_STG_DIR/stamp/.* 2>/dev/null
find $HOST_TOOLS_BLD_DIR -name ".prepared*" -exec touch {} +
find $HOST_TOOLS_BLD_DIR -name ".configured" -exec touch {} +
find $HOST_TOOLS_BLD_DIR -name ".built" -exec touch {} +
- name: Inspect restored host tools
if: github.event.inputs.use_cache == 'true'
run: |
echo "====== openwrt-native.txt ======"
cat $HOST_TOOLS_BLD_DIR/pkgconf-*/openwrt-native.txt || true
echo "====== staging_dir/host ====="
du -sh $HOST_TOOLS_STG_DIR || true
ls -la $HOST_TOOLS_STG_DIR || true
echo "====== staging_dir/host/bin ====="
du -sh $HOST_TOOLS_STG_DIR/bin || true
ls -1 $HOST_TOOLS_STG_DIR/bin | head -20 || true
echo "====== build_dir/host ======="
du -sh $HOST_TOOLS_BLD_DIR || true
ls -1 $HOST_TOOLS_BLD_DIR | head -20 || true
echo "====== path info ========"
grep -R "/home/runner" $HOST_TOOLS_BLD_DIR | head
- name: Monitor memory
run: |
echo "CPU cores = $(nproc)"
@@ -336,24 +447,14 @@ jobs:
- name: Download sources (dl)
id: download
if: ${{ steps.configure.outputs.status == 'success' && github.event.inputs.fake_build != 'true' }}
if: ${{ steps.configure.outputs.status == 'success' && env.FAKE_BUILD != 'true' }}
run: |
make -j$(nproc) download
echo "status=success" >> $GITHUB_OUTPUT
- name: Fix time stamps into restored dirs
if: github.event.inputs.use_cache == 'true' && steps.tools_cache_restore.outputs.cache-hit == 'true'
run: |
touch staging_dir/host/.prepared
touch staging_dir/host/.prereq-build
touch staging_dir/host/stamp/.* 2>/dev/null
find build_dir/host -name ".prepared*" -exec touch {} +
find build_dir/host -name ".configured" -exec touch {} +
find build_dir/host -name ".built" -exec touch {} +
- name: Build tools and toolchain
id: tools
if: ${{ steps.configure.outputs.status == 'success' && github.event.inputs.fake_build != 'true' }}
if: ${{ steps.configure.outputs.status == 'success' && env.FAKE_BUILD != 'true' }}
run: |
make toolchain/install -j$(nproc)
echo "status=success" >> $GITHUB_OUTPUT
@@ -363,26 +464,38 @@ jobs:
if: steps.tools.outputs.status == 'success'
uses: actions/cache/save@v4
with:
key: host-tools-${{ env.CACHE_VER }}-${{ env.CACHE_ARCH }}-${{ hashFiles('tools/**') }}
key: host-tools-${{ env.CACHE_VER }}-${{ env.TOOLS_SRC_CRC }}-${{ env.TOOLS_PREREQ_CRC }}-${{ env.TOOLS_COMPILE_CRC }}
path: |
staging_dir/host
build_dir/host
- name: Show host tools stamps
run: |
if [ -d staging_dir/host/stamp ]; then
ls -la staging_dir/host/stamp/
ls -la staging_dir/host/stamp/ > logs/host_stamp_dir.txt
fi
- name: Configure 2
id: configure2
if: steps.tools.outputs.status == 'success'
env:
TARGET: ${{ matrix.target }}
run: |
rm -rf logs_backup/
cp -a logs logs_backup
make clean
./xmake.sh -I -t $TARGET
mkdir -p logs
rm -rf logs
cp -a logs_backup logs
./xmake.sh $OPT_INITRAMFS -I -t $TARGET
cp -f .config logs/config2
[ -f config1 ] && cp -f config1 logs/config1
echo "::group::disabled_services.lst"
cat disabled_services.lst || echo '<<< file disabled_services.lst not found >>>'
echo "::endgroup::"
- name: Kernel compile
id: kernel
if: ${{ steps.tools.outputs.status == 'success' && github.event.inputs.fake_build != 'true' }}
if: ${{ steps.tools.outputs.status == 'success' && env.FAKE_BUILD != 'true' }}
run: |
make target/linux/compile -j$(nproc)
echo "status=success" >> $GITHUB_OUTPUT
@@ -417,29 +530,57 @@ jobs:
make V=sc world
fi
fi
# process results
OUT_DIR=bin/targets/$G_BOARD_NAME/$G_SUBTARGET_NAME
if [ "$FAKE_BUILD" = "true" ]; then
echo "status=success" >> $GITHUB_OUTPUT
- name: Process out results
id: install
if: steps.compile.outputs.status == 'success' || env.FAKE_BUILD == 'true'
env:
TARGET: ${{ matrix.target }}
OUT_DIR: ./bin/targets/${{ env.G_BOARD_NAME }}/${{ env.G_SUBTARGET_NAME }}
run: |
if [ "$FAKE_BUILD" = true ]; then
mkdir -p logs
mkdir -p $OUT_DIR
echo "$G_BOARD_NAME $G_SUBTARGET_NAME $G_DEVICE_NAME" > "$OUT_DIR/$G_DEVICE_NAME.txt"
touch "$OUT_DIR/kernel-debug.tar.zst"
mkdir -p "$OUT_DIR"
cd "$OUT_DIR"
echo "$G_BOARD_NAME $G_SUBTARGET_NAME $G_DEVICE_NAME" > "$G_DEVICE_NAME.txt"
touch FAKE_BUILD.bin
touch kernel-debug.tar.zst
BLD_VER=$FW_VER
else
BLD_VER=$( cat $OUT_DIR/profiles.json | grep -so '"version_number":"[^"]*' | grep -so '[^"]*$' )
if [ ! -d "$OUT_DIR" ]; then
echo "OUT_DIR not found!"
exit 99
fi
cd "$OUT_DIR"
BLD_VER=$( cat profiles.json | grep -so '"version_number":"[^"]*' | grep -so '[^"]*$' )
fi
if [ "$SKIP_ME" = true ]; then
touch FLAG-SKIP_ME
fi
if [ "$TRX_BUILD" = true ]; then
touch FLAG-TRX_BUILD
fi
echo "Firmware $BLD_VER [$FILE_DATE] builded!"
if [ ! -f $OUT_DIR/kernel-debug.tar.zst ]; then
if [ ! -f kernel-debug.tar.zst ]; then
echo "File kernel-debug.tar.zst not found!"
exit 100
fi
if [ "$TRX_BUILD" = true ]; then
find . -maxdepth 1 -type f ! -name '*-initramfs*' ! -name 'FLAG-*' -delete
VER_MAJOR=$( echo "$BLD_VER" | cut -d. -f1 )
STD_IMG_DIR="openwrt-initramfs-bin-for-luci"
mkdir $STD_IMG_DIR
find . -maxdepth 1 -type f -name '*-initramfs*.bin' -exec mv -f {} $STD_IMG_DIR/openwrt-${VER_MAJOR}_${TARGET}_initramfs.bin \;
find . -maxdepth 1 -type f -name '*-initramfs*.trx' -exec mv -f {} openwrt-${VER_MAJOR}_${TARGET}_initramfs.trx \;
fi
echo "status=success" >> $GITHUB_OUTPUT
echo "FW_BUILD_OK=1" >> $GITHUB_ENV
echo "BLD_VER=$BLD_VER" >> $GITHUB_ENV
echo "OUT_DIR=$OUT_DIR" >> $GITHUB_ENV
- name: Mark firmware build failed
if: false # steps.compile.outcome == 'failure'
if: false # steps.install.outcome == 'failure' || steps.compile.outcome == 'failure'
run: |
echo "Firmware build failed, continuing pipeline"
echo "FW_BUILD_OK=0" >> $GITHUB_ENV
@@ -451,6 +592,37 @@ jobs:
echo "BLD_VER=$FW_VER" >> $GITHUB_ENV
echo "OUT_DIR=$OUT_DIR" >> $GITHUB_ENV
- name: Build the TRX image without WiFi activation
id: compile_wifi_dis
if: steps.install.outputs.status == 'success' && env.TRX_BUILD == 'true' && env.FAKE_BUILD != 'true' && env.TEST_BUILD != 'true'
env:
TARGET: ${{ matrix.target }}
run: |
BLD_OUT_DIR=$OUT_DIR
NEW_OUT_DIR=$GITHUB_WORKSPACE/xout
mv -f "$OUT_DIR" $NEW_OUT_DIR
echo "OUT_DIR=$NEW_OUT_DIR" >> $GITHUB_ENV
./xmake.sh -W -i -t $TARGET
if [ ! -d "$BLD_OUT_DIR" ]; then
echo "OUT_DIR not found!"
exit 99
fi
cd "$BLD_OUT_DIR"
echo "Firmware TRX $BLD_VER [$FILE_DATE] builded!"
if [ ! -f kernel-debug.tar.zst ]; then
echo "File kernel-debug.tar.zst not found!"
exit 100
fi
find . -maxdepth 1 -type f ! -name '*-initramfs*' -delete
VER_MAJOR=$( echo "$BLD_VER" | cut -d. -f1 )
WIFIDIS_DIR=$NEW_OUT_DIR/images-WiFi-disabled
mkdir -p $WIFIDIS_DIR
STD_IMG_DIR="$WIFIDIS_DIR/openwrt-initramfs-bin-for-luci"
mkdir -p $STD_IMG_DIR
find . -maxdepth 1 -type f -name '*-initramfs*.bin' -exec mv -f {} $STD_IMG_DIR/openwrt-${VER_MAJOR}_${TARGET}_initramfs_nowifi.bin \;
find . -maxdepth 1 -type f -name '*-initramfs*.trx' -exec mv -f {} $WIFIDIS_DIR/openwrt-${VER_MAJOR}_${TARGET}_initramfs_nowifi.trx \;
echo "status=success" >> $GITHUB_OUTPUT
- name: Check space usage
run: df -hT
@@ -470,7 +642,7 @@ jobs:
tar -cJvf logs-$TARGET-$FW_DATE.tar.xz logs
- name: Cleanup OUT directory
if: steps.compile.outputs.status == 'success'
if: steps.install.outputs.status == 'success'
env:
OUT_DIR: ${{ env.OUT_DIR }}
run: |
@@ -490,7 +662,7 @@ jobs:
- name: Upload OUT directory
uses: actions/upload-artifact@main
if: steps.compile.outputs.status == 'success'
if: steps.install.outputs.status == 'success'
with:
name: openwrt-${{ env.BLD_VER }}-${{ needs.check.outputs.build_date }}-${{ env.G_DEVICE_NAME }}
path: ${{ env.OUT_DIR }}
@@ -529,19 +701,52 @@ jobs:
- name: Put images into zip
run: |
mkdir -p public
find . -mindepth 1 -type d -name 'openwrt-*' -exec sh -c 'zip -0 ./public/$(basename {}).zip -j {} {}/*' \;
for DIR in openwrt-*; do
[ -d "$DIR" ] || continue
if [ -f "$DIR/FLAG-SKIP_ME" ]; then
echo "Skip $DIR"
continue
fi
ZIP_SUFFIX=""
if [ -f "$DIR/FLAG-TRX_BUILD" ]; then
echo "TRX_BUILD=true" >> $GITHUB_ENV
ZIP_SUFFIX=".trx"
fi
rm -f "$DIR"/FLAG-*
zip_name="./public/$(basename "$DIR")${ZIP_SUFFIX}.zip"
echo "Creating $zip_name"
( cd "$DIR"; zip -0 -r "../$zip_name" . )
done
- name: Show all zip files
run: |
ls -lh ./public/*.zip
- name: Upload assets
uses: andelf/nightly-release@main
- name: Generate names
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ needs.check.outputs.tag }}
FW_VER: ${{ needs.check.outputs.fw_ver }}
FW_DATE: ${{ needs.check.outputs.fw_date }}
run: |
NAME="$TAG"
DESC="OpenWrt $FW_VER [$FW_DATE]"
if [ "$TRX_BUILD" = true ]; then
NAME="TRX-$TAG"
TAG="$TAG-trx"
DESC="TRX images based on $DESC"
fi
echo "REL_TAG=$TAG" >> $GITHUB_ENV
echo "REL_NAME=$NAME" >> $GITHUB_ENV
echo "REL_DESC=$DESC" >> $GITHUB_ENV
- name: Upload assets
uses: softprops/action-gh-release@v2
with:
draft: ${{ env.TEST_BUILD == 'true' || github.event.inputs.fake_build == 'true' }}
prerelease: true
tag_name: ${{ needs.check.outputs.tag }}${{ env.TAG_SUFFIX }}
name: '${{ needs.check.outputs.tag }}'
tag_name: ${{ env.REL_TAG }}${{ env.TAG_SUFFIX }}
name: '${{ env.REL_NAME }}'
body: |
OpenWrt ${{ needs.check.outputs.fw_ver }} [${{ needs.check.outputs.fw_date }}]
${{ env.REL_DESC }}
author: [remittor](https://github.com/remittor)
files: ./public/*.zip
+1 -1
View File
@@ -1,6 +1,6 @@
[![Github All Releases](https://img.shields.io/github/downloads/openwrt-xiaomi/builder/total.svg)](https://github.com/openwrt-xiaomi/builder/releases)
[![Github Latest Release](https://img.shields.io/github/downloads/openwrt-xiaomi/builder/latest/total.svg)](https://github.com/openwrt-xiaomi/builder/releases)
[![ViewCount](https://views.whatilearened.today/views/github/openwrt-xiaomi/builder.svg)](https://github.com/openwrt-xiaomi/builder/releases)
[![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fopenwrt-xiaomi%2Fbuilder&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=hits&edge_flat=false)](https://github.com/openwrt-xiaomi/builder/releases)
[![Donations Page](https://github.com/andry81-cache/gh-content-static-cache/raw/master/common/badges/donate/donate.svg)](https://github.com/remittor/donate)
# OpenWrt builder
File renamed without changes.
File renamed without changes.
File renamed without changes.
+6
View File
@@ -45,6 +45,10 @@ CONFIG_PACKAGE_luci-app-filemanager=y
CONFIG_PACKAGE_luci-i18n-filemanager-ru=y
#CONFIG_PACKAGE_atftp=y
#CONFIG_PACKAGE_atftpd=y
CONFIG_PACKAGE_lscpu=y
CONFIG_PACKAGE_ip-full=y
CONFIG_PACKAGE_tc-full=y
CONFIG_PACKAGE_bind-tools=y
CONFIG_PACKAGE_facinstall=y
### Add-on programs
@@ -121,6 +125,7 @@ CONFIG_PACKAGE_relayd=y
CONFIG_PACKAGE_luci-proto-relay=y
### Luci proto
CONFIG_PACKAGE_luci-proto-gre=y
CONFIG_PACKAGE_luci-proto-3g=y
CONFIG_PACKAGE_luci-proto-ipv6=y
@@ -186,6 +191,7 @@ CONFIG_OPENSSL_WITH_MDC2=y
CONFIG_OPENSSL_WITH_WHIRLPOOL=y
### SSL certificates
CONFIG_PACKAGE_ca-bundle=y
CONFIG_PACKAGE_ca-certificates=y
### Luci
@@ -37,12 +37,14 @@ CONFIG_PACKAGE_uboot-envtools=y
CONFIG_PACKAGE_mtd-utils=y
CONFIG_PACKAGE_iw=y
CONFIG_PACKAGE_mc=y
CONFIG_PACKAGE_rsync=y
CONFIG_PACKAGE_luci-app-ttyd=y
CONFIG_PACKAGE_luci-i18n-ttyd-ru=y
CONFIG_PACKAGE_luci-app-filemanager=y
CONFIG_PACKAGE_luci-i18n-filemanager-ru=y
CONFIG_PACKAGE_atftp=y
#CONFIG_PACKAGE_atftpd=y
CONFIG_PACKAGE_lscpu=y
CONFIG_PACKAGE_facinstall=y
CONFIG_PACKAGE_kmod-mtd-rw=y
@@ -55,6 +57,7 @@ CONFIG_PACKAGE_iperf3=y
CONFIG_PACKAGE_htop=y
CONFIG_PACKAGE_nano=y
CONFIG_PACKAGE_ccrypt=y
CONFIG_PACKAGE_curl=y
CONFIG_PACKAGE_wget=y
CONFIG_PACKAGE_patch=y
CONFIG_PACKAGE_diffutils=y
@@ -64,6 +67,10 @@ CONFIG_PACKAGE_terminfo=y
CONFIG_PACKAGE_zlib=y
CONFIG_PACKAGE_ethtool=y
### SSL certificates
CONFIG_PACKAGE_ca-bundle=y
CONFIG_PACKAGE_ca-certificates=y
### Luci
CONFIG_LUCI_LANG_en=y
CONFIG_LUCI_LANG_ru=y
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View File
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+14
View File
@@ -0,0 +1,14 @@
CONFIG_TARGET_mediatek=y
CONFIG_TARGET_mediatek_filogic=y
CONFIG_TARGET_mediatek_filogic_DEVICE_asus_tuf-ax4200q=y
#include _addons.config
#include _base_initrd.config
#include _wifi_en.config
CONFIG_TARGET_INITRAMFS_FORCE=y
CONFIG_TARGET_ROOTFS_INITRAMFS=y
CONFIG_USES_SEPARATE_INITRAMFS=n
CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE=n
File renamed without changes.
File renamed without changes.
+4 -2
View File
@@ -17,7 +17,7 @@ else
fi
log_msg() {
printf "%s\n" "$1" >&$OUTPUT_PIPE
printf "%s\n" "$1" >&8 || printf "%s\n" "$1"
}
log_err() {
@@ -28,7 +28,7 @@ log_err() {
_R=\\033[31m
_N=\\033[m
fi
printf "$_R%s$_N\n" "ERROR: $msg" >&$OUTPUT_PIPE
printf "$_R%s$_N\n" "ERROR: $msg" >&8 || printf "$_R%s$_N\n" "ERROR: $msg"
}
die() {
@@ -150,6 +150,8 @@ if [ -f "$WIFI77_FN" ]; then
WIFI_COUNTRY=$( get_param_qq CONFIG_PACKAGE_MAC80211_COUNTRY "$TOPDIR/.config" )
sed -i "s#%COUNTRY%#${WIFI_COUNTRY}#g" "$WIFI77_FN"
fi
else
rm -f "$WIFI77_FN"
fi
fi
-1
View File
@@ -16,7 +16,6 @@ CONFIG_TARGET_ipq806x_generic_DEVICE_xiaomi_r3d=y
### Temp and sensors
CONFIG_PACKAGE_lm-sensors=y
CONFIG_PACKAGE_lm-sensors-detect=y
CONFIG_PACKAGE_alpine-fan-control=y
CONFIG_PACKAGE_luci-app-alpine-fan-control=y
CONFIG_PACKAGE_luci-app-temp-status=y
-1
View File
@@ -11,7 +11,6 @@ CONFIG_TARGET_mediatek_filogic_DEVICE_asus_rt-ax52=y
### Temp and sensors
CONFIG_PACKAGE_lm-sensors=y
CONFIG_PACKAGE_lm-sensors-detect=y
CONFIG_PACKAGE_luci-app-temp-status=y
CONFIG_PACKAGE_luci-i18n-temp-status-ru=y
-1
View File
@@ -11,7 +11,6 @@ CONFIG_TARGET_mediatek_filogic_DEVICE_asus_rt-ax57m=y
### Temp and sensors
CONFIG_PACKAGE_lm-sensors=y
CONFIG_PACKAGE_lm-sensors-detect=y
CONFIG_PACKAGE_luci-app-temp-status=y
CONFIG_PACKAGE_luci-i18n-temp-status-ru=y
-1
View File
@@ -14,7 +14,6 @@ CONFIG_TARGET_mediatek_filogic_DEVICE_asus_rt-ax59u=y
### Temp and sensors
CONFIG_PACKAGE_lm-sensors=y
CONFIG_PACKAGE_lm-sensors-detect=y
CONFIG_PACKAGE_luci-app-temp-status=y
CONFIG_PACKAGE_luci-i18n-temp-status-ru=y
CONFIG_PACKAGE_collectd-mod-sensors=y
-1
View File
@@ -16,7 +16,6 @@ CONFIG_TARGET_qualcommax_ipq807x_DEVICE_asus_rt-ax89x=y
### Temp and sensors
CONFIG_PACKAGE_lm-sensors=y
CONFIG_PACKAGE_lm-sensors-detect=y
CONFIG_PACKAGE_luci-app-temp-status=y
CONFIG_PACKAGE_luci-i18n-temp-status-ru=y
CONFIG_PACKAGE_collectd-mod-sensors=y
-1
View File
@@ -14,7 +14,6 @@ CONFIG_TARGET_mediatek_filogic_DEVICE_asus_tuf-ax4200=y
### Temp and sensors
CONFIG_PACKAGE_lm-sensors=y
CONFIG_PACKAGE_lm-sensors-detect=y
CONFIG_PACKAGE_luci-app-temp-status=y
CONFIG_PACKAGE_luci-i18n-temp-status-ru=y
CONFIG_PACKAGE_collectd-mod-sensors=y
+43
View File
@@ -0,0 +1,43 @@
CONFIG_TARGET_mediatek=y
CONFIG_TARGET_mediatek_filogic=y
CONFIG_TARGET_mediatek_filogic_DEVICE_asus_tuf-ax4200q=y
#include _addons.config
#include _base.config
#include _wifi_en.config
#include _printer.config
#include _samba.config
#include _torrents.config
#include _proxy.config
#include _argon.config
#include _vpn.config
### Temp and sensors
CONFIG_PACKAGE_lm-sensors=y
CONFIG_PACKAGE_luci-app-temp-status=y
CONFIG_PACKAGE_luci-i18n-temp-status-ru=y
CONFIG_PACKAGE_collectd-mod-sensors=y
### HDD tools
CONFIG_PACKAGE_smartmontools=y
CONFIG_PACKAGE_hdparm=y
CONFIG_PACKAGE_hd-idle=y
CONFIG_PACKAGE_luci-app-hd-idle=y
#CONFIG_PACKAGE_luci-i18n-hd-idle-ru=y
CONFIG_PACKAGE_luci-app-disks-info=y
#CONFIG_PACKAGE_luci-i18n-disks-info-ru=y
CONFIG_PACKAGE_luci-app-diskman=y
### Luci dashboard
CONFIG_PACKAGE_luci-mod-dashboard=y
CONFIG_PACKAGE_luci-i18n-dashboard-ru=y
### Network Ports viewer
CONFIG_PACKAGE_luci-app-tn-netports=y
CONFIG_PACKAGE_luci-i18n-tn-netports-ru=y
### TimeControl
CONFIG_PACKAGE_luci-app-timecontrol=m
CONFIG_PACKAGE_fantastic-feeds=m
-1
View File
@@ -14,7 +14,6 @@ CONFIG_TARGET_mediatek_filogic_DEVICE_asus_tuf-ax6000=y
### Temp and sensors
CONFIG_PACKAGE_lm-sensors=y
CONFIG_PACKAGE_lm-sensors-detect=y
CONFIG_PACKAGE_luci-app-temp-status=y
CONFIG_PACKAGE_luci-i18n-temp-status-ru=y
CONFIG_PACKAGE_collectd-mod-sensors=y
+146 -58
View File
@@ -12,21 +12,21 @@ fi
MAKE_JOBS=
XTARGET=
OPT_FULL_REBUILD=false
WIFI_EN=true
KALLSYMS=false
TESTING_KERNEL=false
BUILD_ONLY_INITRAMFS=false
BUILD_SKIP_INITRAMFS=false
ONLY_INIT=false
while getopts "j:t:fiskTI" opt; do
while getopts "j:t:fisWkTI" opt; do
case $opt in
j) MAKE_JOBS=$OPTARG;;
t) XTARGET=$OPTARG;;
f) OPT_FULL_REBUILD=true;;
W) WIFI_EN=false;;
k) KALLSYMS=true;;
T) TESTING_KERNEL=true;;
i) BUILD_ONLY_INITRAMFS=true;;
s) BUILD_SKIP_INITRAMFS=true;;
I) ONLY_INIT=true;;
esac
done
@@ -70,8 +70,9 @@ function build_target {
fi
inclst=$( get_cfg_inc_lst $CFG )
for inc in $inclst; do
incfn=$XDIR/$inc
incfn=$XDIR/_cfginc/$inc
[ ! -f $incfn ] && die "File '$inc' not found!"
[ "$WIFI_EN" == false -a $inc == "_wifi_en.config" ] && continue
sed -i "/#include $inc/a <<LF>><<LF>>" $CFG
sed -i "s/<<LF>>/\n/g" $CFG
sed -i "/#include $inc/ r $incfn" $CFG
@@ -103,28 +104,82 @@ function build_target {
echo "CONFIG_TESTING_KERNEL=y" >> $CFG
fi
X_VERSION_MK=$XDIR/include/version.mk
X_VERSION_NUMBER=$( grep -o -P '(?<=,\$\(VERSION_NUMBER\),).*(?=\))' $X_VERSION_MK 2>/dev/null )
[ -z "$X_VERSION_NUMBER" ] && { echo "ERROR: Cannot determine VERSION_NUMBER"; exit 30; }
echo "VERSION_NUMBER = $X_VERSION_NUMBER"
X_BOARD_NAME=$( sed -n 's/^CONFIG_TARGET_\([^_=\n]\+\)=y$/\1/p' $CFG )
[ -z "$X_BOARD_NAME" ] && { echo "ERROR: cannot found BOARD_NAME"; exit 31; }
X_SUBTARGET_NAME=$( sed -n 's/^CONFIG_TARGET_[^_=\n]\+_\([^_=\n]\+\)=y$/\1/p' $CFG )
[ -z "$X_SUBTARGET_NAME" ] && { echo "ERROR: cannot found SUBTARGET"; exit 31; }
echo "BOARD_NAME = $X_BOARD_NAME SUBTARGET = $X_SUBTARGET_NAME"
VERMAGIC_FN=$XDIR/vermagic-$X_BOARD_NAME-$X_SUBTARGET_NAME-$X_VERSION_NUMBER.list
if [ ! -f $VERMAGIC_FN ] && [ -f $XDIR/vermagic_update.sh ]; then
bash $XDIR/vermagic_update.sh $X_BOARD_NAME $X_SUBTARGET_NAME
if [ ! -f $VERMAGIC_FN ]; then
echo "ERROR: cannot create file $VERMAGIC_FN"
exit 41
fi
fi
if [ 1 = 1 ]; then
MK_IMAGE=$XDIR/include/image.mk
CURDATE=$( date --utc +%y%m%d )
############ change images prefix ############
# IMG_PREFIX:=$(VERSION_DIST_SANITIZED)-$(IMG_PREFIX_VERNUM)$(IMG_PREFIX_VERCODE)$(IMG_PREFIX_EXTRA)$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))
sed -i -e 's/^IMG_PREFIX:=.*/IMG_PREFIX:=$(VERSION_DIST_SANITIZED)-$(call sanitize,$(VERSION_NUMBER))-'$CURDATE'/g' $XDIR/include/image.mk
echo ">>> image.mk patched !!!"
if ! grep -q "(VERSION_NUMBER))-$CURDATE" $MK_IMAGE ; then
############ change images prefix ############
# IMG_PREFIX:=$(VERSION_DIST_SANITIZED)-$(IMG_PREFIX_VERNUM)$(IMG_PREFIX_VERCODE)$(IMG_PREFIX_EXTRA)$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))
sed -i -e 's/^IMG_PREFIX:=.*/IMG_PREFIX:=$(VERSION_DIST_SANITIZED)-$(call sanitize,$(VERSION_NUMBER))-'$CURDATE'/g' $MK_IMAGE
echo ">>> image.mk patched !!! (IMG_PREFIX)"
fi
fi
if [ 1 = 1 ]; then
############ remove "squashfs" suffix ############
# DEVICE_IMG_NAME = $$(DEVICE_IMG_PREFIX)-$$(1)-$$(2)
sed -i -e 's/.*DEVICE_IMG_NAME =.*/ DEVICE_IMG_NAME = $$(DEVICE_IMG_PREFIX)-$$(2)/g' $XDIR/include/image.mk
if grep "squashfs-sys" $XDIR/target/linux/mediatek/image/filogic.mk >/dev/null ; then
MK_IMAGE=$XDIR/include/image.mk
if grep -q 'DEVICE_IMG_NAME = $$(DEVICE_IMG_PREFIX)-$$(1)-$$(2)' $MK_IMAGE ; then
sed -i -e 's/.*DEVICE_IMG_NAME =.*/ DEVICE_IMG_NAME = $$(DEVICE_IMG_PREFIX)-$$(2)/g' $MK_IMAGE
echo ">>> image.mk patched !!! (DEVICE_IMG_NAME)"
fi
if grep -q "squashfs-sys" $XDIR/target/linux/mediatek/image/filogic.mk ; then
sed -i 's/ squashfs-sys/ sys/g' $XDIR/target/linux/mediatek/image/filogic.mk
sed -i 's/ squashfs-sys/ sys/g' $XDIR/target/linux/mediatek/image/mt7622.mk
sed -i 's/ squashfs-sys/ sys/g' $XDIR/target/linux/mediatek/image/mt7623.mk
fi
fi
fi
AWG_LUCI_MK=$XDIR/package/feeds/_ruantiblock/luci-app-ruantiblock/Makefile
if [ -f $AWG_LUCI_MK ]; then
if ! grep "PKG_PROVIDES" $AWG_LUCI_MK >/dev/null ; then
sed -i 's/LUCI_PKGARCH:=all/LUCI_PKGARCH:=all\nPKG_PROVIDES:=luci-app-ruantiblock/g' $AWG_LUCI_MK
if ! grep '^CONFIG_BUILD_ALL_HOST_TOOLS=y' $CFG ; then
MK_HOST_TOOLS=$XDIR/tools/Makefile
# tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_USES_MINOR),y) += yafut
if grep -q '(CONFIG_USES_MINOR),y)' $MK_HOST_TOOLS ; then
# disable build yafut - not support devices with yaffs !!!
sed -i 's/\$(CONFIG_USES_MINOR),y)/,y)/g' $MK_HOST_TOOLS
echo ">>> tools/Makefile patched !!! (disable yafut)"
fi
fi
BATADV_DIR=$XDIR/feeds/luci/protocols/luci-proto-batman-adv/htdocs/luci-static/resources/protocol
if [ -d $BATADV_DIR ]; then
if [ ! -f $BATADV_DIR/batadv_vlan.js ]; then
BATADV_VLAN_URL="https://github.com/luminem/luci/raw/4e0612a45e4be8c58de2bbd21c3bffbcf5252be4/protocols/luci-proto-batman-adv/htdocs/luci-static/resources/protocol/batadv_vlan.js"
curl -sSL "$BATADV_VLAN_URL" -o "$BATADV_DIR/batadv_vlan.js"
echo ">>> batman_adv patched !!!"
fi
fi
LIBUTP_MK=$XDIR/package/feeds/packages/libutp/Makefile
if [ -f $LIBUTP_MK ]; then
if grep -q 'DLIBUTP_ENABLE_WERROR:BOOL=YES' $LIBUTP_MK ; then
sed -i 's/-DLIBUTP_ENABLE_WERROR:BOOL=YES/-DLIBUTP_ENABLE_WERROR:BOOL=NO/' $LIBUTP_MK
echo ">>> libutp patched !!! (disable Werror)"
fi
fi
RAB_LUCI_MK=$XDIR/package/feeds/_ruantiblock/luci-app-ruantiblock/Makefile
if [ -f $RAB_LUCI_MK ]; then
if ! grep "PKG_PROVIDES" $RAB_LUCI_MK >/dev/null ; then
sed -i 's/LUCI_PKGARCH:=all/LUCI_PKGARCH:=all\nPKG_PROVIDES:=luci-app-ruantiblock/g' $RAB_LUCI_MK
echo ">>> ruantiblock patched !!!"
fi
fi
@@ -135,15 +190,38 @@ function build_target {
fi
fi
PODKOP_MK=$XDIR/package/feeds/_podkop/podkop/Makefile
if [ -f $PODKOP_MK ]; then
sed -i 's/+sing-box / /g' $PODKOP_MK
sed -i 's/CONFLICTS:=.*/CONFLICTS:=/g' $PODKOP_MK
fi
PODKOP_SH=$XDIR/package/feeds/_podkop/podkop/files/usr/bin/podkop
if [ -f $PODKOP_SH ] && ! grep -q '(which sing-box)' $PODKOP_SH ; then
sed -i '/,\\"dns_configured\\":/i [ -z "$(which sing-box)" ] && status="not installed"' $PODKOP_SH
echo ">>> podkop patched !!!"
PODKOP_DIR=$XDIR/package/feeds/_podkop
if [ -d $PODKOP_DIR ]; then
PODKOP_PATCH=
PODKOP_MK=$PODKOP_DIR/podkop/Makefile
if [ -f $PODKOP_MK ] && grep -q '+sing-box' $PODKOP_MK ; then
sed -i 's/+sing-box / /g' $PODKOP_MK
sed -i 's/CONFLICTS:=.*/CONFLICTS:=/g' $PODKOP_MK
PODKOP_PATCH="$PODKOP_PATCH (del depend sing-box)"
fi
PODKOP_SH=$PODKOP_DIR/podkop/files/usr/bin/podkop
if [ -f $PODKOP_SH ] && ! grep -q '(which sing-box)' $PODKOP_SH ; then
sed -i '/,\\"dns_configured\\":/i [ -z "$(which sing-box)" ] && status="not installed"' $PODKOP_SH
PODKOP_PATCH="$PODKOP_PATCH (status for sing-box)"
fi
if [ -f $PODKOP_MK ] && grep -q 'PODKOP_VERSION' $PODKOP_MK ; then
PKGVERLIST=$( git ls-remote --tags https://github.com/itdoginfo/podkop.git | awk -F/ '{print $3}' | grep -Ev '^v' | sort -V | tail -n 2 )
VER_PREV=$( sed -n '1p' <<< "$PKGVERLIST" )
VER_LATEST=$( sed -n '2p' <<< "$PKGVERLIST" )
[ -z "$VER_LATEST" ] && { echo "ERROR: cannot detect version of podkop!"; exit 1; }
sed -i 's/PKG_VERSION :=.*/PKG_VERSION:='$VER_LATEST'/g' $PODKOP_MK
PODKOP_PATCH="$PODKOP_PATCH (set ver $VER_LATEST)"
fi
PODKOP_MK=$PODKOP_DIR/luci-app-podkop/Makefile
if [ -f $PODKOP_MK ] && grep -q 'PODKOP_VERSION' $PODKOP_MK ; then
PKGVERLIST=$( git ls-remote --tags https://github.com/itdoginfo/podkop.git | awk -F/ '{print $3}' | grep -Ev '^v' | sort -V | tail -n 2 )
VER_PREV=$( sed -n '1p' <<< "$PKGVERLIST" )
VER_LATEST=$( sed -n '2p' <<< "$PKGVERLIST" )
[ -z "$VER_LATEST" ] && { echo "ERROR: cannot detect version of podkop!"; exit 1; }
sed -i 's/PKG_VERSION :=.*/PKG_VERSION:='$VER_LATEST'/g' $PODKOP_MK
PODKOP_PATCH="$PODKOP_PATCH (Set Ver $VER_LATEST)"
fi
[ "$PODKOP_PATCH" != "" ] && echo ">>> podkop patched !!! $PODKOP_PATCH"
fi
DROPBEAR_MK=$XDIR/package/network/services/dropbear/Makefile
@@ -158,7 +236,16 @@ function build_target {
echo ">>> dropbear patched !!! (disable MODERN_ONLY)"
fi
HOST_TOOLS_DIR=$XDIR/staging_dir/host
HOST_TOOLS_STAGE=0
[ -d $HOST_TOOLS_DIR ] && HOST_TOOLS_STAGE=1
make defconfig
if [ -d $HOST_TOOLS_DIR -a $HOST_TOOLS_STAGE = 0 ]; then
ls -la $HOST_TOOLS_DIR/bin | awk '{print $9 " -> " $11}' | sort > $HOST_TOOLS_DIR/.prereq-build-list
#cat $HOST_TOOLS_DIR/.prereq-build-list | cksum | awk '{print $1}' > $HOST_TOOLS_DIR/.prereq-build-list.crc
fi
NSS_DRV_PPPOE_ENABLE=$( get_cfg_opt_flag $CFG NSS_DRV_PPPOE_ENABLE )
if [ "$NSS_DRV_PPPOE_ENABLE" = y ]; then
@@ -193,7 +280,10 @@ function build_target {
echo -e "\nCONFIG_PACKAGE_wpad-openssl=y\n" >> $CFG
fi
#DASHBRDPO=$XDIR/feeds/luci/modules/luci-mod-dashboard/po/ru/dashboard.po
DASHBRDPO=$XDIR/feeds/luci/modules/luci-mod-dashboard/po/ru/dashboard.po
if [ -f $DASHBRDPO ]; then
sed -i 's/msgid "Dashboard"/msgid "__dash_board__"/g' $DASHBRDPO
fi
DASHBRDPO=$XDIR/package/feeds/luci/luci-mod-dashboard/po/ru/dashboard.po
if [ -f $DASHBRDPO ]; then
sed -i 's/msgid "Dashboard"/msgid "__dash_board__"/g' $DASHBRDPO
@@ -288,6 +378,9 @@ function build_target {
sed -i "s/<<ARCH>>/$TARGET_ARCH_PACKAGES/g" $OPKG_CFEED_FN
logmsg "Added support of Fantastic packages [https://fantastic-packages.github.io/packages]"
fi
if [ $BUILD_ONLY_INITRAMFS = true ]; then
rm -f $OPKG_DIR/customfeeds.conf
fi
SYSCTLCONF_FN=$XDIR/files/etc/sysctl.conf
if [ -f $SYSCTLCONF_FN ]; then
@@ -317,13 +410,19 @@ function build_config {
local cfg=$1
local cfg_name=$( basename $cfg )
local target_name=${cfg_name%.*}
local initramfs=false
local board=$( get_cfg_board $cfg )
local subtarget=$( get_cfg_subtarget $cfg $board )
local device=$( get_cfg_dev_lst $cfg $board $subtarget )
local outdir=$XDIR/bin/targets/$board/$subtarget
echo Start build for target $cfg_name "($board-$subtarget-$device)"
build_target $cfg_name
if echo "$cfg" | grep -q '_initramfs/' ; then
initramfs=true
target_name=${target_name}_initramfs
fi
echo Start build for target $target_name "($board-$subtarget-$device)"
build_target $cfg
if [ ! -f $outdir/kernel-debug.tar.zst ]; then
echo "ERROR: cannot build images for target $target_name"
@@ -338,6 +437,9 @@ function build_config {
if [ "$XTARGET" != "*" ]; then
TARGETCFG=$XDIR/$XTARGET
if [ $BUILD_ONLY_INITRAMFS = true ]; then
TARGETCFG=$XDIR/_initramfs/$XTARGET
fi
XTARGET_EXT="${XTARGET##*.}"
[ $XTARGET_EXT != config ] && TARGETCFG=$TARGETCFG.config
[ ! -f $TARGETCFG ] && die "File '"`basename $TARGETCFG`"' not found!"
@@ -349,7 +451,12 @@ if [ "$XTARGET" != "*" ]; then
fi
XOUT=$XDIR/xout
CFG_LIST=$( find $XDIR/* -maxdepth 1 -name '[a-z0-9]*.config' )
if [ $BUILD_ONLY_INITRAMFS = true ]; then
CFG_LIST=$( find $XDIR/_initramfs/* -maxdepth 1 -name '[a-z0-9]*.config' )
else
CFG_LIST=$( find $XDIR/* -maxdepth 1 -name '[a-z0-9]*.config' )
fi
rm -rf $XOUT
@@ -358,35 +465,16 @@ if [ -z "$CFG_LIST" ]; then
exit 1
fi
INITRAMFS_COUNT=0
if [ $BUILD_ONLY_INITRAMFS = true ]; then
echo "Start make initramfs configs!"
else
echo "Start make non initramfs configs!"
fi
clean_all
for CFG in $CFG_LIST; do
if [[ "$CFG" == *"_initramfs"* ]]; then
INITRAMFS_COUNT=$(( INITRAMFS_COUNT + 1 ))
fi
build_config $CFG
done
if [ $INITRAMFS_COUNT = 0 ] && [ $BUILD_ONLY_INITRAMFS = true ]; then
echo "ERROR: Cannot found initramfs configs!"
exit 1
fi
if [ $INITRAMFS_COUNT -gt 0 ] && [ $BUILD_SKIP_INITRAMFS != true ]; then
echo "Start make initramfs configs!"
clean_all
for CFG in $CFG_LIST; do
[[ "$CFG" != *"_initramfs"* ]] && continue # process only initramfs configs
build_config $CFG
done
fi
if [ $BUILD_ONLY_INITRAMFS != true ]; then
echo "Start make non initramfs configs!"
clean_all
for CFG in $CFG_LIST; do
[[ "$CFG" == *"_initramfs"* ]] && continue # skip initramfs configs
build_config $CFG
done
fi
echo "All targets was builded!"
+2 -2
View File
@@ -4,8 +4,8 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
export XDIR=$SCRIPT_DIR
export XADDONSDIR=$XDIR/package/addons
FEEDSDIR=$XDIR/package/feeds
ADDONSCFG=$XDIR/_addons.config
ADDONSNSS=$XDIR/_addons_nss.config
ADDONSCFG=$XDIR/_cfginc/_addons.config
ADDONSNSS=$XDIR/_cfginc/_addons_nss.config
. ./xcommon.sh
-1
View File
@@ -16,7 +16,6 @@ CONFIG_TARGET_mediatek_filogic_DEVICE_asus_zenwifi-bt8=y
### Temp and sensors
CONFIG_PACKAGE_lm-sensors=y
CONFIG_PACKAGE_lm-sensors-detect=y
CONFIG_PACKAGE_luci-app-temp-status=y
CONFIG_PACKAGE_luci-i18n-temp-status-ru=y
CONFIG_PACKAGE_collectd-mod-sensors=y