Openwrt通用固件make menuconfig配置
选择CPU型号
Target System --->AtherosAR7xxx/AR9xxx
选择路由型号
Target Profile --->TP-LINK TL-WR843N/ND (QCA9531) 要省空间可去掉 dnsmasq和firewall
添加luci相关项
LuCI ---> Collections ---> <*> luci 添加luci(web界面管理) LuCI ---> Applications ---> <*> luci-app-adkill 98 添加去广告 LuCI ---> Applications ---> <*> luci-app-commands 添加luci的网页shell LuCI ---> Applications ---> <*> luci-app-ddns 添加动态域名 LuCI ---> Applications ---> <*> luci-app-firewall 添加防火墙 LuCI ---> Applications ---> <*> luci-app-hd-idle 添加硬盘休眠 LuCI ---> Applications ---> <*> luci-app-syncdial 98 虚拟网卡 原macvlan LuCI ---> Applications ---> <*> luci-app-mjpg-streamer 98 添加视频监控 LuCI ---> Applications ---> <*> luci-app-mmc-over-gpio 添加SD卡操作界面 LuCI ---> Applications ---> <*> luci-app-multiwan 网络叠加 nwan、pppoe多拨 LuCI ---> Applications ---> <*> luci-app-mwan3 网络叠加 LuCI ---> Applications ---> <*> luci-app-ntpc 时间同步服务器 LuCI ---> Applications ---> <*> luci-app-ocserv VPN Server LuCI ---> Applications ---> <*> luci-app-openvpn 98 添加openvpn LuCI ---> Applications ---> <*> luci-app-p910nd 添加打印服务器 LuCI ---> Applications ---> <*> luci-app-usb-printer 添加打印服务器 hackpascal 优化 LuCI ---> Applications ---> <*> luci-app-qos 添加服务质量 可选石像鬼QOS LuCI ---> Applications ---> <*> luci-app-samba 添加网络共享 LuCI ---> Applications ---> <*> luci-app-redsock2 9812 科学上网 LuCI ---> Applications ---> <*> luci-app-shadowsocks 9812 科学上网 LuCI ---> Applications ---> <*> luci-app-splash 客户端弹窗 LuCI ---> Applications ---> <*> luci-app-transmission BT下载 LuCI ---> Applications ---> <*> luci-app-upnp 添加通用即插即用 LuCI ---> Applications ---> <*> luci-app-vsftpd 9812 添加ftp服务 LuCI ---> Applications ---> <*> luci-app-webshell 98 添加网页命令行终端 LuCI ---> Applications ---> <*> luci-app-wol 添加网络唤醒 LuCI ---> Applications ---> <*> luci-app-xunlei 98 迅雷下载 LuCI ---> Applications ---> <*> luci-app-xware3 98 迅雷下载 32bit LuCI ---> Themes ---> <*> luci-theme-bootstrap 默认主题 LuCI ---> Translations ---> <*> luci-i18n-chinese 添加luci的中文语言包 Modules ---> Translations ---> <*> Simplified Chinese (zh-cn)新版本中文语言包位置
红色部分官方源默认没有,使用981213的 feeds.conf.default 合并后可看到98的选项,9812的在单独的 RA-MOD ---> LuCI Applications 下!
添加高速数据支持
Kernel modules ---> Block Device ---> <*> kmod-block2mtd Kernel modules ---> Block Device ---> <*> kmod-scsi-core
Kernel modules ---> Block Device ---> <*> kmod-scsi-generic (usb 转IDE ,SATA)
添加硬盘格式支持
Kernel modules ---> Filesystems ---> <*> kmod-fs-ext4 Kernel modules ---> Filesystems ---> <*> kmod-fs-nfs Kernel modules ---> Filesystems ---> <*> kmod-fs-nfs-common Kernel modules ---> Filesystems ---> <*> kmod-fs-ntfs (只读) Kernel modules ---> Filesystems ---> <*> kmod-fs-vfat Kernel modules ---> Filesystems ---> <*> kmod-fuse
Utilities --->Filesystem ---> <*> ntfs-3g (比ntfs更好用,但CPU占用略高)
添加编码
Kernel modules ---> Native Language Support ---> <*> kmod-nls-cp437 (FAT-fs 文件系统需要cp437支持)
Kernel modules ---> Native Language Support ---> <*> kmod-nls-iso8859-1 Kernel modules ---> Native Language Support ---> <*> kmod-nls-cp936 Kernel modules ---> Native Language Support ---> <*> kmod-nls-utf8
添加SD卡支持
Kernel modules ---> Other modules ---> <*> kmod-mmc Kernel modules ---> Other modules ---> <*> kmod-sdhci Kernel modules ---> Other modules ---> <*> kmod-sdhci-mt7620
添加USB扩展支持
Base system ---> <*> block-mount 添加USB挂载 Base system ---> <*> librt (libpthread 会自动联动选中) 添加USB挂载 Kernel modules ---> USB Support ---> <*> kmod-usb-hid(usb键盘鼠标支持) <*> kmod-usb-ohci
<*> kmod-usb-storage (usb storage 驱动)
<*> kmod-usb-storage-extras <*> kmod-usb-uhci (usb 1.1 驱动) <*> kmod-usb2 <*> kmod-usb3
添加USB转串口驱动
Kernel modules ---> USB Support ---> <*> kmod-usb-acm (Lanuchpad ,Arduino UNO驱动) Kernel modules ---> USB Support ---> <*> kmod-usb-serial <*> kmod-usb-serial-ch341 <*> kmod-usb-serial-cp210x <*> kmod-usb-serial-ftdi Kernel modules ---> USB Support ---> <*> kmod-usb-serial-pl2303
添加打印驱动
Kernel modules ---> USB Support ---> <*> kmod-usb-printer(驱动有点大,小容量rom不建议选)
添加网络配置
Network ---> SSH ---> <*> openssh-client (SSH客户端) Network ---> <*> ppp-mod-pppoe (PPPOE拨号模式) Network ---> <*> ppp-mod-pptp (VPN客户端)
Network ---> <*> wpad (为hostapd和wpa-supplicant的集合,支持802.1x认证,替换 wpad-mini) Kernel modules ---> Network Devices ---> <*> Kmod-vmxnet3 (x86_vmware 网卡驱动) Kernel modules ---> Network Devices ---> <*> Kmod-pcnet32 (x86_vmware 网卡驱动)
添加视频支持
Kernel modules ---> Video Support ---> <*> kmod-video-core <*> kmod-video-uvc Multimedia ---> <*> mjpeg-streamer
添加通讯协议支持
Network ---> <*> ser2net 用于和单片机通讯
Network ---> SSH ---> <*> openssh-sftp-server sftp协议支持,xftp可用,不依赖 vsftpd
添加BT下载工具
Network --->BitTorrent ---> <*> transmission-daemon Network --->BitTorrent ---> <*> transmission-remote Network --->BitTorrent ---> <*> transmission-web
添加FTP
Network ---> File Transfer ---> <*> vsftpd-pam(官方源码只有 vsftpd) 添加pam支持
Libraries ---> SSL ---> <*> libopenssl Libraries ---> <*> libdb47 Libraries ---> <*> libpam-db Utilities ---> <*> db47-utils
添加lsusb命令 Utilities ---> <*> usbutils Libraries ---> <*> libusb-1.0
添加无线网卡驱动
Kernel modules ---> Wireless Drivers ---> <*> kmod-lib80211
Kernel modules ---> Wireless Drivers ---> <*> kmod-rt2800-usb(3070支持) Kernel modules ---> Wireless Drivers ---> <*> kmod-rtl8187 Kernel modules ---> Wireless Drivers ---> <*> kmod-rtl8192se Kernel modules ---> Wireless Drivers ---> <*> kmod-zd1211rw
添加应用程序配置
Utilities ---> Compression ---> <*> unrar (解压缩工具) Utilities ---> Compression ---> <*> unzip (解压缩工具) Utilities ---> Compression ---> <*> zip (压缩工具)
Utilities ---> Filesystem ---> <*> badblocks (支持ext2文件系统)
Utilities ---> Filesystem ---> <*> e2fsprogs (支持ext2/ext3/ext4格式化工具) Utilities ---> disc ---> <*> blkid (可以列出分区类型卷标等) Utilities ---> disc ---> <*> fdisk (分区工具)
Utilities ---> disc ---> <*> lsblk (列出块设备,还能显示他们之间的依赖关系) Utilities ---> <*> bzip2 (解压缩工具) Utilities ---> <*> lrzsz (上传下载工具)
Utilities ---> <*> restorefactory (reset键支持(长按5秒以上就可以恢复固件默认设置))981213源码中无该项,官方源码有,981213源码更新到官方代码后会消失!
Utilities --> <*> wifitoggle(添加一键开关无线(按一下WPS键放开无线就打开或者关闭))
添加其他功能(WIFI破解)
Network --> wireless --> <*> aircrack-ng Network --> wireless --> <*> mdk3 Network --> wireless --> <*> reaver Utilities ---> <*> screen
还需要wireless-tools,libpcap可能需要降级到1.1.1版本
Network --> VPN --> <*> openvpn-polarssl (使用PolarSSL开源VPN解决方案) Libraries -> <*> libffmpeg-full (流媒体服务器)
<*> luci-app-minidlna (流媒体服务器)
解决DNS污染(源码中没有)
dnscrypt-proxy(是opendns使用椭圆曲线加密算法)
pdnsd(是给 dnscrypt-proxy 做加速的,每次都从opendns 加密查询dns,虽然很有保障,但是会很慢。pdnsd 监听1053端口,用 dnscrypt-proxy 作为上级DNS服务器,将查询结果缓存起来,可以缓存最多一周) dnsmasq(屏蔽 运营商的dns,查询pdnsd。利用 dnsmasq,可以让连到路由器上的客户端 都应用 pdnsd。)
make V=99 2>&1 |tee build.log |grep -i error 生成编译报告日志文件 make –j 2 V=s 多线程编译
make -j 2 V=s 2>&1 | tee build.log | grep -i error
路由器固件受ROM容量限制,可先编译x86版本进行测试!
以下是个性设置:基于WR703N
1.添加一键无线
在如下位置新建一个文件,文件名为01onoff
/target/linux/ar71xx/base-files/etc/hotplug.d/button/01onoff 内容如下: #!/bin/sh
[ \SW=$(uci get wireless.@wifi-device[0].disabled)
[ $SW == '0' ] && uci setwireless.@wifi-device[0].disabled=1 [ $SW == '0' ] || uci setwireless.@wifi-device[0].disabled=0 wifi }
保存后设置权限为0777
在终端下进入button文件夹,然后执行 chmod 777 –R 01onoff 命令 进入文件夹命令为 cd target/linux/ar71xx… ,最前面的路径前没有‘/’符号!
2.添加 3322 DDNS 动态域名解析
/feeds/packages/net/ddns-scripts/files/usr/lib/ddns/services 添加
\ \dyndns&hostname=[DOMAIN]&myip=[IP]&wildcard=OFF\
修改配置项
/feeds/packages/net/ddns-scripts/files/etc/config/ddns config service \ option option option
3.修改防火墙添加开放端口
/trunk/package/network/config/firewall/files/firewall.config 添加内容: config 'rule'
option 'target''ACCEPT' option '_name' 'tr' option 'src' 'wan' option 'proto''tcpudp' option 'dest_port''51413'
config 'rule'
option 'target''ACCEPT' option '_name''9091'
enabled \service_name \domain \