版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
Openwrt通用固件makemenuconfig配置選擇CPU型號(hào)TargetSystem>AtherosAR7xxx/AR9xxx選擇路由型號(hào)TargetPro>TP-LINKTL-WR843N/ND(QCA9531)要省空間可去掉dnsmasq和firewall添加luci相關(guān)項(xiàng)LuCI>Collections><*>luci添加luci(web界面管理)LuCI>Applications><*>luci-app-adkill98添加去廣告LuCI>Applications><*>luci-app-commands添加luci的網(wǎng)頁shellLuCI>Applications><*>luci-app-ddns添加動(dòng)態(tài)域名LuCI>Applications><*>luci-app-firewall添加防火墻LuCI>Applications><*>luci-app-hd-idle添加硬盤休眠LuCI>Applications><*>luci-app-syncdial98虛擬網(wǎng)卡原macvlanLuCI>Applications><*>luci-app-mjpg-streamer98添加視頻監(jiān)控LuCI>Applications><*>luci-app-mmc-over-gpio添加SD卡操作界面LuCI>Applications><*>luci-app-multiwan網(wǎng)絡(luò)疊加nwan、pppoe多撥LuCI>Applications><*>luci-app-mwan3網(wǎng)絡(luò)疊加LuCI>Applications><*>luci-app-ntpc時(shí)間同步服務(wù)器LuCI>Applications><*>luci-app-ocservVPNServerLuCI>Applications><*>luci-app-openvpn98添加openvpnLuCI>Applications><*>luci-app-p910nd添加打印服務(wù)器LuCI>Applications><*>luci-app-usb-printer添加打印服務(wù)器hackpascal優(yōu)化LuCI>Applications><*>luci-app-qos添加服務(wù)質(zhì)量可選石像鬼QOSLuCI>Applications><*>luci-app-samba添加網(wǎng)絡(luò)共享LuCI>Applications><*>luci-app-redsock29812科學(xué)上網(wǎng)LuCI>Applications><*>luci-app-shadowsocks9812科學(xué)上網(wǎng)LuCI>Applications><*>luci-app-splash客戶端彈窗LuCI>Applications><*>luci-app-transmissionBT下載LuCI>Applications><*>luci-app-upnp添加通用即插即用LuCI>Applications><*>luci-app-vsftpd9812添加ftp服務(wù)LuCI>Applications><*>luci-app-webshell98添加網(wǎng)頁吩咐行終端LuCI>Applications><*>luci-app-wol添加網(wǎng)絡(luò)喚醒LuCI>Applications><*>luci-app-xunlei98迅雷下載LuCI>Applications><*>luci-app-xware398迅雷下載32bitLuCI>Themes><*>luci-theme-bootstrap默認(rèn)主題LuCI>Translations><*>luci-i18n-chinese添加luci的中文語言包Modules>Translations><*>SimplifiedChinese(zh-cn)新版本中文語言包位置紅色部分官方源默認(rèn)沒有,運(yùn)用981213的feeds.conf.default合并后可看到98的選項(xiàng),9812的在單獨(dú)的RA-MOD>LuCIApplications下!
添加高速數(shù)據(jù)支持Kernelmodules>BlockDevice><*>kmod-block2mtdKernelmodules>BlockDevice><*>kmod-scsi-coreKernelmodules>BlockDevice><*>kmod-scsi-generic(usb轉(zhuǎn)IDE,SATA)添加硬盤格式支持Kernelmodules>><*>kmod-fs-ext4Kernelmodules>><*>kmod-fs-nfsKernelmodules>><*>kmod-fs-nfs-commonKernelmodules>><*>kmod-fs-ntfs(只讀)Kernelmodules>s><*>kmod-fs-vfatKernelmodules>><*>kmod-fuseUtilities>><*>ntfs-3g(比ntfs更好用,但CPU占用略高)添加編碼Kernelmodules>NativeLanguageSupport><*>kmod-nls-cp437(FAT-fs文件系統(tǒng)須要cp437支持)Kernelmodules>NativeLanguageSupport><*>kmod-nls-iso8859-1Kernelmodules>NativeLanguageSupport><*>kmod-nls-cp936Kernelmodules>NativeLanguageSupport><*>kmod-nls-utf8添加SD卡支持Kernelmodules>Othermodules><*>kmod-mmcKernelmodules>Othermodules><*>kmod-sdhciKernelmodules>Othermodules><*>kmod-sdhci-mt7620添加USB擴(kuò)展支持Basesystem><*>block-mount添加USB掛載Basesystem><*>librt(libpthread會(huì)自動(dòng)聯(lián)動(dòng)選中)添加USB掛載Kernelmodules>USBSupport><*>kmod-usb-hid(usb鍵盤鼠標(biāo)支持)<*>kmod-usb-ohci<*>kmod-usb-storage(usbstorage驅(qū)動(dòng))<*>kmod-usb-storage-extras<*>kmod-usb-uhci(usb1.1驅(qū)動(dòng))<*>kmod-usb2<*>kmod-usb3添加USB轉(zhuǎn)串口驅(qū)動(dòng)Kernelmodules>USBSupport><*>kmod-usb-acm (Lanuchpad,ArduinoUNO驅(qū)動(dòng))Kernelmodules>USBSupport><*>kmod-usb-serial<*>kmod-usb-serial-ch341<*>kmod-usb-serial-cp210x<*>kmod-usb-serial-ftdiKernelmodules>USBSupport><*>kmod-usb-serial-pl2303添加打印驅(qū)動(dòng)Kernelmodules>USBSupport><*>kmod-usb-printer (驅(qū)動(dòng)有點(diǎn)大,小容量rom不建議選)
添加網(wǎng)絡(luò)配置Network>SSH><*>openssh-client (SSH客戶端)Network><*>ppp-mod-pppoe (PPPOE撥號(hào)模式)Network><*>ppp-mod-pptp (VPN客戶端)Network><*>wpad (為hostapd和wpa-supplicant的集合,支持802.1x認(rèn)證,替換wpad-mini)Kernelmodules>NetworkDevices><*>Kmod-vmxnet3 (x86_vmware網(wǎng)卡驅(qū)動(dòng))Kernelmodules>NetworkDevices><*>Kmod-pcnet32 (x86_vmware網(wǎng)卡驅(qū)動(dòng))添加視頻支持Kernelmodules>VideoSupport><*>kmod-video-core<*>kmod-video-uvcMultimedia><*>mjpeg-streamer添加通訊協(xié)議支持Network><*>ser2net 用于和單片機(jī)通訊Network>SSH><*>openssh-s sftp協(xié)議支持,xftp可用,不依靠vsftpd添加BT下載工具Network>BitTorrent><*>transmission-daemonNetwork>BitTorrent><*>transmission-remoteNetwork>BitTorrent><*>transmission-web添加FTPNetwork>><*>vs (官方源碼只有vsftpd)添加pam支持Libraries>SSL><*>libopensslLibraries><*>libdb47Libraries><*>libpam-dbUtilities><*>db47-utils添加lsusb吩咐Utilities><*>usbutilsLibraries><*>libusb-1.0添加無線網(wǎng)卡驅(qū)動(dòng)Kernelmodules>WirelessDrivers><*>kmod-lib80211Kernelmodules>WirelessDrivers><*>kmod-rt2800-usb (3070支持)Kernelmodules>WirelessDrivers><*>kmod-rtl8187Kernelmodules>WirelessDrivers><*>kmod-rtl8192seKernelmodules>WirelessDrivers><*>kmod-zd1211rw添加應(yīng)用程序配置Utilities>Compression><*>unrar (解壓縮工具)Utilities>Compression><*>unzip (解壓縮工具)Utilities>Compression><*>zip (壓縮工具)Utilities>><*>badblocks (支持ext2文件系統(tǒng))Utilities>><*>e2fsprogs (支持ext2/ext3/ext4格式化工具)Utilities>disc><*>blkid (可以列出分區(qū)類型卷標(biāo)等)Utilities>disc><*>fdisk (分區(qū)工具)Utilities>disc><*>lsblk (列出塊設(shè)備,還能顯示他們之間的依靠關(guān)系)Utilities><*>bzip2 (解壓縮工具)Utilities><*>lrzsz (上傳下載工具)Utilities><*>restorefactory (reset鍵支持(長(zhǎng)按5秒以上就可以復(fù)原固件默認(rèn)設(shè)置))981213源碼中無該項(xiàng),官方源碼有,981213源碼更新到官方代碼后會(huì)消逝!Utilities--><*>wifitoggle (添加一鍵開關(guān)無線(按一下WPS鍵放開無線就打開或者關(guān)閉))添加其他功能(WIFI破解)Network-->wireless--><*>aircrack-ngNetwork-->wireless--><*>mdk3Network-->wireless--><*>reaverUtilities><*>screen還須要wireless-tools,libpcap可能須要降級(jí)到版本Network-->VPN--><*>openvpn-polarssl (運(yùn)用PolarSSL開源VPN解決方案)Libraries--><*>libffmpeg-full (流媒體服務(wù)器)<*>luci-app-minidlna (流媒體服務(wù)器)解決DNS污染(源碼中沒有)dnscrypt-proxy (是opendns運(yùn)用橢圓曲線加密算法)pdnsd(是給dnscrypt-proxy做加速的,每次都從opendns加密查詢dns,雖然很有保障,但是會(huì)很慢。pdnsd監(jiān)聽1053端口,用dnscrypt-proxy作為上級(jí)DNS服務(wù)器,將查詢結(jié)果緩存起來,可以緩存最多一周)dnsmasq (屏蔽運(yùn)營(yíng)商的dns,查詢pdnsd。利用dnsmasq,可以讓連到路由器上的客戶端都應(yīng)用pdnsd。)makeV=992>&1|teebuild.log|grep-ierror生成編譯報(bào)告日志文件make–j2V=s多線程編譯make-j2V=s2>&1|teebuild.log|grep-ierror路由器固件受ROM容量限制,可先編譯x86版本進(jìn)行測(cè)試!以下是特性設(shè)置:基于WR703N1.添加一鍵無線在如下位置新建一個(gè)文件,文件名為01onoff/target/linux/ar71xx/base-內(nèi)容如下:#!/bin/sh["$BUTTON"="wps"]&&["$ACTION"="pressed"]&&{SW=$(ucigetwireless.@wifi-device[0].disabled)[$SW=='0']&&ucisetwireless.@wifi-device[0].disabled=1[$SW=='0']||ucisetwireless.@wifi-device[0].disabled=0wifi}保存后設(shè)置權(quán)限為0777在終端下進(jìn)入button文件夾,然后執(zhí)行chmod777–R01onoff吩咐進(jìn)入文件夾吩咐為cdtarget/linux/ar71xx…,最前面的路徑前沒有‘/’符號(hào)!2.添加3322DDNS動(dòng)態(tài)域名解析/feeds/packages/net/ddns-scripts/添加"3322.org"“://[USERNAME]:[PASSWORD]@/dyndns/update?system=dyndns&hostname=[DOMAIN]&myip=[IP]&wildcard=OFF"修改配置項(xiàng)/feeds/packages/net/ddns-scripts/configservice"myddns"optionenabled"1"optionservice_name"3322.org"optiondomain""3.修改防火墻添加開放端口/trunk/package/network/config/firewall/添加內(nèi)容: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'option'src''wan'option'proto''tcp'option'dest_port''9091'4.修改無線默認(rèn)啟動(dòng)放射功率及加密/package/mac80211/修改內(nèi)容:留意對(duì)齊,參考修改在文件最終修改以下內(nèi)容:configwifi-deviceradio$devidxoptiontypemac80211optionchannel${channel}optionmacaddr$(cat/sys/class/ieee80211/${dev}/macaddress)optionhwmode11${mode_11n}${mode_band}$ht_capab#REMOVETHISLINETOENABLEWIFI:optiondisabled0optiontxpower17optionhtmodeHT40-optionnoscan1optioncountryCNconfigwifi-ifaceoptiondeviceradio$devidxoptionnetworklanoptionmodeapoptionssidOpenWrt_$(cat/sys/class/ieee80211/${dev}/macaddress|tr"[a-z]""[A-Z]"|sed's/://g'|cut-c7-12)optionencryptionpsk2加密方式(optionencryptionnone無密碼)optionkeyxxxxxxxx密碼(8位)xxxxxxxxEOFdevidx=$(($devidx+1))done}5.修改路由器名字和時(shí)區(qū)/package/base-修改內(nèi)容:configsystemoptionhostnameOpenWrtoptionzonenameAsia/ShanghaioptiontimezoneCST-86.默認(rèn)啟動(dòng)DHCP(703n用來當(dāng)二級(jí)路由)/trunk/package/network/services/dnsmasq/configdhcplanoptioninterfacelanoptionstart100optionlimit150optionleasetime12hoptionignore0添加這個(gè)7.修改Transmission配置文件/feeds/packages/net/transmission/修改內(nèi)容:optionrpc_authentication_requiredtrueoptionumask08.修改network配置,配置成二級(jí)路由/trunk/package/base-修改內(nèi)容:#Copyright(C)2006OpenWconfiginterfaceloopbackoptionifnamelooptionprotostaticoptionipaddroptionnetmaskconfiginterfacelanoptiontypebridgeoptionprotostaticoptionipaddroptionnetmaskconfiginterfacewanoptionifnameeth0option_orig_ifnameeth0option_orig_bridgefalseoptionprotodhcp9.添加利用reset鍵的一鍵切換路由工作模式在如下位置新建4個(gè)文件,在保存后,請(qǐng)修改權(quán)限為777/target/linux/ar71xx/base-./etc/functions.shdo_button(){localbuttonlocalactionlocalhandlerlocalminlocalmaxconfig_getbutton$1buttonconfig_getaction$1actionconfig_gethandler$1handlerconfig_getmin$1minconfig_getmax$1max["$ACTION"="$action"-a"$BUTTON"="$button"-a-n"$handler"]&&{[-z"$min"-o-z"$max"]&&eval$handler[-n"$min"-a-n"$max"]&&{[$min-le$SEEN-a$max-ge$SEEN]&&eval$handler}}}config_loadsystemconfig_foreachdo_buttonbutton/target/linux/ar71xx/base-#!/bin/shucideletenetwork.wanucideletenetwork.lanucisetnetwork.lan=interfaceucisetnetwork.lan.ifname=eth0ucisetnetwork.lan.type=bridgeucisetto=staticucisetnetwork.lan.ipaddr=ucisetmask=ucisetnetwork.lan.gateway=ucisetnetwork.lan.dns=ucicommitnetworkucisetdhcp.lan.ignore=1ucicommitdhcpreboot/target/linux/ar71xx/base-#!/bin/shucideletenetwork.wanucideletenetwork.lanucisetnetwork.lan=interfaceucisetnetwork.lan.type=bridgeucisetto=staticucisetnetwork.lan.ipaddr=ucisetmask=ucisetnetwork.wan=interfaceucisetnetwork.wan.ifname=eth0ucisetto=dhcpucisetnetwork.wan._orig_ifname=eth0ucisetnetwork.wan._orig_bridge=falseucicommitnetworkucideletedhcp.lan.ignoreucicommitdhcpreboot/target/linux/ar71xx/base-#!/bin/shucideletenetwork.wanucideletenetwork.lanucisetnetwork.lan=interfaceucisetnetwork.lan.ifname=eth0ucisetnetwork.lan.type=bridgeucisetto=staticucisetnetwork.lan.ipaddr=ucisetmask=ucisetnetwork.wan=interfaceucisetnetwork.wan.ifname=ppp0ucisetto=3gucisetnetwork.wan.maxwait=0ucisetnetwork.wan.service=evdoucisetnetwork.wan.device=/dev/ttyUSB0ucisetnetwork.wan.username=ucisetnetwork.wan.password=vnet.mobiucisetnetwork.wan.auto=1ucicommitnetworkucideletedhcp.lan.ignoreucicommitdhcpreboot修改/package/base-,在尾部添加configbuttonoptionbutton'reset'optionaction'released'optionhandler'/etc/hotplug.d/button/change23g'optionmin'0'optionmax'2'configbuttonoptionbutton'reset'optionaction'released'optionhandler'/etc/hotplug.d/button/change2ap'optionmin'3'optionmax'8'configbuttonoptionbutton'reset'optionaction'released'optionhandler'/etc/hotplug.d/button/change2dhcp'optionmin'9'optionmax'99'這樣以后按住reset2秒內(nèi),3-8秒和9秒以上,會(huì)自動(dòng)切換到對(duì)應(yīng)的網(wǎng)絡(luò)配置,并自動(dòng)重啟路由器。按住reset0-2秒放開,切換到3g配置,按住reset3-8秒放開,切換到ap模式,reset9秒以上放開,切換到二級(jí)路由dhcp模式。10.修改掛載點(diǎn)路徑:./openwrt/trunk/package/block-mount/files修改10-swap,20-fsck,40-mount的權(quán)限為77711.添加對(duì)中文編碼cp936的支持,openwrt事實(shí)上是支持cp936的,只是沒開放而已修改文件openwrt/trunk/package/kernel/modules/nls.mk在文件尾部添加defineKernelPackage/nls-cp936SUBMENU:=NativeLanguageSupportTITLE:=Codepage936(China)KCONFIG:=CONFIG_NLS_CODEPAGE_936$(LINUX_DIR)/fs/nls/nls_cp936.koAUTOLOAD:=$(callAutoLoad,25,nls_cp936)$(callAddDepends/nls)endefdefineKernelPackage/nls-cp936/descriptionKernelmoduleforNLSCodepage936(Chinese)endef$(eval$(callKernelPackage,nls-cp936))保存,這樣在以后執(zhí)行makemenuconfig時(shí),在Kernelmodules>NativeLanguageSupport下面會(huì)多一個(gè)<>kmod-nls-cp936Codepage936(china)(NEW)12.8m固件支持(新版本)tools/firmware-utils/src/mktplinkfw.c中代碼:staticstructflash_layoutlayouts[]={{.id="4M",.fw_max_len=0x3c0000,.kernel_la=0x80060000,.kernel_ep=0x80060000,.rootfs_ofs=0x140000,},{.id="4Mlzma",.fw_max_len=0x3c0000,.kernel_la=0x80060000,.kernel_ep=0x80060000,.rootfs_ofs=0x100000,},{.id="8M",.fw_max_len=0x7c0000,.kernel_la=0x80060000,.kernel_ep=0x80060000,.rootfs_ofs=0x140000,},{.id="8Mlzma",.fw_max_len=0x7c0000,.kernel_la=0x80060000,.kernel_ep=0x80060000,.rootfs_ofs=0x100000,},{/*terminatingentry*/}};staticstructboard_infoboards[]={},{.id="TL-WR703Nv1",.hw_id=HWID_TL_WR703N_V1,.hw_rev=1,.layout_id="4Mlzma",//只改此,8Mlzma},{}13.Luci主題修改編輯 ./feeds/luci/modules/luci-base/root/etc/config/luci默認(rèn)主題: optionmediaurlbase/luci-static/bootstrap默認(rèn)語言: optionlangzh-cn14.Luci頁面文字修改編輯 ./feeds/luci/modules/luci-base/po/zh-cn/base.po進(jìn)階設(shè)置/trunk/tools/firmware-utils/src/mktplinkfw.c“fwmaxlen”,默認(rèn)3c0000是4M的;改成7c0000是8M;改成fc0000是16M修改target/linux/ar71xx/(找相應(yīng)文件)4M8M16M
41.name="u-boot",
42.offset=0,
43.size=0x020000,
44.mask_flags=MTD_WRITEABLE,
45},{
46.name="kernel",
47.offset=0x020000,
48.size=0x140000,
49},{
50.name="rootfs",
51.offset=0x160000,
52.size=0x290000,
53},{
54.name="art",
55.offset=0x3f0000,
56.size=0x010000,
57.mask_flags=MTD_WRITEABLE,
58},{
59.name="firmware",
60.offset=0x020000,
61.size=0x3d0000,
62}
63};
41.name="u-boot",
42.offset=0,
43.size=0x020000,
44.mask_flags=MTD_WRITEABLE,
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 先進(jìn)的科學(xué)文化北師大版-課件
- 腰椎椎間盤膨出癥療效對(duì)比分析-洞察分析
- 危險(xiǎn)化學(xué)品安全管理工作總結(jié)范文(8篇)
- 異構(gòu)圖索引技術(shù)-洞察分析
- 碳排放監(jiān)測(cè)與減排技術(shù)-洞察分析
- 勤儉節(jié)約為主題的國(guó)旗下講話稿范文(12篇)
- 《測(cè)繪工程GPS》課件
- 辦公之技術(shù)宇宙提升工作效率的探索
- 辦公環(huán)境中的學(xué)生團(tuán)隊(duì)建設(shè)與協(xié)作
- 公共建筑綠色照明設(shè)計(jì)與實(shí)踐案例分享
- JJG 1121-2015旋進(jìn)旋渦流量計(jì)
- GB/T 3683.1-2006橡膠軟管及軟管組合件鋼絲編織增強(qiáng)液壓型規(guī)范第1部分:油基流體適用
- 2023年軍考數(shù)學(xué)真題《歷年軍考真題系列》
- 公寓de全人物攻略本為個(gè)人愛好而制成如需轉(zhuǎn)載注明信息
- 減少巡回護(hù)士手術(shù)中外出次數(shù)品管圈匯報(bào)書模板課件
- 5分鐘安全五人小品劇本
- 售后服務(wù)人員培訓(xùn)課件
- 大學(xué)生創(chuàng)新思維教學(xué)課件全套教學(xué)課件
- 教育研究導(dǎo)論首都師范
- 工會(huì)新聞的寫作培訓(xùn)講義(共36頁).ppt
- [爆笑小品校園劇本7人]爆笑小品校園劇本
評(píng)論
0/150
提交評(píng)論