From 69fa806e9019fa100452cb631f24eaa5f4b18cc0 Mon Sep 17 00:00:00 2001 From: Yonsm Date: Mon, 19 Oct 2020 11:51:53 +0800 Subject: [PATCH 1/5] Update version info --- trunk/user/www/Makefile | 4 ++-- trunk/versions.inc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/trunk/user/www/Makefile b/trunk/user/www/Makefile index d8b817d3c36..db3ae6d9e03 100644 --- a/trunk/user/www/Makefile +++ b/trunk/user/www/Makefile @@ -7,9 +7,9 @@ ROMFS_DIR = $(ROOTDIR)/romfs include $(ROOTDIR)/user/shared/boards.mk PROJECT_HOME_URL="https:\/\/bitbucket.org\/padavan\/rt-n56u\/" -PROJECT_HOME_URL_MOD="https:\/\/github.com\/hanwckf\/rt-n56u\/" +PROJECT_HOME_URL_MOD="https:\/\/github.com\/Yonsm\/Padavan\/" -LABEL_COPYRIGHT_TEXT='© 2011-2021 Padavan<\/a> \& N56U project community \& by hanwckf<\/a>' +LABEL_COPYRIGHT_TEXT='© 2011-2021 Padavan<\/a> \& hanwckf<\/a> \& Yonsm<\/a>' BOARD_PATTERN=s/ZVMODELVZ/$(CONFIG_FIRMWARE_PRODUCT_ID)/g COPYR_PATTERN=s/ZVCOPYRVZ/$(LABEL_COPYRIGHT_TEXT)/g diff --git a/trunk/versions.inc b/trunk/versions.inc index e8985d3d77f..aa90123b1f8 100644 --- a/trunk/versions.inc +++ b/trunk/versions.inc @@ -1,3 +1,3 @@ FIRMWARE_ROOTFS_VER=3.9 -FIRMWARE_BUILDS_VER=099 -FIRMWARE_BUILDS_REV=$(shell git rev-parse --short=7 HEAD 2>/dev/null) +FIRMWARE_BUILDS_VER=$(shell date +%m%d 2>/dev/null) +FIRMWARE_BUILDS_REV=$(shell date +%H%M 2>/dev/null) From ee3b9cec19d1da7b134426961af8a14a3eba765b Mon Sep 17 00:00:00 2001 From: Yonsm Date: Mon, 19 Oct 2020 11:52:20 +0800 Subject: [PATCH 2/5] Refine build script --- trunk/build_firmware_modify | 19 +++++++++++++++++++ trunk/flash_firmware | 9 +++++++++ trunk/make_firmware | 20 ++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100755 trunk/flash_firmware create mode 100755 trunk/make_firmware diff --git a/trunk/build_firmware_modify b/trunk/build_firmware_modify index a18da591684..4a560c82d56 100755 --- a/trunk/build_firmware_modify +++ b/trunk/build_firmware_modify @@ -13,9 +13,28 @@ fi cp -f configs/templates/$1.config .config +# Yonsm { +for MOD in DDNS_SSL HTTPS OPENSSL_EXE SFTP TCPDUMP; do + sed -i "s/CONFIG_FIRMWARE_INCLUDE_${MOD}=n/CONFIG_FIRMWARE_INCLUDE_${MOD}=y/" .config +done + +grep "CONFIG_FIRMWARE_ENABLE_USB=y" .config +if [ $? -eq 0 ]; then + for MOD in NFSD NFSC CIFS TRANSMISSION TRANSMISSION_WEB_CONTROL; do + sed -i "s/CONFIG_FIRMWARE_INCLUDE_${MOD}=n/CONFIG_FIRMWARE_INCLUDE_${MOD}=y/" .config + done +fi + +for MOD in SOFTETHERVPN_SERVER SOFTETHERVPN_CLIENT SOFTETHERVPN_CMD UVC AUDIO SCUTCLIENT DOGCOM MINIEAP NJIT_CLIENT NAPT66 VLMCSD TTYD LRZSZ DUMP1090 RTL_SDR SRELAY MENTOHUST XUPNPD SHADOWSOCKS SSSERVER DNSFORWARDER; do + sed -i "s/CONFIG_FIRMWARE_INCLUDE_${MOD}=y/CONFIG_FIRMWARE_INCLUDE_${MOD}=n/" .config +done +# Yonsm } + ROOTDIR=`pwd` export ROOTDIR=$ROOTDIR +echo "CONFIG_FIRMWARE_INCLUDE_WING=y" >> .config + kernel_id="3.4.x" kernel_cf="" kernel_tf="" diff --git a/trunk/flash_firmware b/trunk/flash_firmware new file mode 100755 index 00000000000..41a50dd0de4 --- /dev/null +++ b/trunk/flash_firmware @@ -0,0 +1,9 @@ +#!/bin/sh +if [ $# = 0 ]; then + echo "Usage: $0 " + exit 0 +fi + +scp `ls /opt/rt-n56u/trunk/images/*.trx` $1:/tmp/firmware.trx +ssh $1 "mtd_write -r write /tmp/firmware.trx Firmware_Stub" + diff --git a/trunk/make_firmware b/trunk/make_firmware new file mode 100755 index 00000000000..14aa9cebce0 --- /dev/null +++ b/trunk/make_firmware @@ -0,0 +1,20 @@ +#!/bin/sh + +if [ -z "$1" ]; then + echo "Usage $0 " + exit 0 +fi + +if echo "$1" | grep : > /dev/null; then + for BOARD_NAME in XY-C1 NEWIFI3 NEWIFI-MINI K2P-5.0 RM2100 R2100; do + ./clear_tree_simple + fakeroot ./build_firmware_modify "$BOARD_NAME" + TRX=`ls images/*.trx` + [ -f "$TRX" ] || exit 1 + scp "$TRX" "$1" + done + exit 0 +fi + +./clear_tree_simple +fakeroot ./build_firmware_modify "$1" From 467db46b02e4a9c5e1a4cab662f316b86076aaac Mon Sep 17 00:00:00 2001 From: Yonsm Date: Mon, 19 Oct 2020 11:52:50 +0800 Subject: [PATCH 3/5] Refine readme --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index dd0d04098c6..329cd9c1e01 100644 --- a/README.md +++ b/README.md @@ -198,6 +198,13 @@ fakeroot ./build_firmware_modify PSG1218 ./clear_tree ``` +* 构建和刷写(Yonsm 追加,替代上面的`克隆源码`和`清理代码树并开始编译`) +```shell +#git clone --depth=1 https://github.com/Yonsm/rt-n56u.git /opt/rt-n56u +./make_firmware PSG1218 +./flash_firmware 192.168.2.1 +``` + *** ### 请参阅 ### From 7f0b495e6839b51da3d00f37a95eed68f7534cef Mon Sep 17 00:00:00 2001 From: Yonsm Date: Fri, 15 Jan 2021 12:44:02 +0800 Subject: [PATCH 4/5] Call clear_tree between different config --- trunk/make_firmware | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trunk/make_firmware b/trunk/make_firmware index 14aa9cebce0..003898f38a7 100755 --- a/trunk/make_firmware +++ b/trunk/make_firmware @@ -7,7 +7,7 @@ fi if echo "$1" | grep : > /dev/null; then for BOARD_NAME in XY-C1 NEWIFI3 NEWIFI-MINI K2P-5.0 RM2100 R2100; do - ./clear_tree_simple + ./clear_tree fakeroot ./build_firmware_modify "$BOARD_NAME" TRX=`ls images/*.trx` [ -f "$TRX" ] || exit 1 From 0c550759df24ec6cecfec9979f03185306b90504 Mon Sep 17 00:00:00 2001 From: Yonsm Date: Tue, 19 Apr 2022 18:59:53 +0800 Subject: [PATCH 5/5] Add nginx for build --- trunk/build_firmware_modify | 4 ++++ trunk/user/www/Makefile | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/trunk/build_firmware_modify b/trunk/build_firmware_modify index 4a560c82d56..83c0a9e1f7c 100755 --- a/trunk/build_firmware_modify +++ b/trunk/build_firmware_modify @@ -34,6 +34,10 @@ ROOTDIR=`pwd` export ROOTDIR=$ROOTDIR echo "CONFIG_FIRMWARE_INCLUDE_WING=y" >> .config +echo "CONFIG_FIRMWARE_INCLUDE_NGINX=y" >> .config +echo "CONFIG_FIRMWARE_INCLUDE_SSSERVER=y" >> .config +#echo "CONFIG_FIRMWARE_INCLUDE_SHADOWSOCKS=y" >> .config +#echo "CONFIG_FIRMWARE_INCLUDE_FRPC=y" >> .config kernel_id="3.4.x" kernel_cf="" diff --git a/trunk/user/www/Makefile b/trunk/user/www/Makefile index db3ae6d9e03..3ad87567c1e 100644 --- a/trunk/user/www/Makefile +++ b/trunk/user/www/Makefile @@ -9,7 +9,7 @@ include $(ROOTDIR)/user/shared/boards.mk PROJECT_HOME_URL="https:\/\/bitbucket.org\/padavan\/rt-n56u\/" PROJECT_HOME_URL_MOD="https:\/\/github.com\/Yonsm\/Padavan\/" -LABEL_COPYRIGHT_TEXT='© 2011-2021 Padavan<\/a> \& hanwckf<\/a> \& Yonsm<\/a>' +LABEL_COPYRIGHT_TEXT='© 2011-2022 Padavan<\/a> \& hanwckf<\/a> \& Yonsm<\/a>' BOARD_PATTERN=s/ZVMODELVZ/$(CONFIG_FIRMWARE_PRODUCT_ID)/g COPYR_PATTERN=s/ZVCOPYRVZ/$(LABEL_COPYRIGHT_TEXT)/g