相对官方固件,修改以下几点:
固件仅仅是对官方的重新打包,所以可以使用官方所有的 kmod
version="17.01.0"
wget "https://downloads.lede-project.org/releases/${version}/targets/ar71xx/nand/lede-imagebuilder-${version}-ar71xx-nand.Linux-x86_64.tar.xz"
tar -axf "lede-imagebuilder-${version}-ar71xx-nand.Linux-x86_64.tar.xz"
cd "lede-imagebuilder-${version}-ar71xx-nand.Linux-x86_64"
cat >wndr4300-lede-17.01.0.patch<<'EOF'
--- target/linux/ar71xx/image/legacy.mk 2017-02-25 20:36:05.945981306 +0800
+++ target/linux/ar71xx/image/legacy.mk 2017-02-25 20:39:39.015888878 +0800
@@ -281,7 +281,8 @@
wnr2000v4_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(u-boot-env)ro,3776k(firmware),64k(art)ro
r6100_mtdlayout=mtdparts=ar934x-nfc:128k(u-boot)ro,256k(caldata)ro,256k(caldata-backup),512k(config),512k(pot),2048k(kernel),122240k(ubi),25600k@0x1a0000(firmware),2048k(language),3072k(traffic_meter)
tew823dru_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(nvram)ro,15296k(firmware),192k(lang)ro,512k(my-dlink)ro,64k(mac)ro,64k(art)ro
-wndr4300_mtdlayout=mtdparts=ar934x-nfc:256k(u-boot)ro,256k(u-boot-env)ro,256k(caldata)ro,512k(pot),2048k(language),512k(config),3072k(traffic_meter),2048k(kernel),23552k(ubi),25600k@0x6c0000(firmware),256k(caldata_backup),-(reserved)
+#wndr4300_mtdlayout=mtdparts=ar934x-nfc:256k(u-boot)ro,256k(u-boot-env)ro,256k(caldata)ro,512k(pot),2048k(language),512k(config),3072k(traffic_meter),2048k(kernel),23552k(ubi),25600k@0x6c0000(firmware),256k(caldata_backup),-(reserved)
+wndr4300_mtdlayout=mtdparts=ar934x-nfc:256k(u-boot)ro,256k(u-boot-env)ro,256k(caldata)ro,512k(pot),2048k(language),512k(config),3072k(traffic_meter),2048k(kernel),121856k(ubi),123904k@0x6c0000(firmware),256k(caldata_backup),-(reserved)
zcn1523h_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6208k(rootfs),1472k(kernel),64k(configure)ro,64k(mfg)ro,64k(art)ro,7680k@0x50000(firmware)
mynet_rext_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,7808k(firmware),64k(nvram)ro,64k(ART)ro
zyx_nbg6716_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(env)ro,64k(RFdata)ro,-(nbu);ar934x-nfc:2048k(zyxel_rfsd),2048k(romd),1024k(header),2048k(kernel),-(ubi)
EOF
patch -p0 < wndr4300-lede-17.01.0.patch
mkdir -p v2ex/etc/config
cat > v2ex/etc/config/wireless<<'EOF'
config wifi-device 'radio0'
option type 'mac80211'
option hwmode '11g'
option path 'platform/ar934x_wmac'
option htmode 'HT20'
option channel 'auto'
option country 'US'
option txpower '27'
option disabled '0'
config wifi-iface
option device 'radio0'
option network 'lan'
option mode 'ap'
option encryption 'psk2+ccmp'
option key 'v2exv2ex'
option ssid 'WNDR4300'
option wmm '0'
config wifi-device 'radio1'
option type 'mac80211'
option hwmode '11a'
option path 'pci0000:00/0000:00:00.0'
option channel 'auto'
option country 'US'
option disabled '0'
option htmode 'HT40'
option txpower '17'
config wifi-iface
option device 'radio1'
option mode 'ap'
option network 'lan'
option encryption 'psk2+ccmp'
option key 'v2exv2ex'
option ssid 'WNDR4300-5G'
option wmm '0'
EOF
name="lede-17.01.0-ar71xx-nand-wndr4300"
make image PROFILE=WNDR4300V1 PACKAGES="luci luci-theme-bootstrap luci-app-firewall uci dnsmasq-full wpad-mini -dnsmasq" FILES=v2ex
cd bin/targets/ar71xx/nand/
mv lede-17.01.0-r3205-59508e3-ar71xx-nand-wndr4300-squashfs-sysupgrade.tar ${name}-squashfs-sysupgrade.tar
mv lede-17.01.0-r3205-59508e3-ar71xx-nand-wndr4300-ubi-factory.img ${name}-ubi-factory.img
tar Jcf "${name}.tar.xz" ${name}-squashfs-sysupgrade.tar ${name}-ubi-factory.img
mv "${name}.tar.xz" ../../../../
cd ../../../../
刷固件之后,可以连接路由的 wifi, SSID 和密码分别是
WNDR4300
v2exv2ex
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.