一半君的总结纸

听话只听一半君

为磊科q3自定义编译tomato shibby v138备忘录

这是一个古董级神机,因为flash太小只有8mb,而又没有usb口,所以lz想编译个小点的max版本(把openvpn去掉,因为lz用不着,nvram不够存key的,而且如果用来科学上网,听说早就封了),和一个大点的vpn版本(把jffs加上)

首先第一步当然是clone repo,下面假设我clone到~,lz fork了原repo,添加了几个自定义的编译选项

git clone -b q3 https://github.com/oglops/tomato.git
cd tomato
make distclean ; rm ~/outputfile;  time make V1=RT-N5x- V2=-138-netcore-q3 r2q3m  2>&1 | tee ~/outputfile.txt


# 如果想恢复所有文件
git clean -xfd; git checkout .

# 把所有log存到outputfile.log里,以备查阅,不过似乎stderr没存进去,所以lz把konsole的输出设为保留所有行,然后另存了
make distclean ; rm ~/outputfile.log;  time make V1=RT-N5x- V2=-138-ILMVFX r2q3m  2>&1 | tee ~/outputfile.log

lz修改了~/tomato/release/src-rt/Makefile的内容,添加了

# max without openvpn
q3m:
	@$(MAKE) bin BBEXTRAS=y EBTABLES=y IPV6SUPP=y B=E BUILD_DESC="Max" USB="" NOCAT=y NFS=y SNMP=y DNSCRYPT=y PPTPD=y TOR=y IPSEC=y MULTIWAN=y

# vpn with jffs
q3v:
	@$(MAKE) bin B=V BUILD_DESC="VPN" USB="" PPTPD=y IPV6SUPP=y MULTIWAN=y OPENVPN=y

...
r2q3m:
	@$(MAKE) q3m MIPS32=r2

r2q3v:
	@$(MAKE) q3v MIPS32=r2

lz给帮助里也加上了这两个选项

~/tomato/release/src-rt
[oglop@localhost]$ make help
n            Mini-USB - for oruter with 4MB flash and USB port - K24 only
e            VPN - (standard plus VPN, extra utilities and NTFS support)
c            BTgui-VPN - (Ext plus BT gui)
d            Nocat-VPN - (BTgui plus VPN plus Nocat)
g            Tor-VPN - (BTgui plus VPN plus TOR Project)
t            BT-VPN - (BT plus VPN)
b            Big-VPN - (Big plus VPN)
o            Mega-VPN - (Mega plus VPN plus NOCAT minus NFS)
z            MIPS Release 15F AIO (for routers +8MB flash)
i            MiniIPv6 - (IPv6 with no USB support minus CIFS and RIPv1/2)
j            MiniVPN - (VPN with no USB support minus CIFS and RIPv1/2)
f            Mini - (no USB support minus CIFS and RIPv1/2)
v            VPN (no usb) - (VPN with no USB support) / in K26 + IPv6 support
m            Max (no usb) - (Max with no USB support) / in K26 + IPv6 support
w            SD-VPN (no usb) - (VPN with SD-MOD and no USB support)
r2e          MIPS Release 2 VPN
r2c          MIPS Release 2 BTgui-VPN
r2d          MIPS Release 2 Nocat-VPN
r2g          MIPS Release 2 Tor-VPN
r2t          MIPS Release 2 BT-VPN
r2b          MIPS Release 2 Big-VPN
r2o          MIPS Release 2 Mega-VPN (for routers +8MB flash)
r2z          MIPS Release 2 AIO (for routers +8MB flash)
r2v          MIPS Release 2 VPN (no usb)
r2m          MIPS Release 2 Max (no usb)
r2i          MIPS Release 2 MiniIPv6 (for 4MB flash)
r2j          MIPS Release 2 MiniVPN (for 4MB flash)
r2f          MIPS Release 2 Mini (for netgear)
       Linksys E-Series with 4MB Flash(E1000v2/v2.1/E1200v1)
