mirror of
https://github.com/openwrt-xiaomi/builder.git
synced 2026-11-04 16:28:44 +05:00
Compare commits
46
Commits
v25-260123
...
dfe28b48e2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dfe28b48e2 | ||
|
|
4c16b18d55 | ||
|
|
a906be818e | ||
|
|
fc841c5a6d | ||
|
|
1d4e85a28d | ||
|
|
1aa0b402c5 | ||
|
|
ca4573f31f | ||
|
|
f01482890b | ||
|
|
510a31e7ec | ||
|
|
8f6a81ecd2 | ||
|
|
68cb027109 | ||
|
|
acff39477b | ||
|
|
e57e548f61 | ||
|
|
eb978ba58e | ||
|
|
61f33e4c33 | ||
|
|
0a66ad1f3a | ||
|
|
e67a3d001b | ||
|
|
b01b370c51 | ||
|
|
75542fe301 | ||
|
|
8739c51995 | ||
|
|
ea8d7eea5f | ||
|
|
1d93b461b7 | ||
|
|
cfc8241f53 | ||
|
|
8c2f6fd7de | ||
|
|
e021297496 | ||
|
|
0cb316891c | ||
|
|
aed5f171a8 | ||
|
|
08cccf41b7 | ||
|
|
e6e97ddbc8 | ||
|
|
b650894e8a | ||
|
|
78cc0dee60 | ||
|
|
0b066fe854 | ||
|
|
67e187b849 | ||
|
|
ef5e7155b5 | ||
|
|
b788e7e165 | ||
|
|
a775b82e5b | ||
|
|
f9ab8e3841 | ||
|
|
4e7389f304 | ||
|
|
887d928a4b | ||
|
|
5167d394e1 | ||
|
|
dd3a9395f2 | ||
|
|
2f112defb4 | ||
|
|
9104838c9b | ||
|
|
4e60cabc73 | ||
|
|
295d495e81 | ||
|
|
d147c0c72d |
No files matched your search
+287
-38
@@ -3,6 +3,37 @@ name: build
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
|
use_cache:
|
||||||
|
description: 'Restore cache for host tools'
|
||||||
|
required: true
|
||||||
|
default: 'true'
|
||||||
|
type: choice
|
||||||
|
options:
|
||||||
|
- true
|
||||||
|
- false
|
||||||
|
cache_ver:
|
||||||
|
description: 'Use cache version'
|
||||||
|
required: false
|
||||||
|
default: '0'
|
||||||
|
type: string
|
||||||
|
test_build:
|
||||||
|
description: 'Test build (only spec target) '
|
||||||
|
required: true
|
||||||
|
default: 'false'
|
||||||
|
type: choice
|
||||||
|
options:
|
||||||
|
- true
|
||||||
|
- false
|
||||||
|
target_name:
|
||||||
|
description: 'Target Name for test build'
|
||||||
|
required: false
|
||||||
|
default: 'r3d'
|
||||||
|
type: string
|
||||||
|
package_dir:
|
||||||
|
description: 'Package Dir for test build'
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
|
type: string
|
||||||
fake_build:
|
fake_build:
|
||||||
description: 'Fake build'
|
description: 'Fake build'
|
||||||
required: true
|
required: true
|
||||||
@@ -18,13 +49,15 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
|
|
||||||
env:
|
env:
|
||||||
FAKE_BUILD: ${{ github.event.inputs.fake_build }}
|
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 }}
|
||||||
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-24.10
|
REPO_BRANCH: xq-25.12
|
||||||
TAG_PREFIX: v24-
|
TAG_PREFIX: v25-
|
||||||
BUILD_ROOT: ${{ github.workspace }}/openwrt
|
|
||||||
DEPENDENCIES: ${{ github.workspace }}/dependencies-ubuntu.txt
|
|
||||||
TZ: UTC
|
TZ: UTC
|
||||||
DEVICE_NAME: unknown
|
DEVICE_NAME: unknown
|
||||||
BUILD_DATE: unknown
|
BUILD_DATE: unknown
|
||||||
@@ -45,6 +78,9 @@ jobs:
|
|||||||
fw_date: ${{ steps.gh.outputs.fw_date }}
|
fw_date: ${{ steps.gh.outputs.fw_date }}
|
||||||
fw_ver: ${{ steps.gh.outputs.fw_ver }}
|
fw_ver: ${{ steps.gh.outputs.fw_ver }}
|
||||||
is_active: ${{ steps.activity.outputs.is_active }}
|
is_active: ${{ steps.activity.outputs.is_active }}
|
||||||
|
test_build: ${{ env.TEST_BUILD }}
|
||||||
|
target_name: ${{ env.TARGET_NAME }}
|
||||||
|
fake_build: ${{ env.FAKE_BUILD }}
|
||||||
steps:
|
steps:
|
||||||
- name: Get repo data via GH API
|
- name: Get repo data via GH API
|
||||||
id: gh
|
id: gh
|
||||||
@@ -121,9 +157,16 @@ jobs:
|
|||||||
- rt-ax57m
|
- rt-ax57m
|
||||||
- rt-ax59u
|
- rt-ax59u
|
||||||
- rt-ax89x
|
- rt-ax89x
|
||||||
- tuf_ax4200
|
- tuf-ax4200
|
||||||
- tuf_ax6000
|
- tuf-ax4200q
|
||||||
|
- tuf-ax6000
|
||||||
- zen-bt8
|
- zen-bt8
|
||||||
|
isTest:
|
||||||
|
- ${{ needs.check.outputs.test_build == 'true' }}
|
||||||
|
exclude:
|
||||||
|
- { isTest: true }
|
||||||
|
include:
|
||||||
|
- target: ${{ github.event.inputs.target_name }}
|
||||||
steps:
|
steps:
|
||||||
- name: Initialization environment
|
- name: Initialization environment
|
||||||
env:
|
env:
|
||||||
@@ -131,7 +174,10 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
sudo apt-get -qq update
|
sudo apt-get -qq update
|
||||||
#sudo apt-get -qq update && sudo apt-get -qq upgrade
|
#sudo apt-get -qq update && sudo apt-get -qq upgrade
|
||||||
sudo apt-get -qq install $(cat $DEPENDENCIES)
|
sudo apt-get -qq install build-essential gawk flex rsync swig unzip zlib1g-dev file wget
|
||||||
|
sudo apt-get -qq install libc6-dev clang bison g++ gcc-multilib g++-multilib
|
||||||
|
sudo apt-get -qq install gettext git libncurses5-dev libssl-dev python3-setuptools
|
||||||
|
sudo apt-get -qq install libc6-dev pkg-config squashfs-tools
|
||||||
sudo apt-get -qq autoremove --purge
|
sudo apt-get -qq autoremove --purge
|
||||||
sudo apt-get -qq clean
|
sudo apt-get -qq clean
|
||||||
sudo timedatectl set-timezone "$TZ"
|
sudo timedatectl set-timezone "$TZ"
|
||||||
@@ -144,40 +190,108 @@ jobs:
|
|||||||
remove-haskell: true
|
remove-haskell: true
|
||||||
remove-codeql: true
|
remove-codeql: true
|
||||||
remove-docker-images: true
|
remove-docker-images: true
|
||||||
|
|
||||||
|
- name: Set fixed workspace
|
||||||
|
env:
|
||||||
|
GITHUB_WORKSPACE: ${{ github.workspace }}
|
||||||
|
run: |
|
||||||
|
sudo mkdir -p $GITHUB_WORKSPACE/_temp
|
||||||
|
#sudo chown -R $USER:$USER $GITHUB_WORKSPACE
|
||||||
|
echo "GITHUB_WORKSPACE = $GITHUB_WORKSPACE"
|
||||||
|
echo "GITHUB_WORKSPACE=$GITHUB_WORKSPACE" >> $GITHUB_ENV
|
||||||
|
echo "RUNNER_TEMP=$GITHUB_WORKSPACE/_temp" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Checkout builder
|
- name: Checkout builder
|
||||||
uses: actions/checkout@main
|
uses: actions/checkout@main
|
||||||
|
|
||||||
- name: Download OpenWrt sources
|
- name: Download OpenWrt sources
|
||||||
run: git clone --branch $REPO_BRANCH $REPO_URL.git $BUILD_ROOT
|
run: |
|
||||||
|
git clone --branch $REPO_BRANCH $REPO_URL.git openwrt
|
||||||
|
rm -rf .git
|
||||||
|
rsync -a openwrt/ ./
|
||||||
|
rm -rf openwrt
|
||||||
|
|
||||||
- name: Init builder
|
- name: Init builder
|
||||||
env:
|
|
||||||
BLDROOT: ${{ github.workspace }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
run: |
|
||||||
rsync -avq --exclude=".*" --exclude="$(basename $BUILD_ROOT)" $BLDROOT/ $BUILD_ROOT/
|
|
||||||
cd $BUILD_ROOT
|
|
||||||
chmod +x *.sh
|
chmod +x *.sh
|
||||||
wget https://github.com/fantastic-packages/packages/raw/refs/heads/24.10/keys/usign/53FF2B6672243D28.pub
|
#wget https://github.com/fantastic-packages/packages/raw/refs/heads/master/keys/apksign/20241123170031.pub
|
||||||
|
wget https://fantastic-packages.github.io/releases/25.12/20241123170031.pub
|
||||||
|
|
||||||
- name: Update OpenWrt packages
|
- name: Update OpenWrt packages
|
||||||
id: update
|
id: update
|
||||||
run: |
|
run: |
|
||||||
cd $BUILD_ROOT && ./xupdate.sh -f
|
./xupdate.sh -f
|
||||||
|
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
|
echo "status=success" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Build the firmware image
|
- name: Restore cache for host tools
|
||||||
id: compile
|
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'
|
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: |
|
||||||
cd $BUILD_ROOT
|
|
||||||
MAKE_JOBS=$(($(nproc)+1))
|
|
||||||
echo "$MAKE_JOBS thread compile"
|
|
||||||
# init build config
|
|
||||||
./xmake.sh -I -t $TARGET
|
./xmake.sh -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
|
||||||
@@ -185,6 +299,8 @@ jobs:
|
|||||||
[ -z "$G_BOARD_NAME" ] && exit 32
|
[ -z "$G_BOARD_NAME" ] && exit 32
|
||||||
G_SUBTARGET_NAME=$( grep -so '^CONFIG_TARGET_SUBTARGET=.*' .config | cut -d'"' -f2 )
|
G_SUBTARGET_NAME=$( grep -so '^CONFIG_TARGET_SUBTARGET=.*' .config | cut -d'"' -f2 )
|
||||||
[ -z "$G_SUBTARGET_NAME" ] && exit 33
|
[ -z "$G_SUBTARGET_NAME" ] && exit 33
|
||||||
|
G_TARGET_ARCH=$( grep -so '^CONFIG_TARGET_ARCH_PACKAGES=.*' .config | cut -d'"' -f2 )
|
||||||
|
echo "G_TARGET_ARCH = $G_TARGET_ARCH"
|
||||||
VERMAGIC_LIST="vermagic-$G_BOARD_NAME-$G_SUBTARGET_NAME-*.list"
|
VERMAGIC_LIST="vermagic-$G_BOARD_NAME-$G_SUBTARGET_NAME-*.list"
|
||||||
if [ $(find . -maxdepth 1 -name "$VERMAGIC_LIST" | wc -l) = "0" ]; then
|
if [ $(find . -maxdepth 1 -name "$VERMAGIC_LIST" | wc -l) = "0" ]; then
|
||||||
./vermagic_update.sh $G_BOARD_NAME $G_SUBTARGET_NAME
|
./vermagic_update.sh $G_BOARD_NAME $G_SUBTARGET_NAME
|
||||||
@@ -192,17 +308,124 @@ jobs:
|
|||||||
if [ $(find . -maxdepth 1 -name "$VERMAGIC_LIST" | wc -l) = "0" ]; then
|
if [ $(find . -maxdepth 1 -name "$VERMAGIC_LIST" | wc -l) = "0" ]; then
|
||||||
exit 41
|
exit 41
|
||||||
fi
|
fi
|
||||||
# run build
|
|
||||||
[ "$FAKE_BUILD" != "true" ] && make -j $MAKE_JOBS download world
|
|
||||||
# process results
|
|
||||||
FILE_DATE=$(date --utc +'%y%m%d')
|
FILE_DATE=$(date --utc +'%y%m%d')
|
||||||
OUT_DIR=$BUILD_ROOT/bin/targets/$G_BOARD_NAME/$G_SUBTARGET_NAME
|
echo "status=success" >> $GITHUB_OUTPUT
|
||||||
|
echo "FW_VER=$FW_VER" >> $GITHUB_ENV
|
||||||
|
echo "G_DEVICE_NAME=$G_DEVICE_NAME" >> $GITHUB_ENV
|
||||||
|
echo "G_BOARD_NAME=$G_BOARD_NAME" >> $GITHUB_ENV
|
||||||
|
echo "G_SUBTARGET_NAME=$G_SUBTARGET_NAME" >> $GITHUB_ENV
|
||||||
|
echo "G_TARGET_ARCH=$G_TARGET_ARCH" >> $GITHUB_ENV
|
||||||
|
echo "FILE_DATE=$FILE_DATE" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Dump .config file
|
||||||
|
run: |
|
||||||
|
echo "====== .config ========="
|
||||||
|
cat .config
|
||||||
|
echo "========================"
|
||||||
|
cp -f .config logs/config1
|
||||||
|
cp -f .config config1
|
||||||
|
|
||||||
|
- name: Monitor memory
|
||||||
|
run: |
|
||||||
|
echo "CPU cores = $(nproc)"
|
||||||
|
echo "Memory and swap:"
|
||||||
|
sudo free -h
|
||||||
|
echo
|
||||||
|
sudo swapon --show
|
||||||
|
echo
|
||||||
|
echo "Available storage:"
|
||||||
|
sudo df -h
|
||||||
|
|
||||||
|
- name: Download sources (dl)
|
||||||
|
id: download
|
||||||
|
if: ${{ steps.configure.outputs.status == 'success' && github.event.inputs.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' }}
|
||||||
|
run: |
|
||||||
|
make toolchain/install -j$(nproc)
|
||||||
|
echo "status=success" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Save cache for host tools
|
||||||
|
id: tools_cache_save
|
||||||
|
if: steps.tools.outputs.status == 'success'
|
||||||
|
uses: actions/cache/save@v4
|
||||||
|
with:
|
||||||
|
key: host-tools-${{ env.CACHE_VER }}-${{ env.CACHE_ARCH }}-${{ hashFiles('tools/**') }}
|
||||||
|
path: |
|
||||||
|
staging_dir/host
|
||||||
|
build_dir/host
|
||||||
|
|
||||||
|
- name: Configure 2
|
||||||
|
id: configure2
|
||||||
|
if: steps.tools.outputs.status == 'success'
|
||||||
|
env:
|
||||||
|
TARGET: ${{ matrix.target }}
|
||||||
|
run: |
|
||||||
|
make clean
|
||||||
|
./xmake.sh -I -t $TARGET
|
||||||
|
mkdir -p logs
|
||||||
|
cp -f .config logs/config2
|
||||||
|
[ -f config1 ] && cp -f config1 logs/config1
|
||||||
|
|
||||||
|
- name: Kernel compile
|
||||||
|
id: kernel
|
||||||
|
if: ${{ steps.tools.outputs.status == 'success' && github.event.inputs.fake_build != 'true' }}
|
||||||
|
run: |
|
||||||
|
make target/linux/compile -j$(nproc)
|
||||||
|
echo "status=success" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Monitor memory 2
|
||||||
|
run: |
|
||||||
|
echo "Memory and swap:"
|
||||||
|
sudo free -h
|
||||||
|
echo
|
||||||
|
sudo swapon --show
|
||||||
|
echo
|
||||||
|
echo "Available storage:"
|
||||||
|
sudo df -h
|
||||||
|
|
||||||
|
- name: Build the firmware image
|
||||||
|
id: compile
|
||||||
|
if: steps.tools.outputs.status == 'success'
|
||||||
|
env:
|
||||||
|
TARGET: ${{ matrix.target }}
|
||||||
|
run: |
|
||||||
|
echo "Run $(nproc) thread compile"
|
||||||
|
if [ "$FAKE_BUILD" != "true" -a "$TEST_BUILD" = "true" -a "$G_PKG_DIR" != "" ]; then
|
||||||
|
make target/linux/compile -j$(npoc)
|
||||||
|
echo "=============== BUILD PACKAGE: $G_PKG_DIR ==============="
|
||||||
|
make $G_PKG_DIR/compile V=sc BUILD_LOG=1
|
||||||
|
exit 99
|
||||||
|
fi
|
||||||
|
if [ "$FAKE_BUILD" != "true" ]; then
|
||||||
|
if [ "$TEST_BUILD" != "true" ]; then
|
||||||
|
make -j$(nproc) world
|
||||||
|
else
|
||||||
|
make V=sc world
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
# process results
|
||||||
|
OUT_DIR=bin/targets/$G_BOARD_NAME/$G_SUBTARGET_NAME
|
||||||
if [ "$FAKE_BUILD" = "true" ]; then
|
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"
|
echo "$G_BOARD_NAME $G_SUBTARGET_NAME $G_DEVICE_NAME" > "$OUT_DIR/$G_DEVICE_NAME.txt"
|
||||||
touch "$OUT_DIR/kernel-debug.tar.zst"
|
touch "$OUT_DIR/kernel-debug.tar.zst"
|
||||||
ls -la
|
|
||||||
BLD_VER=$FW_VER
|
BLD_VER=$FW_VER
|
||||||
else
|
else
|
||||||
BLD_VER=$( cat $OUT_DIR/profiles.json | grep -so '"version_number":"[^"]*' | grep -so '[^"]*$' )
|
BLD_VER=$( cat $OUT_DIR/profiles.json | grep -so '"version_number":"[^"]*' | grep -so '[^"]*$' )
|
||||||
@@ -213,24 +436,40 @@ jobs:
|
|||||||
exit 100
|
exit 100
|
||||||
fi
|
fi
|
||||||
echo "status=success" >> $GITHUB_OUTPUT
|
echo "status=success" >> $GITHUB_OUTPUT
|
||||||
echo "DEVICE_NAME=$G_DEVICE_NAME" >> $GITHUB_ENV
|
echo "FW_BUILD_OK=1" >> $GITHUB_ENV
|
||||||
echo "BOARD_NAME=$G_BOARD_NAME" >> $GITHUB_ENV
|
|
||||||
echo "SUBTARGET_NAME=$G_SUBTARGET_NAME" >> $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
|
||||||
echo "FILE_DATE=$FILE_DATE" >> $GITHUB_ENV
|
|
||||||
|
- name: Mark firmware build failed
|
||||||
|
if: false # steps.compile.outcome == 'failure'
|
||||||
|
run: |
|
||||||
|
echo "Firmware build failed, continuing pipeline"
|
||||||
|
echo "FW_BUILD_OK=0" >> $GITHUB_ENV
|
||||||
|
OUT_DIR=_bin_fake
|
||||||
|
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"
|
||||||
|
echo "BUILD FAILED" > $OUT_DIR/FAILED.txt
|
||||||
|
echo "BLD_VER=$FW_VER" >> $GITHUB_ENV
|
||||||
|
echo "OUT_DIR=$OUT_DIR" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Check space usage
|
- name: Check space usage
|
||||||
run: df -hT
|
run: df -hT
|
||||||
|
|
||||||
|
- name: Check OOM error
|
||||||
|
if: failure()
|
||||||
|
run: |
|
||||||
|
dmesg | grep -i -E 'oom|killed process' || true
|
||||||
|
echo "================== Memory ================="
|
||||||
|
free -h
|
||||||
|
|
||||||
- name: Compress build logs
|
- name: Compress build logs
|
||||||
if: always()
|
if: always()
|
||||||
env:
|
env:
|
||||||
TARGET: ${{ matrix.target }}
|
TARGET: ${{ matrix.target }}
|
||||||
FW_DATE: ${{ needs.check.outputs.fw_date }}
|
FW_DATE: ${{ needs.check.outputs.fw_date }}
|
||||||
LOGS_DIR: ${{ env.BUILD_ROOT }}/logs
|
|
||||||
run: |
|
run: |
|
||||||
tar -cJvf logs-$TARGET-$FW_DATE.tar.xz $LOGS_DIR
|
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.compile.outputs.status == 'success'
|
||||||
@@ -255,7 +494,7 @@ jobs:
|
|||||||
uses: actions/upload-artifact@main
|
uses: actions/upload-artifact@main
|
||||||
if: steps.compile.outputs.status == 'success'
|
if: steps.compile.outputs.status == 'success'
|
||||||
with:
|
with:
|
||||||
name: openwrt-${{ env.BLD_VER }}-${{ needs.check.outputs.build_date }}-${{ env.DEVICE_NAME }}
|
name: openwrt-${{ env.BLD_VER }}-${{ needs.check.outputs.build_date }}-${{ env.G_DEVICE_NAME }}
|
||||||
path: ${{ env.OUT_DIR }}
|
path: ${{ env.OUT_DIR }}
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
@@ -263,7 +502,7 @@ jobs:
|
|||||||
if: always()
|
if: always()
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: logs-${{ matrix.target }}-${{ env.FW_DATE }}
|
name: logs-${{ matrix.target }}-${{ needs.check.outputs.fw_date }}
|
||||||
path: logs-*.tar.xz
|
path: logs-*.tar.xz
|
||||||
|
|
||||||
release:
|
release:
|
||||||
@@ -279,6 +518,16 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
pattern: openwrt-*
|
pattern: openwrt-*
|
||||||
|
|
||||||
|
- name: Check for failed builds
|
||||||
|
run: |
|
||||||
|
echo "Checking for FAILED.txt in openwrt-* directories..."
|
||||||
|
FAILED_DIRS=$( find . -maxdepth 1 -type d -name 'openwrt-*' -exec test -f '{}/FAILED.txt' \; -print )
|
||||||
|
if [ -n "$FAILED_DIRS" ]; then
|
||||||
|
echo "❌ Build failures detected in:"
|
||||||
|
exit 201
|
||||||
|
fi
|
||||||
|
echo "✅ No FAILED.txt found, proceeding to release"
|
||||||
|
|
||||||
- name: Put images into zip
|
- name: Put images into zip
|
||||||
run: |
|
run: |
|
||||||
mkdir -p public
|
mkdir -p public
|
||||||
@@ -291,8 +540,8 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
TAG: ${{ needs.check.outputs.tag }}
|
TAG: ${{ needs.check.outputs.tag }}
|
||||||
with:
|
with:
|
||||||
prerelease: false
|
prerelease: true
|
||||||
tag_name: ${{ needs.check.outputs.tag }}
|
tag_name: ${{ needs.check.outputs.tag }}${{ env.TAG_SUFFIX }}
|
||||||
name: '${{ needs.check.outputs.tag }}'
|
name: '${{ needs.check.outputs.tag }}'
|
||||||
body: |
|
body: |
|
||||||
OpenWrt ${{ needs.check.outputs.fw_ver }} [${{ needs.check.outputs.fw_date }}]
|
OpenWrt ${{ needs.check.outputs.fw_ver }} [${{ needs.check.outputs.fw_date }}]
|
||||||
|
|||||||
@@ -13,16 +13,16 @@ CONFIG_FEED__alpine_fan_control=m
|
|||||||
#GIT_PACKAGE luci-app-temp-status=https://github.com/openwrt-xiaomi/luci-app-temp-status.git master
|
#GIT_PACKAGE luci-app-temp-status=https://github.com/openwrt-xiaomi/luci-app-temp-status.git master
|
||||||
|
|
||||||
### luci-app-disks-info
|
### luci-app-disks-info
|
||||||
#GIT_PACKAGE luci-app-disks-info=https://github.com/openwrt-xiaomi/luci-app-disks-info.git master
|
#GIT_PACKAGE luci-app-disks-info=https://github.com/gSpotx2f/luci-app-disks-info.git master
|
||||||
|
|
||||||
### luci-app-diskman
|
### luci-app-diskman
|
||||||
#GIT_PACKAGE luci-app-diskman=https://github.com/openwrt-xiaomi/luci-app-diskman.git master
|
#GIT_PACKAGE luci-app-diskman=https://github.com/lisaac/luci-app-diskman.git master
|
||||||
|
|
||||||
### luci-theme-argon
|
### luci-theme-argon
|
||||||
#GIT_PACKAGE luci-theme-argon=https://github.com/openwrt-xiaomi/luci-theme-argon.git master
|
#GIT_PACKAGE luci-theme-argon=https://github.com/jerrykuku/luci-theme-argon.git master
|
||||||
|
|
||||||
### luci-app-argon-config
|
### luci-app-argon-config
|
||||||
#GIT_PACKAGE luci-app-argon-config=https://github.com/openwrt-xiaomi/luci-app-argon-config.git master
|
#GIT_PACKAGE luci-app-argon-config=https://github.com/jerrykuku/luci-app-argon-config.git master
|
||||||
|
|
||||||
### luci-app-tn-netports
|
### luci-app-tn-netports
|
||||||
#GIT_PACKAGE luci-app-tn-netports=https://github.com/openwrt-xiaomi/luci-app-tn-netports.git master
|
#GIT_PACKAGE luci-app-tn-netports=https://github.com/openwrt-xiaomi/luci-app-tn-netports.git master
|
||||||
@@ -46,9 +46,9 @@ CONFIG_FEED__alpine_fan_control=m
|
|||||||
CONFIG_FEED__amneziawg=m
|
CONFIG_FEED__amneziawg=m
|
||||||
|
|
||||||
### Zapret
|
### Zapret
|
||||||
#GIT_FEED _zapret=https://github.com/remittor/zapret-openwrt.git zap1
|
#GIT_FEED _zapret=https://github.com/remittor/zapret-openwrt.git;zap1
|
||||||
CONFIG_FEED__zapret=m
|
CONFIG_FEED__zapret=m
|
||||||
#GIT_FEED _zapret2=https://github.com/remittor/zapret-openwrt.git master
|
#GIT_FEED _zapret2=https://github.com/remittor/zapret-openwrt.git;master
|
||||||
CONFIG_FEED__zapret2=m
|
CONFIG_FEED__zapret2=m
|
||||||
|
|
||||||
### ruantiblock
|
### ruantiblock
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -9,12 +9,7 @@ CONFIG_PACKAGE_luci-i18n-https-dns-proxy-ru=y
|
|||||||
CONFIG_PACKAGE_igmpproxy=y
|
CONFIG_PACKAGE_igmpproxy=y
|
||||||
|
|
||||||
CONFIG_PACKAGE_zapret=y
|
CONFIG_PACKAGE_zapret=y
|
||||||
CONFIG_PACKAGE_zapret-tpws=y
|
|
||||||
CONFIG_PACKAGE_zapret-mdig=y
|
|
||||||
CONFIG_PACKAGE_zapret-ip2net=y
|
|
||||||
CONFIG_PACKAGE_luci-app-zapret=y
|
CONFIG_PACKAGE_luci-app-zapret=y
|
||||||
|
|
||||||
CONFIG_PACKAGE_zapret2=y
|
CONFIG_PACKAGE_zapret2=y
|
||||||
CONFIG_PACKAGE_zapret2-mdig=y
|
|
||||||
CONFIG_PACKAGE_zapret2-ip2net=y
|
|
||||||
CONFIG_PACKAGE_luci-app-zapret2=y
|
CONFIG_PACKAGE_luci-app-zapret2=y
|
||||||
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.
File renamed without changes.
File renamed without changes.
@@ -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.
File renamed without changes.
@@ -0,0 +1,42 @@
|
|||||||
|
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_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
|
||||||
|
|
||||||
|
### 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
|
||||||
|
|
||||||
File renamed without changes.
@@ -15,7 +15,6 @@ OPT_FULL_REBUILD=false
|
|||||||
KALLSYMS=false
|
KALLSYMS=false
|
||||||
TESTING_KERNEL=false
|
TESTING_KERNEL=false
|
||||||
BUILD_ONLY_INITRAMFS=false
|
BUILD_ONLY_INITRAMFS=false
|
||||||
BUILD_SKIP_INITRAMFS=false
|
|
||||||
ONLY_INIT=false
|
ONLY_INIT=false
|
||||||
|
|
||||||
while getopts "j:t:fiskTI" opt; do
|
while getopts "j:t:fiskTI" opt; do
|
||||||
@@ -26,7 +25,6 @@ while getopts "j:t:fiskTI" opt; do
|
|||||||
k) KALLSYMS=true;;
|
k) KALLSYMS=true;;
|
||||||
T) TESTING_KERNEL=true;;
|
T) TESTING_KERNEL=true;;
|
||||||
i) BUILD_ONLY_INITRAMFS=true;;
|
i) BUILD_ONLY_INITRAMFS=true;;
|
||||||
s) BUILD_SKIP_INITRAMFS=true;;
|
|
||||||
I) ONLY_INIT=true;;
|
I) ONLY_INIT=true;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@@ -70,7 +68,7 @@ function build_target {
|
|||||||
fi
|
fi
|
||||||
inclst=$( get_cfg_inc_lst $CFG )
|
inclst=$( get_cfg_inc_lst $CFG )
|
||||||
for inc in $inclst; do
|
for inc in $inclst; do
|
||||||
incfn=$XDIR/$inc
|
incfn=$XDIR/_cfginc/$inc
|
||||||
[ ! -f $incfn ] && die "File '$inc' not found!"
|
[ ! -f $incfn ] && die "File '$inc' not found!"
|
||||||
sed -i "/#include $inc/a <<LF>><<LF>>" $CFG
|
sed -i "/#include $inc/a <<LF>><<LF>>" $CFG
|
||||||
sed -i "s/<<LF>>/\n/g" $CFG
|
sed -i "s/<<LF>>/\n/g" $CFG
|
||||||
@@ -108,6 +106,7 @@ function build_target {
|
|||||||
############ change images prefix ############
|
############ change images prefix ############
|
||||||
# IMG_PREFIX:=$(VERSION_DIST_SANITIZED)-$(IMG_PREFIX_VERNUM)$(IMG_PREFIX_VERCODE)$(IMG_PREFIX_EXTRA)$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))
|
# 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
|
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 !!!"
|
||||||
fi
|
fi
|
||||||
if [ 1 = 1 ]; then
|
if [ 1 = 1 ]; then
|
||||||
############ remove "squashfs" suffix ############
|
############ remove "squashfs" suffix ############
|
||||||
@@ -120,10 +119,10 @@ function build_target {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AWG_LUCI_MK=$XDIR/package/feeds/_ruantiblock/luci-app-ruantiblock/Makefile
|
RAB_LUCI_MK=$XDIR/package/feeds/_ruantiblock/luci-app-ruantiblock/Makefile
|
||||||
if [ -f $AWG_LUCI_MK ]; then
|
if [ -f $RAB_LUCI_MK ]; then
|
||||||
if ! grep "PKG_PROVIDES" $AWG_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' $AWG_LUCI_MK
|
sed -i 's/LUCI_PKGARCH:=all/LUCI_PKGARCH:=all\nPKG_PROVIDES:=luci-app-ruantiblock/g' $RAB_LUCI_MK
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -134,24 +133,73 @@ function build_target {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PODKOP_MK=$XDIR/package/feeds/_podkop/podkop/Makefile
|
PODKOP_DIR=$XDIR/package/feeds/_podkop
|
||||||
if [ -f $PODKOP_MK ]; then
|
if [ -d $PODKOP_DIR ]; then
|
||||||
sed -i 's/+sing-box / /g' $PODKOP_MK
|
PODKOP_PATCH=
|
||||||
sed -i 's/CONFLICTS:=.*/CONFLICTS:=/g' $PODKOP_MK
|
PODKOP_MK=$PODKOP_DIR/podkop/Makefile
|
||||||
fi
|
if [ -f $PODKOP_MK ] && grep -q '+sing-box' $PODKOP_MK ; then
|
||||||
PODKOP_SH=$XDIR/package/feeds/_podkop/podkop/files/usr/bin/podkop
|
sed -i 's/+sing-box / /g' $PODKOP_MK
|
||||||
if [ -f $PODKOP_SH ] && ! grep -q '(which sing-box)' $PODKOP_SH ; then
|
sed -i 's/CONFLICTS:=.*/CONFLICTS:=/g' $PODKOP_MK
|
||||||
sed -i '/,\\"dns_configured\\":/i [ -z "$(which sing-box)" ] && status="not installed"' $PODKOP_SH
|
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
|
fi
|
||||||
|
|
||||||
DROPBEAR_MK=$XDIR/package/network/services/dropbear/Makefile
|
DROPBEAR_DIR=$XDIR/package/network/services/dropbear
|
||||||
|
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
|
||||||
sed -i 's/^PKG_RELEASE:=.*/PKG_RELEASE:=0/g' $DROPBEAR_MK
|
# download dropbear 2024.86 (OpenWrt v24.10)
|
||||||
sed -i '/,CONFIG_DROPBEAR_MODERN_ONLY,/d' $DROPBEAR_MK
|
if [ ! -f $TMP_DROPBEAR_DIR/Makefile ]; then
|
||||||
sed -i 's/\tCONFIG_DROPBEAR_MODERN_ONLY/ /g' $DROPBEAR_MK
|
rm -rf $TMP_DROPBEAR_DIR
|
||||||
sed -i 's/ CONFIG_DROPBEAR_MODERN_ONLY/ /g' $DROPBEAR_MK
|
git clone --depth 1 --filter=blob:none --sparse https://github.com/openwrt/openwrt.git $TMP_DROPBEAR_DIR && (
|
||||||
sed -i 's/DROPBEAR_DH_GROUP14_SHA1,0/ /g' $DROPBEAR_MK
|
cd $TMP_DROPBEAR_DIR
|
||||||
sed -i 's/DROPBEAR_SHA1_HMAC,0/ /g' $DROPBEAR_MK
|
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
|
||||||
|
sed -i 's/^PKG_RELEASE:=.*/PKG_RELEASE:=0/g' $TMP_DROPBEAR_MK
|
||||||
|
sed -i '/,CONFIG_DROPBEAR_MODERN_ONLY,/d' $TMP_DROPBEAR_MK
|
||||||
|
sed -i 's/\tCONFIG_DROPBEAR_MODERN_ONLY/ /g' $TMP_DROPBEAR_MK
|
||||||
|
sed -i 's/ CONFIG_DROPBEAR_MODERN_ONLY/ /g' $TMP_DROPBEAR_MK
|
||||||
|
sed -i 's/DROPBEAR_DH_GROUP14_SHA1,0/ /g' $TMP_DROPBEAR_MK
|
||||||
|
sed -i 's/DROPBEAR_SHA1_HMAC,0/ /g' $TMP_DROPBEAR_MK
|
||||||
|
echo ">>> dropbear patched !!! (disable MODERN_ONLY)"
|
||||||
|
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)
|
||||||
|
rm -rf $DROPBEAR_DIR/*
|
||||||
|
cp -a $TMP_DROPBEAR_DIR/. $DROPBEAR_DIR/
|
||||||
|
echo ">>> dropbear downgraded to 2024.86 !!!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
make defconfig
|
make defconfig
|
||||||
@@ -189,7 +237,10 @@ function build_target {
|
|||||||
echo -e "\nCONFIG_PACKAGE_wpad-openssl=y\n" >> $CFG
|
echo -e "\nCONFIG_PACKAGE_wpad-openssl=y\n" >> $CFG
|
||||||
fi
|
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
|
DASHBRDPO=$XDIR/package/feeds/luci/luci-mod-dashboard/po/ru/dashboard.po
|
||||||
if [ -f $DASHBRDPO ]; then
|
if [ -f $DASHBRDPO ]; then
|
||||||
sed -i 's/msgid "Dashboard"/msgid "__dash_board__"/g' $DASHBRDPO
|
sed -i 's/msgid "Dashboard"/msgid "__dash_board__"/g' $DASHBRDPO
|
||||||
@@ -261,28 +312,32 @@ function build_target {
|
|||||||
echo "Patch '$(basename $incfn)' result: OK"
|
echo "Patch '$(basename $incfn)' result: OK"
|
||||||
done
|
done
|
||||||
|
|
||||||
OPKG_DIR=$XDIR/files/etc/opkg
|
APK_DIR=$XDIR/files/etc/apk
|
||||||
if [ -d $OPKG_DIR ]; then
|
if [ -d $APK_DIR ]; then
|
||||||
rm -rf $OPKG_DIR
|
rm -rf $APK_DIR
|
||||||
fi
|
fi
|
||||||
FANT_PKG_KEY=$XDIR/53FF2B6672243D28.pub
|
FANT_PKG_KEY=$XDIR/20241123170031.pub
|
||||||
if [ -f $FANT_PKG_KEY ]; then
|
if [ -f $FANT_PKG_KEY ]; then
|
||||||
OPKG_SRC_DIR=$XDIR/package/system/opkg/files
|
APK_SRC_DIR=$XDIR/package/system/apk/files
|
||||||
OPKG_KEYS_DIR=$OPKG_DIR/keys
|
APK_KEYS_DIR=$APK_DIR/keys
|
||||||
mkdir -p $OPKG_KEYS_DIR
|
mkdir -p $APK_KEYS_DIR
|
||||||
cp $FANT_PKG_KEY $OPKG_KEYS_DIR/53ff2b6672243d28
|
cp $FANT_PKG_KEY $APK_KEYS_DIR/fantastic-packages-20241123170031.pem
|
||||||
OPKG_CFEED_FN=$OPKG_DIR/customfeeds.conf
|
APK_CFEED_FN=$APK_DIR/repositories.d/customfeeds.list
|
||||||
cp $OPKG_SRC_DIR/customfeeds.conf $OPKG_CFEED_FN
|
mkdir -p $APK_DIR/repositories.d
|
||||||
PKG_LINK="https://fantastic-packages.github.io/packages/releases/<<VER>>/packages/<<ARCH>>"
|
cp $APK_SRC_DIR/customfeeds.list $APK_CFEED_FN
|
||||||
echo "" >> $OPKG_CFEED_FN
|
PKG_LINK="https://fantastic-packages.github.io/releases/<<VER>>/packages/<<ARCH>>"
|
||||||
echo "src/gz fantastic_packages_luci $PKG_LINK/luci" >> $OPKG_CFEED_FN
|
echo "" >> $APK_CFEED_FN
|
||||||
echo "src/gz fantastic_packages_packages $PKG_LINK/packages" >> $OPKG_CFEED_FN
|
echo "$PKG_LINK/luci/packages.adb" >> $APK_CFEED_FN
|
||||||
echo "src/gz fantastic_packages_special $PKG_LINK/special" >> $OPKG_CFEED_FN
|
echo "$PKG_LINK/packages/packages.adb" >> $APK_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>>/24.10/g" $OPKG_CFEED_FN
|
sed -i "s/<<VER>>/25.12/g" $APK_CFEED_FN
|
||||||
sed -i "s/<<ARCH>>/$TARGET_ARCH_PACKAGES/g" $OPKG_CFEED_FN
|
sed -i "s/<<ARCH>>/$TARGET_ARCH_PACKAGES/g" $APK_CFEED_FN
|
||||||
logmsg "Added support of Fantastic packages [https://fantastic-packages.github.io/packages]"
|
logmsg "Added support of Fantastic packages [https://fantastic-packages.github.io/releases]"
|
||||||
|
fi
|
||||||
|
if [ $BUILD_ONLY_INITRAMFS = true ]; then
|
||||||
|
rm -f $APK_DIR/repositories.d/customfeeds.list
|
||||||
fi
|
fi
|
||||||
|
|
||||||
SYSCTLCONF_FN=$XDIR/files/etc/sysctl.conf
|
SYSCTLCONF_FN=$XDIR/files/etc/sysctl.conf
|
||||||
@@ -313,13 +368,19 @@ function build_config {
|
|||||||
local cfg=$1
|
local cfg=$1
|
||||||
local cfg_name=$( basename $cfg )
|
local cfg_name=$( basename $cfg )
|
||||||
local target_name=${cfg_name%.*}
|
local target_name=${cfg_name%.*}
|
||||||
|
local initramfs=false
|
||||||
local board=$( get_cfg_board $cfg )
|
local board=$( get_cfg_board $cfg )
|
||||||
local subtarget=$( get_cfg_subtarget $cfg $board )
|
local subtarget=$( get_cfg_subtarget $cfg $board )
|
||||||
local device=$( get_cfg_dev_lst $cfg $board $subtarget )
|
local device=$( get_cfg_dev_lst $cfg $board $subtarget )
|
||||||
local outdir=$XDIR/bin/targets/$board/$subtarget
|
local outdir=$XDIR/bin/targets/$board/$subtarget
|
||||||
echo Start build for target $cfg_name "($board-$subtarget-$device)"
|
|
||||||
|
if echo "$cfg" | grep -q '_initramfs/' ; then
|
||||||
build_target $cfg_name
|
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
|
if [ ! -f $outdir/kernel-debug.tar.zst ]; then
|
||||||
echo "ERROR: cannot build images for target $target_name"
|
echo "ERROR: cannot build images for target $target_name"
|
||||||
@@ -334,6 +395,9 @@ function build_config {
|
|||||||
|
|
||||||
if [ "$XTARGET" != "*" ]; then
|
if [ "$XTARGET" != "*" ]; then
|
||||||
TARGETCFG=$XDIR/$XTARGET
|
TARGETCFG=$XDIR/$XTARGET
|
||||||
|
if [ $BUILD_ONLY_INITRAMFS = true ]; then
|
||||||
|
TARGETCFG=$XDIR/_initramfs/$XTARGET
|
||||||
|
fi
|
||||||
XTARGET_EXT="${XTARGET##*.}"
|
XTARGET_EXT="${XTARGET##*.}"
|
||||||
[ $XTARGET_EXT != config ] && TARGETCFG=$TARGETCFG.config
|
[ $XTARGET_EXT != config ] && TARGETCFG=$TARGETCFG.config
|
||||||
[ ! -f $TARGETCFG ] && die "File '"`basename $TARGETCFG`"' not found!"
|
[ ! -f $TARGETCFG ] && die "File '"`basename $TARGETCFG`"' not found!"
|
||||||
@@ -345,7 +409,12 @@ if [ "$XTARGET" != "*" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
XOUT=$XDIR/xout
|
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
|
rm -rf $XOUT
|
||||||
|
|
||||||
@@ -354,35 +423,16 @@ if [ -z "$CFG_LIST" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
for CFG in $CFG_LIST; do
|
||||||
if [[ "$CFG" == *"_initramfs"* ]]; then
|
build_config $CFG
|
||||||
INITRAMFS_COUNT=$(( INITRAMFS_COUNT + 1 ))
|
|
||||||
fi
|
|
||||||
done
|
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!"
|
echo "All targets was builded!"
|
||||||
|
|
||||||
+2
-2
@@ -4,8 +4,8 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|||||||
export XDIR=$SCRIPT_DIR
|
export XDIR=$SCRIPT_DIR
|
||||||
export XADDONSDIR=$XDIR/package/addons
|
export XADDONSDIR=$XDIR/package/addons
|
||||||
FEEDSDIR=$XDIR/package/feeds
|
FEEDSDIR=$XDIR/package/feeds
|
||||||
ADDONSCFG=$XDIR/_addons.config
|
ADDONSCFG=$XDIR/_cfginc/_addons.config
|
||||||
ADDONSNSS=$XDIR/_addons_nss.config
|
ADDONSNSS=$XDIR/_cfginc/_addons_nss.config
|
||||||
|
|
||||||
. ./xcommon.sh
|
. ./xcommon.sh
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user