mirror of
https://github.com/openwrt-xiaomi/builder.git
synced 2026-02-05 17:07:47 +05:00
Compare commits
28 Commits
dfe28b48e2
...
v24
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4be0aa94a4 | ||
|
|
c86f52cdb4 | ||
|
|
e7b3d9673d | ||
|
|
ebd2e371f2 | ||
|
|
d03288513f | ||
|
|
f4480242f8 | ||
|
|
80aca373ac | ||
|
|
56dad16b45 | ||
|
|
a71f68d967 | ||
|
|
5b6e495bc8 | ||
|
|
e4a6502e6f | ||
|
|
8c4beac735 | ||
|
|
ac0bf84ce1 | ||
|
|
488be8d6d1 | ||
|
|
0babf26e52 | ||
|
|
0aeee17021 | ||
|
|
0fc5ed4afe | ||
|
|
1380b0c663 | ||
|
|
ff59b05218 | ||
|
|
7afa0202ba | ||
|
|
ce52956483 | ||
|
|
a1f00666d4 | ||
|
|
c056d7f32a | ||
|
|
4cf85c12bf | ||
|
|
88a9ebe300 | ||
|
|
757b9b3676 | ||
|
|
fc2ca4f2de | ||
|
|
abdae49448 |
361
.github/workflows/build.yml
vendored
361
.github/workflows/build.yml
vendored
@@ -42,6 +42,14 @@ on:
|
|||||||
options:
|
options:
|
||||||
- true
|
- true
|
||||||
- false
|
- false
|
||||||
|
trx_build:
|
||||||
|
description: 'TRX images build'
|
||||||
|
required: true
|
||||||
|
default: 'false'
|
||||||
|
type: choice
|
||||||
|
options:
|
||||||
|
- true
|
||||||
|
- false
|
||||||
suffix:
|
suffix:
|
||||||
description: 'TAG suffix'
|
description: 'TAG suffix'
|
||||||
required: false
|
required: false
|
||||||
@@ -50,14 +58,13 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
TEST_BUILD: ${{ github.event.inputs.test_build == 'true' }}
|
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' || '' }}
|
TAG_SUFFIX: ${{ github.event.inputs.fake_build == 'true' && '-fake' || github.event.inputs.test_build == 'true' && '-test' || '' }}
|
||||||
TARGET_NAME: ${{ github.event.inputs.target_name }}
|
TARGET_NAME: ${{ github.event.inputs.target_name }}
|
||||||
G_PKG_DIR: ${{ github.event.inputs.package_dir }}
|
G_PKG_DIR: ${{ github.event.inputs.package_dir }}
|
||||||
REPO_URL: https://github.com/openwrt-xiaomi/openwrt
|
REPO_URL: https://github.com/openwrt-xiaomi/openwrt
|
||||||
REPO_LNK: openwrt-xiaomi/openwrt
|
REPO_LNK: openwrt-xiaomi/openwrt
|
||||||
REPO_BRANCH: xq-25.12
|
REPO_BRANCH: xq-24.10
|
||||||
TAG_PREFIX: v25-
|
TAG_PREFIX: v24-
|
||||||
TZ: UTC
|
TZ: UTC
|
||||||
DEVICE_NAME: unknown
|
DEVICE_NAME: unknown
|
||||||
BUILD_DATE: unknown
|
BUILD_DATE: unknown
|
||||||
@@ -204,6 +211,31 @@ jobs:
|
|||||||
- name: Checkout builder
|
- name: Checkout builder
|
||||||
uses: actions/checkout@main
|
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
|
- name: Download OpenWrt sources
|
||||||
run: |
|
run: |
|
||||||
git clone --branch $REPO_BRANCH $REPO_URL.git openwrt
|
git clone --branch $REPO_BRANCH $REPO_URL.git openwrt
|
||||||
@@ -212,10 +244,12 @@ jobs:
|
|||||||
rm -rf openwrt
|
rm -rf openwrt
|
||||||
|
|
||||||
- name: Init builder
|
- name: Init builder
|
||||||
|
env:
|
||||||
|
TOOLS_SRC_HASH: ${{ hashFiles('tools/**') }}
|
||||||
run: |
|
run: |
|
||||||
chmod +x *.sh
|
chmod +x *.sh
|
||||||
#wget https://github.com/fantastic-packages/packages/raw/refs/heads/master/keys/apksign/20241123170031.pub
|
wget https://github.com/fantastic-packages/packages/raw/refs/heads/24.10/keys/usign/53FF2B6672243D28.pub
|
||||||
wget https://fantastic-packages.github.io/releases/25.12/20241123170031.pub
|
echo "TOOLS_SRC_HASH=$TOOLS_SRC_HASH" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Update OpenWrt packages
|
- name: Update OpenWrt packages
|
||||||
id: update
|
id: update
|
||||||
@@ -224,75 +258,14 @@ jobs:
|
|||||||
mkdir -p logs
|
mkdir -p logs
|
||||||
echo "status=success" >> $GITHUB_OUTPUT
|
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
|
- name: Configure
|
||||||
id: configure
|
id: configure
|
||||||
if: steps.update.outputs.status == 'success'
|
if: steps.update.outputs.status == 'success'
|
||||||
env:
|
env:
|
||||||
TARGET: ${{ matrix.target }}
|
TARGET: ${{ matrix.target }}
|
||||||
FW_VER: ${{ needs.check.outputs.fw_ver }}
|
FW_VER: ${{ needs.check.outputs.fw_ver }}
|
||||||
run: |
|
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/' )
|
G_DEVICE_NAME=$( grep -so '^CONFIG_TARGET.*DEVICE.*=y' .config | sed -r 's/.*DEVICE_(.*)=y/\1/' )
|
||||||
[ -z "$G_DEVICE_NAME" ] && exit 31
|
[ -z "$G_DEVICE_NAME" ] && exit 31
|
||||||
G_BOARD_NAME=$( grep -so '^CONFIG_TARGET_BOARD=.*' .config | cut -d'"' -f2 )
|
G_BOARD_NAME=$( grep -so '^CONFIG_TARGET_BOARD=.*' .config | cut -d'"' -f2 )
|
||||||
@@ -325,6 +298,130 @@ jobs:
|
|||||||
cp -f .config logs/config1
|
cp -f .config logs/config1
|
||||||
cp -f .config 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 }}
|
||||||
|
run: |
|
||||||
|
echo USE_CACHE = $USE_CACHE
|
||||||
|
HOST_TOOLS_STG_DIR=staging_dir/host
|
||||||
|
HOST_TOOLS_BLD_DIR=build_dir/host
|
||||||
|
rm -rf staging_dir/
|
||||||
|
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_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
|
||||||
|
########### 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 $TOOLS_STG_DIR/.tools_compile_list | cksum | awk '{print $1}' )
|
||||||
|
echo "TOOLS_COMPILE_CRC=$TOOLS_COMPILE_CRC" >> $GITHUB_ENV
|
||||||
|
#######
|
||||||
|
TOOLS_COMPILE_MASK=$( cat $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
|
||||||
|
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
|
- name: Monitor memory
|
||||||
run: |
|
run: |
|
||||||
echo "CPU cores = $(nproc)"
|
echo "CPU cores = $(nproc)"
|
||||||
@@ -338,24 +435,14 @@ jobs:
|
|||||||
|
|
||||||
- name: Download sources (dl)
|
- name: Download sources (dl)
|
||||||
id: download
|
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: |
|
run: |
|
||||||
make -j$(nproc) download
|
make -j$(nproc) download
|
||||||
echo "status=success" >> $GITHUB_OUTPUT
|
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
|
- name: Build tools and toolchain
|
||||||
id: tools
|
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: |
|
run: |
|
||||||
make toolchain/install -j$(nproc)
|
make toolchain/install -j$(nproc)
|
||||||
echo "status=success" >> $GITHUB_OUTPUT
|
echo "status=success" >> $GITHUB_OUTPUT
|
||||||
@@ -365,26 +452,33 @@ jobs:
|
|||||||
if: steps.tools.outputs.status == 'success'
|
if: steps.tools.outputs.status == 'success'
|
||||||
uses: actions/cache/save@v4
|
uses: actions/cache/save@v4
|
||||||
with:
|
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: |
|
path: |
|
||||||
staging_dir/host
|
staging_dir/host
|
||||||
build_dir/host
|
build_dir/host
|
||||||
|
|
||||||
|
- name: Show host tools stamps
|
||||||
|
run: |
|
||||||
|
ls -la staging_dir/host/stamp/
|
||||||
|
ls -la staging_dir/host/stamp/ > logs/host_stamp_dir.txt
|
||||||
|
|
||||||
- name: Configure 2
|
- name: Configure 2
|
||||||
id: configure2
|
id: configure2
|
||||||
if: steps.tools.outputs.status == 'success'
|
if: steps.tools.outputs.status == 'success'
|
||||||
env:
|
env:
|
||||||
TARGET: ${{ matrix.target }}
|
TARGET: ${{ matrix.target }}
|
||||||
run: |
|
run: |
|
||||||
|
rm -rf logs_backup/
|
||||||
|
cp -a logs logs_backup
|
||||||
make clean
|
make clean
|
||||||
./xmake.sh -I -t $TARGET
|
rm -rf logs
|
||||||
mkdir -p logs
|
cp -a logs_backup logs
|
||||||
|
./xmake.sh $OPT_INITRAMFS -I -t $TARGET
|
||||||
cp -f .config logs/config2
|
cp -f .config logs/config2
|
||||||
[ -f config1 ] && cp -f config1 logs/config1
|
|
||||||
|
|
||||||
- name: Kernel compile
|
- name: Kernel compile
|
||||||
id: kernel
|
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: |
|
run: |
|
||||||
make target/linux/compile -j$(nproc)
|
make target/linux/compile -j$(nproc)
|
||||||
echo "status=success" >> $GITHUB_OUTPUT
|
echo "status=success" >> $GITHUB_OUTPUT
|
||||||
@@ -419,29 +513,57 @@ jobs:
|
|||||||
make V=sc world
|
make V=sc world
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
# process results
|
echo "status=success" >> $GITHUB_OUTPUT
|
||||||
OUT_DIR=bin/targets/$G_BOARD_NAME/$G_SUBTARGET_NAME
|
|
||||||
if [ "$FAKE_BUILD" = "true" ]; then
|
- 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 logs
|
||||||
mkdir -p $OUT_DIR
|
mkdir -p "$OUT_DIR"
|
||||||
echo "$G_BOARD_NAME $G_SUBTARGET_NAME $G_DEVICE_NAME" > "$OUT_DIR/$G_DEVICE_NAME.txt"
|
cd "$OUT_DIR"
|
||||||
touch "$OUT_DIR/kernel-debug.tar.zst"
|
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
|
BLD_VER=$FW_VER
|
||||||
else
|
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
|
fi
|
||||||
echo "Firmware $BLD_VER [$FILE_DATE] builded!"
|
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!"
|
echo "File kernel-debug.tar.zst not found!"
|
||||||
exit 100
|
exit 100
|
||||||
fi
|
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 "status=success" >> $GITHUB_OUTPUT
|
||||||
echo "FW_BUILD_OK=1" >> $GITHUB_ENV
|
echo "FW_BUILD_OK=1" >> $GITHUB_ENV
|
||||||
echo "BLD_VER=$BLD_VER" >> $GITHUB_ENV
|
echo "BLD_VER=$BLD_VER" >> $GITHUB_ENV
|
||||||
echo "OUT_DIR=$OUT_DIR" >> $GITHUB_ENV
|
echo "OUT_DIR=$OUT_DIR" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Mark firmware build failed
|
- name: Mark firmware build failed
|
||||||
if: false # steps.compile.outcome == 'failure'
|
if: false # steps.install.outcome == 'failure' || steps.compile.outcome == 'failure'
|
||||||
run: |
|
run: |
|
||||||
echo "Firmware build failed, continuing pipeline"
|
echo "Firmware build failed, continuing pipeline"
|
||||||
echo "FW_BUILD_OK=0" >> $GITHUB_ENV
|
echo "FW_BUILD_OK=0" >> $GITHUB_ENV
|
||||||
@@ -472,7 +594,7 @@ jobs:
|
|||||||
tar -cJvf logs-$TARGET-$FW_DATE.tar.xz logs
|
tar -cJvf logs-$TARGET-$FW_DATE.tar.xz logs
|
||||||
|
|
||||||
- name: Cleanup OUT directory
|
- name: Cleanup OUT directory
|
||||||
if: steps.compile.outputs.status == 'success'
|
if: steps.install.outputs.status == 'success'
|
||||||
env:
|
env:
|
||||||
OUT_DIR: ${{ env.OUT_DIR }}
|
OUT_DIR: ${{ env.OUT_DIR }}
|
||||||
run: |
|
run: |
|
||||||
@@ -492,7 +614,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Upload OUT directory
|
- name: Upload OUT directory
|
||||||
uses: actions/upload-artifact@main
|
uses: actions/upload-artifact@main
|
||||||
if: steps.compile.outputs.status == 'success'
|
if: steps.install.outputs.status == 'success'
|
||||||
with:
|
with:
|
||||||
name: openwrt-${{ env.BLD_VER }}-${{ needs.check.outputs.build_date }}-${{ env.G_DEVICE_NAME }}
|
name: openwrt-${{ env.BLD_VER }}-${{ needs.check.outputs.build_date }}-${{ env.G_DEVICE_NAME }}
|
||||||
path: ${{ env.OUT_DIR }}
|
path: ${{ env.OUT_DIR }}
|
||||||
@@ -531,19 +653,52 @@ jobs:
|
|||||||
- name: Put images into zip
|
- name: Put images into zip
|
||||||
run: |
|
run: |
|
||||||
mkdir -p public
|
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
|
ls -lh ./public/*.zip
|
||||||
|
|
||||||
- name: Upload assets
|
- name: Generate names
|
||||||
uses: andelf/nightly-release@main
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
TAG: ${{ needs.check.outputs.tag }}
|
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:
|
with:
|
||||||
|
draft: ${{ env.TEST_BUILD == 'true' || github.event.inputs.fake_build == 'true' }}
|
||||||
prerelease: true
|
prerelease: true
|
||||||
tag_name: ${{ needs.check.outputs.tag }}${{ env.TAG_SUFFIX }}
|
tag_name: ${{ env.REL_TAG }}${{ env.TAG_SUFFIX }}
|
||||||
name: '${{ needs.check.outputs.tag }}'
|
name: '${{ env.REL_NAME }}'
|
||||||
body: |
|
body: |
|
||||||
OpenWrt ${{ needs.check.outputs.fw_ver }} [${{ needs.check.outputs.fw_date }}]
|
${{ env.REL_DESC }}
|
||||||
author: [remittor](https://github.com/remittor)
|
author: [remittor](https://github.com/remittor)
|
||||||
files: ./public/*.zip
|
files: ./public/*.zip
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[](https://github.com/openwrt-xiaomi/builder/releases)
|
[](https://github.com/openwrt-xiaomi/builder/releases)
|
||||||
|
[](https://github.com/openwrt-xiaomi/builder/releases)
|
||||||
[](https://github.com/openwrt-xiaomi/builder/releases)
|
[](https://github.com/openwrt-xiaomi/builder/releases)
|
||||||
[](https://github.com/openwrt-xiaomi/builder/releases)
|
|
||||||
[](https://github.com/remittor/donate)
|
[](https://github.com/remittor/donate)
|
||||||
|
|
||||||
# OpenWrt builder
|
# OpenWrt builder
|
||||||
|
|||||||
@@ -45,6 +45,8 @@ CONFIG_PACKAGE_luci-app-filemanager=y
|
|||||||
CONFIG_PACKAGE_luci-i18n-filemanager-ru=y
|
CONFIG_PACKAGE_luci-i18n-filemanager-ru=y
|
||||||
#CONFIG_PACKAGE_atftp=y
|
#CONFIG_PACKAGE_atftp=y
|
||||||
#CONFIG_PACKAGE_atftpd=y
|
#CONFIG_PACKAGE_atftpd=y
|
||||||
|
CONFIG_PACKAGE_lscpu=y
|
||||||
|
CONFIG_PACKAGE_bind-tools=y
|
||||||
CONFIG_PACKAGE_facinstall=y
|
CONFIG_PACKAGE_facinstall=y
|
||||||
|
|
||||||
### Add-on programs
|
### Add-on programs
|
||||||
@@ -121,6 +123,7 @@ CONFIG_PACKAGE_relayd=y
|
|||||||
CONFIG_PACKAGE_luci-proto-relay=y
|
CONFIG_PACKAGE_luci-proto-relay=y
|
||||||
|
|
||||||
### Luci proto
|
### Luci proto
|
||||||
|
CONFIG_PACKAGE_luci-proto-gre=y
|
||||||
CONFIG_PACKAGE_luci-proto-3g=y
|
CONFIG_PACKAGE_luci-proto-3g=y
|
||||||
CONFIG_PACKAGE_luci-proto-ipv6=y
|
CONFIG_PACKAGE_luci-proto-ipv6=y
|
||||||
|
|
||||||
@@ -186,6 +189,7 @@ CONFIG_OPENSSL_WITH_MDC2=y
|
|||||||
CONFIG_OPENSSL_WITH_WHIRLPOOL=y
|
CONFIG_OPENSSL_WITH_WHIRLPOOL=y
|
||||||
|
|
||||||
### SSL certificates
|
### SSL certificates
|
||||||
|
CONFIG_PACKAGE_ca-bundle=y
|
||||||
CONFIG_PACKAGE_ca-certificates=y
|
CONFIG_PACKAGE_ca-certificates=y
|
||||||
|
|
||||||
### Luci
|
### Luci
|
||||||
|
|||||||
@@ -37,12 +37,14 @@ CONFIG_PACKAGE_uboot-envtools=y
|
|||||||
CONFIG_PACKAGE_mtd-utils=y
|
CONFIG_PACKAGE_mtd-utils=y
|
||||||
CONFIG_PACKAGE_iw=y
|
CONFIG_PACKAGE_iw=y
|
||||||
CONFIG_PACKAGE_mc=y
|
CONFIG_PACKAGE_mc=y
|
||||||
|
CONFIG_PACKAGE_rsync=y
|
||||||
CONFIG_PACKAGE_luci-app-ttyd=y
|
CONFIG_PACKAGE_luci-app-ttyd=y
|
||||||
CONFIG_PACKAGE_luci-i18n-ttyd-ru=y
|
CONFIG_PACKAGE_luci-i18n-ttyd-ru=y
|
||||||
CONFIG_PACKAGE_luci-app-filemanager=y
|
CONFIG_PACKAGE_luci-app-filemanager=y
|
||||||
CONFIG_PACKAGE_luci-i18n-filemanager-ru=y
|
CONFIG_PACKAGE_luci-i18n-filemanager-ru=y
|
||||||
CONFIG_PACKAGE_atftp=y
|
CONFIG_PACKAGE_atftp=y
|
||||||
#CONFIG_PACKAGE_atftpd=y
|
#CONFIG_PACKAGE_atftpd=y
|
||||||
|
CONFIG_PACKAGE_lscpu=y
|
||||||
CONFIG_PACKAGE_facinstall=y
|
CONFIG_PACKAGE_facinstall=y
|
||||||
|
|
||||||
CONFIG_PACKAGE_kmod-mtd-rw=y
|
CONFIG_PACKAGE_kmod-mtd-rw=y
|
||||||
@@ -55,6 +57,7 @@ CONFIG_PACKAGE_iperf3=y
|
|||||||
CONFIG_PACKAGE_htop=y
|
CONFIG_PACKAGE_htop=y
|
||||||
CONFIG_PACKAGE_nano=y
|
CONFIG_PACKAGE_nano=y
|
||||||
CONFIG_PACKAGE_ccrypt=y
|
CONFIG_PACKAGE_ccrypt=y
|
||||||
|
CONFIG_PACKAGE_curl=y
|
||||||
CONFIG_PACKAGE_wget=y
|
CONFIG_PACKAGE_wget=y
|
||||||
CONFIG_PACKAGE_patch=y
|
CONFIG_PACKAGE_patch=y
|
||||||
CONFIG_PACKAGE_diffutils=y
|
CONFIG_PACKAGE_diffutils=y
|
||||||
@@ -64,6 +67,10 @@ CONFIG_PACKAGE_terminfo=y
|
|||||||
CONFIG_PACKAGE_zlib=y
|
CONFIG_PACKAGE_zlib=y
|
||||||
CONFIG_PACKAGE_ethtool=y
|
CONFIG_PACKAGE_ethtool=y
|
||||||
|
|
||||||
|
### SSL certificates
|
||||||
|
CONFIG_PACKAGE_ca-bundle=y
|
||||||
|
CONFIG_PACKAGE_ca-certificates=y
|
||||||
|
|
||||||
### Luci
|
### Luci
|
||||||
CONFIG_LUCI_LANG_en=y
|
CONFIG_LUCI_LANG_en=y
|
||||||
CONFIG_LUCI_LANG_ru=y
|
CONFIG_LUCI_LANG_ru=y
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ CONFIG_TARGET_ipq806x_generic_DEVICE_xiaomi_r3d=y
|
|||||||
|
|
||||||
### Temp and sensors
|
### Temp and sensors
|
||||||
CONFIG_PACKAGE_lm-sensors=y
|
CONFIG_PACKAGE_lm-sensors=y
|
||||||
CONFIG_PACKAGE_lm-sensors-detect=y
|
|
||||||
CONFIG_PACKAGE_alpine-fan-control=y
|
CONFIG_PACKAGE_alpine-fan-control=y
|
||||||
CONFIG_PACKAGE_luci-app-alpine-fan-control=y
|
CONFIG_PACKAGE_luci-app-alpine-fan-control=y
|
||||||
CONFIG_PACKAGE_luci-app-temp-status=y
|
CONFIG_PACKAGE_luci-app-temp-status=y
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ CONFIG_TARGET_mediatek_filogic_DEVICE_asus_rt-ax52=y
|
|||||||
|
|
||||||
### Temp and sensors
|
### Temp and sensors
|
||||||
CONFIG_PACKAGE_lm-sensors=y
|
CONFIG_PACKAGE_lm-sensors=y
|
||||||
CONFIG_PACKAGE_lm-sensors-detect=y
|
|
||||||
CONFIG_PACKAGE_luci-app-temp-status=y
|
CONFIG_PACKAGE_luci-app-temp-status=y
|
||||||
CONFIG_PACKAGE_luci-i18n-temp-status-ru=y
|
CONFIG_PACKAGE_luci-i18n-temp-status-ru=y
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ CONFIG_TARGET_mediatek_filogic_DEVICE_asus_rt-ax57m=y
|
|||||||
|
|
||||||
### Temp and sensors
|
### Temp and sensors
|
||||||
CONFIG_PACKAGE_lm-sensors=y
|
CONFIG_PACKAGE_lm-sensors=y
|
||||||
CONFIG_PACKAGE_lm-sensors-detect=y
|
|
||||||
CONFIG_PACKAGE_luci-app-temp-status=y
|
CONFIG_PACKAGE_luci-app-temp-status=y
|
||||||
CONFIG_PACKAGE_luci-i18n-temp-status-ru=y
|
CONFIG_PACKAGE_luci-i18n-temp-status-ru=y
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ CONFIG_TARGET_mediatek_filogic_DEVICE_asus_rt-ax59u=y
|
|||||||
|
|
||||||
### Temp and sensors
|
### Temp and sensors
|
||||||
CONFIG_PACKAGE_lm-sensors=y
|
CONFIG_PACKAGE_lm-sensors=y
|
||||||
CONFIG_PACKAGE_lm-sensors-detect=y
|
|
||||||
CONFIG_PACKAGE_luci-app-temp-status=y
|
CONFIG_PACKAGE_luci-app-temp-status=y
|
||||||
CONFIG_PACKAGE_luci-i18n-temp-status-ru=y
|
CONFIG_PACKAGE_luci-i18n-temp-status-ru=y
|
||||||
CONFIG_PACKAGE_collectd-mod-sensors=y
|
CONFIG_PACKAGE_collectd-mod-sensors=y
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ CONFIG_TARGET_qualcommax_ipq807x_DEVICE_asus_rt-ax89x=y
|
|||||||
|
|
||||||
### Temp and sensors
|
### Temp and sensors
|
||||||
CONFIG_PACKAGE_lm-sensors=y
|
CONFIG_PACKAGE_lm-sensors=y
|
||||||
CONFIG_PACKAGE_lm-sensors-detect=y
|
|
||||||
CONFIG_PACKAGE_luci-app-temp-status=y
|
CONFIG_PACKAGE_luci-app-temp-status=y
|
||||||
CONFIG_PACKAGE_luci-i18n-temp-status-ru=y
|
CONFIG_PACKAGE_luci-i18n-temp-status-ru=y
|
||||||
CONFIG_PACKAGE_collectd-mod-sensors=y
|
CONFIG_PACKAGE_collectd-mod-sensors=y
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ CONFIG_TARGET_mediatek_filogic_DEVICE_asus_tuf-ax4200=y
|
|||||||
|
|
||||||
### Temp and sensors
|
### Temp and sensors
|
||||||
CONFIG_PACKAGE_lm-sensors=y
|
CONFIG_PACKAGE_lm-sensors=y
|
||||||
CONFIG_PACKAGE_lm-sensors-detect=y
|
|
||||||
CONFIG_PACKAGE_luci-app-temp-status=y
|
CONFIG_PACKAGE_luci-app-temp-status=y
|
||||||
CONFIG_PACKAGE_luci-i18n-temp-status-ru=y
|
CONFIG_PACKAGE_luci-i18n-temp-status-ru=y
|
||||||
CONFIG_PACKAGE_collectd-mod-sensors=y
|
CONFIG_PACKAGE_collectd-mod-sensors=y
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ CONFIG_TARGET_mediatek_filogic_DEVICE_asus_tuf-ax4200q=y
|
|||||||
|
|
||||||
### Temp and sensors
|
### Temp and sensors
|
||||||
CONFIG_PACKAGE_lm-sensors=y
|
CONFIG_PACKAGE_lm-sensors=y
|
||||||
CONFIG_PACKAGE_lm-sensors-detect=y
|
|
||||||
CONFIG_PACKAGE_luci-app-temp-status=y
|
CONFIG_PACKAGE_luci-app-temp-status=y
|
||||||
CONFIG_PACKAGE_luci-i18n-temp-status-ru=y
|
CONFIG_PACKAGE_luci-i18n-temp-status-ru=y
|
||||||
CONFIG_PACKAGE_collectd-mod-sensors=y
|
CONFIG_PACKAGE_collectd-mod-sensors=y
|
||||||
@@ -40,3 +39,5 @@ CONFIG_PACKAGE_luci-i18n-tn-netports-ru=y
|
|||||||
### TimeControl
|
### TimeControl
|
||||||
CONFIG_PACKAGE_luci-app-timecontrol=m
|
CONFIG_PACKAGE_luci-app-timecontrol=m
|
||||||
|
|
||||||
|
CONFIG_PACKAGE_fantastic-feeds=m
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ CONFIG_TARGET_mediatek_filogic_DEVICE_asus_tuf-ax6000=y
|
|||||||
|
|
||||||
### Temp and sensors
|
### Temp and sensors
|
||||||
CONFIG_PACKAGE_lm-sensors=y
|
CONFIG_PACKAGE_lm-sensors=y
|
||||||
CONFIG_PACKAGE_lm-sensors-detect=y
|
|
||||||
CONFIG_PACKAGE_luci-app-temp-status=y
|
CONFIG_PACKAGE_luci-app-temp-status=y
|
||||||
CONFIG_PACKAGE_luci-i18n-temp-status-ru=y
|
CONFIG_PACKAGE_luci-i18n-temp-status-ru=y
|
||||||
CONFIG_PACKAGE_collectd-mod-sensors=y
|
CONFIG_PACKAGE_collectd-mod-sensors=y
|
||||||
|
|||||||
147
xmake.sh
147
xmake.sh
@@ -101,28 +101,74 @@ function build_target {
|
|||||||
echo "CONFIG_TESTING_KERNEL=y" >> $CFG
|
echo "CONFIG_TESTING_KERNEL=y" >> $CFG
|
||||||
fi
|
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 -a -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
|
if [ 1 = 1 ]; then
|
||||||
|
MK_IMAGE=$XDIR/include/image.mk
|
||||||
CURDATE=$( date --utc +%y%m%d )
|
CURDATE=$( date --utc +%y%m%d )
|
||||||
############ change images prefix ############
|
if ! grep -q "(VERSION_NUMBER))-$CURDATE" $MK_IMAGE ; then
|
||||||
# IMG_PREFIX:=$(VERSION_DIST_SANITIZED)-$(IMG_PREFIX_VERNUM)$(IMG_PREFIX_VERCODE)$(IMG_PREFIX_EXTRA)$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))
|
############ change images prefix ############
|
||||||
sed -i -e 's/^IMG_PREFIX:=.*/IMG_PREFIX:=$(VERSION_DIST_SANITIZED)-$(call sanitize,$(VERSION_NUMBER))-'$CURDATE'/g' $XDIR/include/image.mk
|
# IMG_PREFIX:=$(VERSION_DIST_SANITIZED)-$(IMG_PREFIX_VERNUM)$(IMG_PREFIX_VERCODE)$(IMG_PREFIX_EXTRA)$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))
|
||||||
echo ">>> image.mk patched !!!"
|
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
|
fi
|
||||||
if [ 1 = 1 ]; then
|
if [ 1 = 1 ]; then
|
||||||
############ remove "squashfs" suffix ############
|
############ remove "squashfs" suffix ############
|
||||||
# DEVICE_IMG_NAME = $$(DEVICE_IMG_PREFIX)-$$(1)-$$(2)
|
MK_IMAGE=$XDIR/include/image.mk
|
||||||
sed -i -e 's/.*DEVICE_IMG_NAME =.*/ DEVICE_IMG_NAME = $$(DEVICE_IMG_PREFIX)-$$(2)/g' $XDIR/include/image.mk
|
if grep -q 'DEVICE_IMG_NAME = $$(DEVICE_IMG_PREFIX)-$$(1)-$$(2)' $MK_IMAGE ; then
|
||||||
if grep "squashfs-sys" $XDIR/target/linux/mediatek/image/filogic.mk >/dev/null ; 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/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/mt7622.mk
|
||||||
sed -i 's/ squashfs-sys/ sys/g' $XDIR/target/linux/mediatek/image/mt7623.mk
|
sed -i 's/ squashfs-sys/ sys/g' $XDIR/target/linux/mediatek/image/mt7623.mk
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
RAB_LUCI_MK=$XDIR/package/feeds/_ruantiblock/luci-app-ruantiblock/Makefile
|
RAB_LUCI_MK=$XDIR/package/feeds/_ruantiblock/luci-app-ruantiblock/Makefile
|
||||||
if [ -f $RAB_LUCI_MK ]; then
|
if [ -f $RAB_LUCI_MK ]; then
|
||||||
if ! grep "PKG_PROVIDES" $RAB_LUCI_MK >/dev/null ; 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
|
sed -i 's/LUCI_PKGARCH:=all/LUCI_PKGARCH:=all\nPKG_PROVIDES:=luci-app-ruantiblock/g' $RAB_LUCI_MK
|
||||||
|
echo ">>> ruantiblock patched !!!"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -167,42 +213,28 @@ function build_target {
|
|||||||
[ "$PODKOP_PATCH" != "" ] && echo ">>> podkop patched !!! $PODKOP_PATCH"
|
[ "$PODKOP_PATCH" != "" ] && echo ">>> podkop patched !!! $PODKOP_PATCH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DROPBEAR_DIR=$XDIR/package/network/services/dropbear
|
DROPBEAR_MK=$XDIR/package/network/services/dropbear/Makefile
|
||||||
DROPBEAR_MK=$DROPBEAR_DIR/Makefile
|
|
||||||
TMP_DROPBEAR_DIR=$XDIR/_dropbear2024
|
|
||||||
TMP_DROPBEAR_MK=$TMP_DROPBEAR_DIR/Makefile
|
|
||||||
if [ -f $DROPBEAR_MK ]; then
|
if [ -f $DROPBEAR_MK ]; then
|
||||||
# download dropbear 2024.86 (OpenWrt v24.10)
|
|
||||||
if [ ! -f $TMP_DROPBEAR_DIR/Makefile ]; then
|
|
||||||
rm -rf $TMP_DROPBEAR_DIR
|
|
||||||
git clone --depth 1 --filter=blob:none --sparse https://github.com/openwrt/openwrt.git $TMP_DROPBEAR_DIR && (
|
|
||||||
cd $TMP_DROPBEAR_DIR
|
|
||||||
git sparse-checkout set package/network/services/dropbear
|
|
||||||
git checkout a2f0cd35ac1d15e69f4897b35c049e175dd06825 # commit 2024-12-12 https://github.com/openwrt/openwrt/commits/openwrt-25.12/package/network/services/dropbear
|
|
||||||
mv package/network/services/dropbear/* .
|
|
||||||
)
|
|
||||||
rm -rf $TMP_DROPBEAR_DIR/package
|
|
||||||
rm -rf $TMP_DROPBEAR_DIR/.git
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if [ -f $TMP_DROPBEAR_MK ] && ! grep -q 'PKG_RELEASE:=0' $TMP_DROPBEAR_MK ; then
|
|
||||||
# patch: Disable MODERN and enable RSA/DH-SHA1
|
# patch: Disable MODERN and enable RSA/DH-SHA1
|
||||||
sed -i 's/^PKG_RELEASE:=.*/PKG_RELEASE:=0/g' $TMP_DROPBEAR_MK
|
sed -i 's/^PKG_RELEASE:=.*/PKG_RELEASE:=0/g' $DROPBEAR_MK
|
||||||
sed -i '/,CONFIG_DROPBEAR_MODERN_ONLY,/d' $TMP_DROPBEAR_MK
|
sed -i '/,CONFIG_DROPBEAR_MODERN_ONLY,/d' $DROPBEAR_MK
|
||||||
sed -i 's/\tCONFIG_DROPBEAR_MODERN_ONLY/ /g' $TMP_DROPBEAR_MK
|
sed -i 's/\tCONFIG_DROPBEAR_MODERN_ONLY/ /g' $DROPBEAR_MK
|
||||||
sed -i 's/ CONFIG_DROPBEAR_MODERN_ONLY/ /g' $TMP_DROPBEAR_MK
|
sed -i 's/ CONFIG_DROPBEAR_MODERN_ONLY/ /g' $DROPBEAR_MK
|
||||||
sed -i 's/DROPBEAR_DH_GROUP14_SHA1,0/ /g' $TMP_DROPBEAR_MK
|
sed -i 's/DROPBEAR_DH_GROUP14_SHA1,0/ /g' $DROPBEAR_MK
|
||||||
sed -i 's/DROPBEAR_SHA1_HMAC,0/ /g' $TMP_DROPBEAR_MK
|
sed -i 's/DROPBEAR_SHA1_HMAC,0/ /g' $DROPBEAR_MK
|
||||||
echo ">>> dropbear patched !!! (disable MODERN_ONLY)"
|
echo ">>> dropbear patched !!! (disable MODERN_ONLY)"
|
||||||
fi
|
fi
|
||||||
if [ -f $DROPBEAR_MK ] && [ -f $TMP_DROPBEAR_MK ] && ! cmp -s $DROPBEAR_MK $TMP_DROPBEAR_MK ; then
|
|
||||||
# downgrade dropbear to 2024.86 (OpenWrt v24.10)
|
HOST_TOOLS_DIR=$XDIR/staging_dir/host
|
||||||
rm -rf $DROPBEAR_DIR/*
|
HOST_TOOLS_STAGE=0
|
||||||
cp -a $TMP_DROPBEAR_DIR/. $DROPBEAR_DIR/
|
[ -d $HOST_TOOLS_DIR ] && HOST_TOOLS_STAGE=1
|
||||||
echo ">>> dropbear downgraded to 2024.86 !!!"
|
|
||||||
fi
|
|
||||||
|
|
||||||
make defconfig
|
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 )
|
NSS_DRV_PPPOE_ENABLE=$( get_cfg_opt_flag $CFG NSS_DRV_PPPOE_ENABLE )
|
||||||
if [ "$NSS_DRV_PPPOE_ENABLE" = y ]; then
|
if [ "$NSS_DRV_PPPOE_ENABLE" = y ]; then
|
||||||
@@ -312,32 +344,31 @@ function build_target {
|
|||||||
echo "Patch '$(basename $incfn)' result: OK"
|
echo "Patch '$(basename $incfn)' result: OK"
|
||||||
done
|
done
|
||||||
|
|
||||||
APK_DIR=$XDIR/files/etc/apk
|
OPKG_DIR=$XDIR/files/etc/opkg
|
||||||
if [ -d $APK_DIR ]; then
|
if [ -d $OPKG_DIR ]; then
|
||||||
rm -rf $APK_DIR
|
rm -rf $OPKG_DIR
|
||||||
fi
|
fi
|
||||||
FANT_PKG_KEY=$XDIR/20241123170031.pub
|
FANT_PKG_KEY=$XDIR/53FF2B6672243D28.pub
|
||||||
if [ -f $FANT_PKG_KEY ]; then
|
if [ -f $FANT_PKG_KEY ]; then
|
||||||
APK_SRC_DIR=$XDIR/package/system/apk/files
|
OPKG_SRC_DIR=$XDIR/package/system/opkg/files
|
||||||
APK_KEYS_DIR=$APK_DIR/keys
|
OPKG_KEYS_DIR=$OPKG_DIR/keys
|
||||||
mkdir -p $APK_KEYS_DIR
|
mkdir -p $OPKG_KEYS_DIR
|
||||||
cp $FANT_PKG_KEY $APK_KEYS_DIR/fantastic-packages-20241123170031.pem
|
cp $FANT_PKG_KEY $OPKG_KEYS_DIR/53ff2b6672243d28
|
||||||
APK_CFEED_FN=$APK_DIR/repositories.d/customfeeds.list
|
OPKG_CFEED_FN=$OPKG_DIR/customfeeds.conf
|
||||||
mkdir -p $APK_DIR/repositories.d
|
cp $OPKG_SRC_DIR/customfeeds.conf $OPKG_CFEED_FN
|
||||||
cp $APK_SRC_DIR/customfeeds.list $APK_CFEED_FN
|
PKG_LINK="https://fantastic-packages.github.io/packages/releases/<<VER>>/packages/<<ARCH>>"
|
||||||
PKG_LINK="https://fantastic-packages.github.io/releases/<<VER>>/packages/<<ARCH>>"
|
echo "" >> $OPKG_CFEED_FN
|
||||||
echo "" >> $APK_CFEED_FN
|
echo "src/gz fantastic_packages_luci $PKG_LINK/luci" >> $OPKG_CFEED_FN
|
||||||
echo "$PKG_LINK/luci/packages.adb" >> $APK_CFEED_FN
|
echo "src/gz fantastic_packages_packages $PKG_LINK/packages" >> $OPKG_CFEED_FN
|
||||||
echo "$PKG_LINK/packages/packages.adb" >> $APK_CFEED_FN
|
echo "src/gz fantastic_packages_special $PKG_LINK/special" >> $OPKG_CFEED_FN
|
||||||
echo "$PKG_LINK/special/packages.adb" >> $APK_CFEED_FN
|
|
||||||
TARGET_ARCH_PACKAGES=$( get_cfg_opt_value $CFG TARGET_ARCH_PACKAGES )
|
TARGET_ARCH_PACKAGES=$( get_cfg_opt_value $CFG TARGET_ARCH_PACKAGES )
|
||||||
[ -z "$TARGET_ARCH_PACKAGES" ] && die "Cannot find TARGET ARCH"
|
[ -z "$TARGET_ARCH_PACKAGES" ] && die "Cannot find TARGET ARCH"
|
||||||
sed -i "s/<<VER>>/25.12/g" $APK_CFEED_FN
|
sed -i "s/<<VER>>/24.10/g" $OPKG_CFEED_FN
|
||||||
sed -i "s/<<ARCH>>/$TARGET_ARCH_PACKAGES/g" $APK_CFEED_FN
|
sed -i "s/<<ARCH>>/$TARGET_ARCH_PACKAGES/g" $OPKG_CFEED_FN
|
||||||
logmsg "Added support of Fantastic packages [https://fantastic-packages.github.io/releases]"
|
logmsg "Added support of Fantastic packages [https://fantastic-packages.github.io/packages]"
|
||||||
fi
|
fi
|
||||||
if [ $BUILD_ONLY_INITRAMFS = true ]; then
|
if [ $BUILD_ONLY_INITRAMFS = true ]; then
|
||||||
rm -f $APK_DIR/repositories.d/customfeeds.list
|
rm -f $OPKG_DIR/customfeeds.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
SYSCTLCONF_FN=$XDIR/files/etc/sysctl.conf
|
SYSCTLCONF_FN=$XDIR/files/etc/sysctl.conf
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ CONFIG_TARGET_mediatek_filogic_DEVICE_asus_zenwifi-bt8=y
|
|||||||
|
|
||||||
### Temp and sensors
|
### Temp and sensors
|
||||||
CONFIG_PACKAGE_lm-sensors=y
|
CONFIG_PACKAGE_lm-sensors=y
|
||||||
CONFIG_PACKAGE_lm-sensors-detect=y
|
|
||||||
CONFIG_PACKAGE_luci-app-temp-status=y
|
CONFIG_PACKAGE_luci-app-temp-status=y
|
||||||
CONFIG_PACKAGE_luci-i18n-temp-status-ru=y
|
CONFIG_PACKAGE_luci-i18n-temp-status-ru=y
|
||||||
CONFIG_PACKAGE_collectd-mod-sensors=y
|
CONFIG_PACKAGE_collectd-mod-sensors=y
|
||||||
|
|||||||
Reference in New Issue
Block a user