Padavan修改心得

修改一些默认的配置,如管理的IP地址,默认的wifi信息等

/opt/rt-n56u/trunk/user/shared/defaults.h

从已编译好的固件抄袭

安装7-zip打开*.trx固件,如抄袭/opt/rt-n56u/trunk/user/scripts/profile
打开本地的/opt/rt-n56u/trunk/user/scripts/profile上写到文件上方写到
大概意思是这个文件会最终生成到路由器的 /etc/profile
# /etc/profile

所有用7zip定位到/etc/但发现这个文件是空的,所有目录下有/etc_ro/profile所有这个应该就是我们需要的文件

添加curl

curl用于下载文件Linux中执行curl网络请求,但是curl命令在Padavan的ssh中是不可用的,原因是/bin/ 中并没有curl,所有需要将curl编译到/usr/bin/
vim / opt/rt-n56u/trunk/libs/libcurl/Makefile 
文件末尾添加
ifeq ($(CONFIG_FIRMWARE_INCLUDE_CURL),y)
$(ROMFSINST) -d $(DESTDIR)/bin/curl /usr/bin/curl
endif
cp -fP $(DESTDIR)/lib/libcurl.so* $(ROMFSDIR)/lib

vim /opt/rt-n56u/trunk/libs/Makefile
添加
ifeq ($(CONFIG_FIRMWARE_INCLUDE_CURL),y)
LIBS_INCLUDE_CURL=y
LIBS_INCLUDE_MBEDTLS=y
endif
vim /opt/rt-n56u/trunk/.config
末尾添加
### Include CURL control. ~0.1MB
CONFIG_FIRMWARE_INCLUDE_CURL=y

修改RAM大小

vim /opt/rt-n56u/trunk/linux-3.4.x/.config
修改128M RAM
CONFIG_RT2880_DRAM_128M=y
设置大小
CONFIG_RALINK_RAM_SIZE=128

移除www菜单中的VPN选项

vim /opt/rt-n56u/trunk/user/www/n56u_ribbon_fixed/state.js
将
menuL1_title = new Array("", "<#menu1#>", "<#menu3#>", "<#menu2#>", "<#menu6#>", "<#menu4#>", "<#menu5_8#>", "<#menu5#>");
menuL1_link = new Array("", "index.asp", "aidisk.asp", "vpnsrv.asp", "vpncli.asp", "Main_TrafficMonitor_realtime.asp", "Advanced_System_Info.asp", "as.asp");
menuL1_icon = new Array("", "icon-home", "icon-hdd", "icon-retweet", "icon-globe", "icon-tasks", "icon-random", "icon-wrench");
改为
menuL1_title = new Array("", "<#menu1#>", "<#menu3#>", "", "", "<#menu4#>", "<#menu5_8#>", "<#menu5#>");
menuL1_link = new Array("", "index.asp", "aidisk.asp", "", "", "Main_TrafficMonitor_realtime.asp", "Advanced_System_Info.asp", "as.asp");
menuL1_icon = new Array("", "icon-home", "icon-hdd", "", "", "icon-tasks", "icon-random", "icon-wrench");
并且
vim /opt/rt-n56u/trunk/.config
注释掉
#CONFIG_FIRMWARE_INCLUDE_OPENVPN=y

发表回复

CAPTCHAis initialing...