mirror of
https://github.com/openwrt-xiaomi/builder.git
synced 2026-03-21 09:58:41 +05:00
Compare commits
25 Commits
v25
...
ebd2e371f2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 |
94
.github/workflows/build.yml
vendored
94
.github/workflows/build.yml
vendored
@@ -63,8 +63,8 @@ env:
|
|||||||
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
|
||||||
@@ -248,8 +248,7 @@ jobs:
|
|||||||
TOOLS_SRC_HASH: ${{ hashFiles('tools/**') }}
|
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
|
echo "TOOLS_SRC_HASH=$TOOLS_SRC_HASH" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Update OpenWrt packages
|
- name: Update OpenWrt packages
|
||||||
@@ -262,7 +261,7 @@ jobs:
|
|||||||
- 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: |
|
||||||
@@ -282,9 +281,6 @@ 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
|
||||||
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')
|
FILE_DATE=$(date --utc +'%y%m%d')
|
||||||
echo "status=success" >> $GITHUB_OUTPUT
|
echo "status=success" >> $GITHUB_OUTPUT
|
||||||
echo "FW_VER=$FW_VER" >> $GITHUB_ENV
|
echo "FW_VER=$FW_VER" >> $GITHUB_ENV
|
||||||
@@ -308,39 +304,29 @@ jobs:
|
|||||||
TARGET: ${{ matrix.target }}
|
TARGET: ${{ matrix.target }}
|
||||||
USE_CACHE: ${{ github.event.inputs.use_cache }}
|
USE_CACHE: ${{ github.event.inputs.use_cache }}
|
||||||
CACHE_VER: ${{ github.event.inputs.cache_ver }}
|
CACHE_VER: ${{ github.event.inputs.cache_ver }}
|
||||||
INP_TRX_BUILD: ${{ github.event.inputs.trx_build == 'true' }}
|
|
||||||
run: |
|
run: |
|
||||||
echo USE_CACHE = $USE_CACHE
|
echo USE_CACHE = $USE_CACHE
|
||||||
HOST_TOOLS_STG_DIR=staging_dir/host
|
HOST_TOOLS_STG_DIR=staging_dir/host
|
||||||
HOST_TOOLS_BLD_DIR=build_dir/host
|
HOST_TOOLS_BLD_DIR=build_dir/host
|
||||||
|
rm -rf staging_dir/
|
||||||
rm -rf build_dir/
|
rm -rf build_dir/
|
||||||
mkdir -p staging_dir/host
|
mkdir -p staging_dir/host
|
||||||
mkdir -p build_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 ############
|
########### check tools Makefile ############
|
||||||
if [ "$CONFIG_BUILD_ALL_HOST_TOOLS" != y ]; then
|
if grep -q '(CONFIG_USES_MINOR),y) += yafut' tools/Makefile ; then
|
||||||
if grep -q '(CONFIG_USES_MINOR),y) += yafut' tools/Makefile ; then
|
echo WARN: file tools/Makefile allowed compile yafut
|
||||||
echo WARN: file tools/Makefile allowed compile yafut
|
echo ERROR: yafut compile not supported !!!
|
||||||
echo ERROR: yafut compile not supported !!!
|
exit 51
|
||||||
exit 51
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
########### get hash of dir with tools Makefiles ############
|
########### get hash of dir with tools Makefiles ############
|
||||||
TOOLS_SRC_CRC=$( echo $TOOLS_SRC_HASH | cksum | awk '{print $1}' )
|
TOOLS_SRC_CRC=$( echo $TOOLS_SRC_HASH | cksum | awk '{print $1}' )
|
||||||
echo $TOOLS_SRC_CRC > logs/host_tools_sources.crc
|
echo $TOOLS_SRC_CRC > logs/host_tools_sources.crc
|
||||||
echo "TOOLS_SRC_CRC=$TOOLS_SRC_CRC" >> $GITHUB_ENV
|
echo "TOOLS_SRC_CRC=$TOOLS_SRC_CRC" >> $GITHUB_ENV
|
||||||
########### get prereq tools (w/o compile) ############
|
########### 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
|
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}' )
|
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
|
cp -f $HOST_TOOLS_STG_DIR/.prereq-build-list logs/prereq-build-list.txt
|
||||||
echo "TOOLS_PREREQ_CRC=$TOOLS_PREREQ_CRC" >> $GITHUB_ENV
|
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 ###############
|
########### patch for tools/Makefile ###############
|
||||||
cat <<'EOF' >> tools/Makefile
|
cat <<'EOF' >> tools/Makefile
|
||||||
###
|
###
|
||||||
@@ -359,7 +345,7 @@ jobs:
|
|||||||
TOOLS_STATUS="$${TOOLS_STATUS}$${T_STATUS}" ; \
|
TOOLS_STATUS="$${TOOLS_STATUS}$${T_STATUS}" ; \
|
||||||
printf " %s\n" "$$tool"; \
|
printf " %s\n" "$$tool"; \
|
||||||
done; \
|
done; \
|
||||||
printf "$$TOOLS_STATUS" > $(STAGING_DIR_HOST)/.tools_compile_mask; \
|
: > $(STAGING_DIR_HOST)/.tools_compile_$$TOOLS_STATUS; \
|
||||||
} > $(TOOLS_COMPILE_LIST)
|
} > $(TOOLS_COMPILE_LIST)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
@@ -375,30 +361,22 @@ jobs:
|
|||||||
exit 55
|
exit 55
|
||||||
fi
|
fi
|
||||||
cp -f $HOST_TOOLS_STG_DIR/.tools_compile_list logs/tools_compile_list.txt
|
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}' )
|
for fn in $HOST_TOOLS_STG_DIR/.tools_compile_[yn]*; do
|
||||||
|
[ -e $fn ] && cp -f $fn logs/$( basename "$fn" | sed 's/^\.//' )
|
||||||
|
done
|
||||||
|
TOOLS_COMPILE_CRC=$( cat $TOOLS_STG_DIR/.tools_compile_list | cksum | awk '{print $1}' )
|
||||||
echo "TOOLS_COMPILE_CRC=$TOOLS_COMPILE_CRC" >> $GITHUB_ENV
|
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
|
if [ "$USE_CACHE" = "true" ]; then
|
||||||
echo USE_CACHE = $USE_CACHE
|
echo USE_CACHE = $USE_CACHE
|
||||||
fi
|
fi
|
||||||
if [ "$INP_TRX_BUILD" = true ]; then
|
|
||||||
CACHE_VER=$CACHE_VER-trx
|
|
||||||
fi
|
|
||||||
echo "USE_CACHE=$USE_CACHE" >> $GITHUB_ENV
|
echo "USE_CACHE=$USE_CACHE" >> $GITHUB_ENV
|
||||||
echo "CACHE_VER=$CACHE_VER" >> $GITHUB_ENV
|
echo "CACHE_VER=$CACHE_VER" >> $GITHUB_ENV
|
||||||
echo "HOST_TOOLS_STG_DIR=$HOST_TOOLS_STG_DIR" >> $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 "HOST_TOOLS_BLD_DIR=$HOST_TOOLS_BLD_DIR" >> $GITHUB_ENV
|
||||||
echo "status=success" >> $GITHUB_OUTPUT
|
echo "status=success" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Restore host tools from cache
|
- name: Restore cache for host tools
|
||||||
id: tools_cache_restore
|
id: tools_cache_restore
|
||||||
if: github.event.inputs.use_cache == 'true'
|
if: github.event.inputs.use_cache == 'true'
|
||||||
uses: actions/cache/restore@v4
|
uses: actions/cache/restore@v4
|
||||||
@@ -472,10 +450,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Show host tools stamps
|
- name: Show host tools stamps
|
||||||
run: |
|
run: |
|
||||||
if [ -d staging_dir/host/stamp ]; then
|
ls -la staging_dir/host/stamp/
|
||||||
ls -la staging_dir/host/stamp/
|
ls -la staging_dir/host/stamp/ > logs/host_stamp_dir.txt
|
||||||
ls -la staging_dir/host/stamp/ > logs/host_stamp_dir.txt
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Configure 2
|
- name: Configure 2
|
||||||
id: configure2
|
id: configure2
|
||||||
@@ -490,9 +466,6 @@ jobs:
|
|||||||
cp -a logs_backup logs
|
cp -a logs_backup logs
|
||||||
./xmake.sh $OPT_INITRAMFS -I -t $TARGET
|
./xmake.sh $OPT_INITRAMFS -I -t $TARGET
|
||||||
cp -f .config logs/config2
|
cp -f .config logs/config2
|
||||||
echo "::group::disabled_services.lst"
|
|
||||||
cat disabled_services.lst || echo '<<< file disabled_services.lst not found >>>'
|
|
||||||
echo "::endgroup::"
|
|
||||||
|
|
||||||
- name: Kernel compile
|
- name: Kernel compile
|
||||||
id: kernel
|
id: kernel
|
||||||
@@ -593,37 +566,6 @@ jobs:
|
|||||||
echo "BLD_VER=$FW_VER" >> $GITHUB_ENV
|
echo "BLD_VER=$FW_VER" >> $GITHUB_ENV
|
||||||
echo "OUT_DIR=$OUT_DIR" >> $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
|
- name: Check space usage
|
||||||
run: df -hT
|
run: df -hT
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -46,8 +46,6 @@ 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_lscpu=y
|
||||||
CONFIG_PACKAGE_ip-full=y
|
|
||||||
CONFIG_PACKAGE_tc-full=y
|
|
||||||
CONFIG_PACKAGE_bind-tools=y
|
CONFIG_PACKAGE_bind-tools=y
|
||||||
CONFIG_PACKAGE_facinstall=y
|
CONFIG_PACKAGE_facinstall=y
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
log_msg() {
|
log_msg() {
|
||||||
printf "%s\n" "$1" >&8 || printf "%s\n" "$1"
|
printf "%s\n" "$1" >&$OUTPUT_PIPE
|
||||||
}
|
}
|
||||||
|
|
||||||
log_err() {
|
log_err() {
|
||||||
@@ -28,7 +28,7 @@ log_err() {
|
|||||||
_R=\\033[31m
|
_R=\\033[31m
|
||||||
_N=\\033[m
|
_N=\\033[m
|
||||||
fi
|
fi
|
||||||
printf "$_R%s$_N\n" "ERROR: $msg" >&8 || printf "$_R%s$_N\n" "ERROR: $msg"
|
printf "$_R%s$_N\n" "ERROR: $msg" >&$OUTPUT_PIPE
|
||||||
}
|
}
|
||||||
|
|
||||||
die() {
|
die() {
|
||||||
@@ -150,8 +150,6 @@ if [ -f "$WIFI77_FN" ]; then
|
|||||||
WIFI_COUNTRY=$( get_param_qq CONFIG_PACKAGE_MAC80211_COUNTRY "$TOPDIR/.config" )
|
WIFI_COUNTRY=$( get_param_qq CONFIG_PACKAGE_MAC80211_COUNTRY "$TOPDIR/.config" )
|
||||||
sed -i "s#%COUNTRY%#${WIFI_COUNTRY}#g" "$WIFI77_FN"
|
sed -i "s#%COUNTRY%#${WIFI_COUNTRY}#g" "$WIFI77_FN"
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
rm -f "$WIFI77_FN"
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -39,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
|
||||||
|
|
||||||
|
|||||||
111
xmake.sh
111
xmake.sh
@@ -12,18 +12,16 @@ fi
|
|||||||
MAKE_JOBS=
|
MAKE_JOBS=
|
||||||
XTARGET=
|
XTARGET=
|
||||||
OPT_FULL_REBUILD=false
|
OPT_FULL_REBUILD=false
|
||||||
WIFI_EN=true
|
|
||||||
KALLSYMS=false
|
KALLSYMS=false
|
||||||
TESTING_KERNEL=false
|
TESTING_KERNEL=false
|
||||||
BUILD_ONLY_INITRAMFS=false
|
BUILD_ONLY_INITRAMFS=false
|
||||||
ONLY_INIT=false
|
ONLY_INIT=false
|
||||||
|
|
||||||
while getopts "j:t:fisWkTI" opt; do
|
while getopts "j:t:fiskTI" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
j) MAKE_JOBS=$OPTARG;;
|
j) MAKE_JOBS=$OPTARG;;
|
||||||
t) XTARGET=$OPTARG;;
|
t) XTARGET=$OPTARG;;
|
||||||
f) OPT_FULL_REBUILD=true;;
|
f) OPT_FULL_REBUILD=true;;
|
||||||
W) WIFI_EN=false;;
|
|
||||||
k) KALLSYMS=true;;
|
k) KALLSYMS=true;;
|
||||||
T) TESTING_KERNEL=true;;
|
T) TESTING_KERNEL=true;;
|
||||||
i) BUILD_ONLY_INITRAMFS=true;;
|
i) BUILD_ONLY_INITRAMFS=true;;
|
||||||
@@ -72,7 +70,6 @@ function build_target {
|
|||||||
for inc in $inclst; do
|
for inc in $inclst; do
|
||||||
incfn=$XDIR/_cfginc/$inc
|
incfn=$XDIR/_cfginc/$inc
|
||||||
[ ! -f $incfn ] && die "File '$inc' not found!"
|
[ ! -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 "/#include $inc/a <<LF>><<LF>>" $CFG
|
||||||
sed -i "s/<<LF>>/\n/g" $CFG
|
sed -i "s/<<LF>>/\n/g" $CFG
|
||||||
sed -i "/#include $inc/ r $incfn" $CFG
|
sed -i "/#include $inc/ r $incfn" $CFG
|
||||||
@@ -104,26 +101,6 @@ 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 ] && [ -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
|
MK_IMAGE=$XDIR/include/image.mk
|
||||||
CURDATE=$( date --utc +%y%m%d )
|
CURDATE=$( date --utc +%y%m%d )
|
||||||
@@ -148,7 +125,7 @@ function build_target {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! grep '^CONFIG_BUILD_ALL_HOST_TOOLS=y' $CFG ; then
|
if [ 1 = 1 ]; then
|
||||||
MK_HOST_TOOLS=$XDIR/tools/Makefile
|
MK_HOST_TOOLS=$XDIR/tools/Makefile
|
||||||
# tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_USES_MINOR),y) += yafut
|
# tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_USES_MINOR),y) += yafut
|
||||||
if grep -q '(CONFIG_USES_MINOR),y)' $MK_HOST_TOOLS ; then
|
if grep -q '(CONFIG_USES_MINOR),y)' $MK_HOST_TOOLS ; then
|
||||||
@@ -167,14 +144,6 @@ function build_target {
|
|||||||
fi
|
fi
|
||||||
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
|
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
|
||||||
@@ -224,40 +193,17 @@ 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)
|
|
||||||
rm -rf $DROPBEAR_DIR/*
|
|
||||||
cp -a $TMP_DROPBEAR_DIR/. $DROPBEAR_DIR/
|
|
||||||
echo ">>> dropbear downgraded to 2024.86 !!!"
|
|
||||||
fi
|
|
||||||
|
|
||||||
HOST_TOOLS_DIR=$XDIR/staging_dir/host
|
HOST_TOOLS_DIR=$XDIR/staging_dir/host
|
||||||
HOST_TOOLS_STAGE=0
|
HOST_TOOLS_STAGE=0
|
||||||
@@ -378,32 +324,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
|
||||||
|
|||||||
Reference in New Issue
Block a user