e1000v2f     Linksys E1000v2-v2.1/Cisco M10v2 Mini
e1000v2i     Linksys E1000v2-v2.1/Cisco M10v2 MiniIPv6
e1200v1f     Linksys E1200v1 Mini
e1200v1i     Linksys E1200v1 MiniIPv6
       Linksys E-Series with 60k Nvram
n60e         Linksys E-series build VPN
n60c         Linksys E-series build BTGui-VPN
n60d         Linksys E-series build BTGui-VPN plus Nocat
n60g         Linksys E-series build BTGui-VPN plus TOR Project
n60t         Linksys E-series build BT-VPN
n60b         Linksys E-series build Big-VPN
n60o         Linksys E-series build Mega-VPN
n60z         Linksys E-series build AIO
n60i         Linksys E-series build Mini for E2500
n60j         Linksys E-series build MiniIPv6 for E2500
n60v         Linksys E-series build IPv6-VPN for E2000
n60m         Linksys E-series build Max for E2000
       Linksys E-Series with 64k Nvram/8MB Flash(E800/E900/E1200v2/E1500)
n64e         Linksys E-series(64k Nvram) build VPN
n64c         Linksys E-series(64k Nvram) build BTGui-VPN
n64d         Linksys E-series(64k Nvram) build BTGui-VPN plus Nocat
n64g         Linksys E-series(64k Nvram) build BTGui-VPN plus TOR Project
n64u         Linksys E-series(64k Nvram) build BT
n64t         Linksys E-series(64k Nvram) build BT-VPN
n64b         Linksys E-series(64k Nvram) build Big-VPN
n64o         Linksys E-series(64k Nvram) build Mega-VPN
n64v         Linksys E-series(64k Nvram) build IPv6-VPN
n64m         Linksys E-series(64k Nvram) build Max
       Routers with wl_high module
rtn53        Asus RT-N53 with wl_high module (dualband support)
e2500        Linksys E2500 with wl_high module (dualband support)
e3200        Linksys E3200/E2500v3 with wl_high module (dualband support) / max 16MB
n6           Tenda N6 with wl_high module (dualband support)
n60          Tenda N60 with wl_high module (dualband support)
       Netgear WNR3500L v2 builds (128MB Flash)
v2e          Netgear WNR3500Lv2 build VPN
v2z          Netgear WNR3500Lv2 build AIO

r64e         RT-N66u build VPN
r64z         RT-N66u build AIO

r2q3m        Netcore q3 build Max without OPENVPN
r2q3v        Netcore q3 build VPN with JFFS

..etc..      other build configs
clean        -C router clean
cleanimage   rm -rf image
cleantools   clean btools, mksquashfs
cleankernel  -C Linux distclean (but preserves .config)
distclean    distclean of Linux & busybox (but preserve .configs)
prepk        -C Linux oldconfig dep

ps:如果用原版tomato,没有lz的修改的是

git clone https://github.com/tomatofirmware/tomato.git
cd tomato
# 不知道为何这样不行
git checkout tags/v138

#lz直接用最新的 tomato-shibby-RT-AC 就可以
git checkout tomato-shibby-RT-AC

下载链接:
去掉了openvpn的max版tomato-K26-1.28.RT-N5x-MIPSR2-138-netcore-q3-Max.trx
带jffs的vpn版tomato-K26-1.28.RT-N5x-MIPSR2-138-netcore-q3-VPN.trx

lz的github repo https://github.com/oglops/tomato

Advertisements

One response to “为磊科q3自定义编译tomato shibby v138备忘录

  1. kc88 二月 16, 2017 @ 6:54 下午

    可清掉2m多的tor和pptp这两个gfw下没用的,openvpn还是能保留,
    至少跑openvpn over ss/ssr能绕过gfw,也能较安全登入ssh处理远端机。

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: