Skip to content

Commit

Permalink
Merge branch 'build'
Browse files Browse the repository at this point in the history
  • Loading branch information
Yonsm committed Apr 20, 2022
2 parents 4bd449c + 0c55075 commit ee263b9
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 4 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

***

### 请参阅 ###
Expand Down
23 changes: 23 additions & 0 deletions trunk/build_firmware_modify
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,32 @@ 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
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=""
kernel_tf=""
Expand Down
9 changes: 9 additions & 0 deletions trunk/flash_firmware
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
if [ $# = 0 ]; then
echo "Usage: $0 <TargetHost>"
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"

20 changes: 20 additions & 0 deletions trunk/make_firmware
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh

if [ -z "$1" ]; then
echo "Usage $0 <BOARD_NAME|admin@iMac:~/Desktop>"
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
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"
4 changes: 2 additions & 2 deletions trunk/user/www/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="https:\/\/bitbucket.org\/padavan\/rt-n56u" target="blank">Padavan<\/a> \& N56U project community \& by <a href="https:\/\/github.com\/hanwckf\/rt-n56u" target="blank">hanwckf<\/a>'
LABEL_COPYRIGHT_TEXT='© 2011-2022 <a href="https:\/\/bitbucket.org\/padavan\/rt-n56u" target="blank">Padavan<\/a> \& <a href="https:\/\/github.com\/hanwckf\/rt-n56u" target="blank">hanwckf<\/a> \& <a href="https:\/\/github.com\/Yonsm\/Padavan" target="blank">Yonsm<\/a>'

BOARD_PATTERN=s/ZVMODELVZ/$(CONFIG_FIRMWARE_PRODUCT_ID)/g
COPYR_PATTERN=s/ZVCOPYRVZ/$(LABEL_COPYRIGHT_TEXT)/g
Expand Down
4 changes: 2 additions & 2 deletions trunk/versions.inc
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit ee263b9

Please sign in to comment.