mirror of
https://github.com/openwrt-xiaomi/builder.git
synced 2026-03-27 12:58:40 +05:00
Compare commits
3 Commits
ebd2e371f2
...
4be0aa94a4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4be0aa94a4 | ||
|
|
c86f52cdb4 | ||
|
|
e7b3d9673d |
27
.github/workflows/build.yml
vendored
27
.github/workflows/build.yml
vendored
@@ -312,11 +312,18 @@ jobs:
|
|||||||
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 grep -q '(CONFIG_USES_MINOR),y) += yafut' tools/Makefile ; then
|
if [ "$CONFIG_BUILD_ALL_HOST_TOOLS" != y ]; then
|
||||||
echo WARN: file tools/Makefile allowed compile yafut
|
if grep -q '(CONFIG_USES_MINOR),y) += yafut' tools/Makefile ; then
|
||||||
echo ERROR: yafut compile not supported !!!
|
echo WARN: file tools/Makefile allowed compile yafut
|
||||||
exit 51
|
echo ERROR: yafut compile not supported !!!
|
||||||
|
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}' )
|
||||||
@@ -345,7 +352,7 @@ jobs:
|
|||||||
TOOLS_STATUS="$${TOOLS_STATUS}$${T_STATUS}" ; \
|
TOOLS_STATUS="$${TOOLS_STATUS}$${T_STATUS}" ; \
|
||||||
printf " %s\n" "$$tool"; \
|
printf " %s\n" "$$tool"; \
|
||||||
done; \
|
done; \
|
||||||
: > $(STAGING_DIR_HOST)/.tools_compile_$$TOOLS_STATUS; \
|
printf "$$TOOLS_STATUS" > $(STAGING_DIR_HOST)/.tools_compile_mask; \
|
||||||
} > $(TOOLS_COMPILE_LIST)
|
} > $(TOOLS_COMPILE_LIST)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
@@ -361,11 +368,13 @@ 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
|
||||||
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}' )
|
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
|
||||||
|
#######
|
||||||
|
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
|
if [ "$USE_CACHE" = "true" ]; then
|
||||||
echo USE_CACHE = $USE_CACHE
|
echo USE_CACHE = $USE_CACHE
|
||||||
@@ -376,7 +385,7 @@ jobs:
|
|||||||
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 cache for host tools
|
- name: Restore host tools from cache
|
||||||
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
|
||||||
|
|||||||
22
xmake.sh
22
xmake.sh
@@ -101,6 +101,26 @@ 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
|
MK_IMAGE=$XDIR/include/image.mk
|
||||||
CURDATE=$( date --utc +%y%m%d )
|
CURDATE=$( date --utc +%y%m%d )
|
||||||
@@ -125,7 +145,7 @@ function build_target {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ 1 = 1 ]; then
|
if ! grep '^CONFIG_BUILD_ALL_HOST_TOOLS=y' $CFG ; 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
|
||||||
|
|||||||
Reference in New Issue
Block a user