Openwrt官方的WNDR3700v4固件(14.07)不能完整利用128MB NAND的空间,刷完后只剩13MB了,网上说还有96MB左右空闲着,只能修改Makefile自己重新编译固件了,于是在Ubuntu上用官方的源编译了一天,加上网速慢,到下午4点都还没编译好。后来发现了有ImageBuilder,直接就能修改固件了,还能添加需要的ipk包进去(靠,白忙了一天……)
去Openwrt下载好 OpenWrt-ImageBuilder-ar71xx_nand-for-linux-x86_64.tar.bz2 放到 Ubuntu的home目录,提取出OpenWrt-ImageBuilder-ar71xx_nand-for-linux-x86_64这个文件夹,进入该文件夹 target/linux/ar71xx/image/ 修改Makefile文件,将wndr4300_mtdlayout=mtdparts=ar934x-nfc:256k(u-boot)ro,256k(u-boot-env)ro,256k(caldata),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),512k(pot),2048k(language),512k(config),3072k(traffic_meter),2048k(kernel),121856k(ubi),123904k@0x6c0000(firmware),256k(caldata_backup),-(reserved) 保存,退出!此处参考 http://blog.csdn.net/magicdog2009/article/details/41628727
打开 终端,cd 到 OpenWrt-ImageBuilder-ar71xx_nand-for-linux-x86_64文件夹下,这时候 make image,即可产生可以支持128MB NAND的镜像,在bin文件夹下,不过这时候生成的镜像仅包含基本系统,没有Luci web界面,不方便使用。我是按照之前官方镜像自带的软件包去make新镜像的,命令如下:
make image PACKAGES=”base-files busybox dnsmasq dropbear firewall fstools hostapd-common ip6tables iptables iw iwinfo jshn jsonfilter kernel kmod-ath kmod-ath9k kmod-ath9k-common kmod-cfg80211 kmod-crypto-aes kmod-crypto-arc4 kmod-crypto-core kmod-gpio-button-hotplug kmod-ip6tables kmod-ipt-conntrack kmod-ipt-core kmod-ipt-nat kmod-ipt-nathelper kmod-ipv6 kmod-ledtrig-usbdev kmod-lib-crc-ccitt kmod-mac80211 kmod-nls-base kmod-ppp kmod-pppoe kmod-pppox kmod-slhc kmod-usb-core kmod-usb-ohci kmod-usb2 libblobmsg-json libc libgcc libip4tc libip6tc libiwinfo libiwinfo-lua libjson-c libjson-script liblua libnl-tiny libubox libubus libubus-lua libuci libuci-lua libxtables lua luci luci-app-firewall luci-base luci-i18n-chinese luci-lib-nixio luci-mod-admin-full luci-proto-ipv6 luci-proto-ppp luci-theme-bootstrap mtd netifd odhcp6c odhcpd opkg ppp ppp-mod-pppoe procd procd-nand swconfig ubi-utils uboot-envtools ubox ubus ubusd uci uhttpd uhttpd-mod-ubus wpad-mini”
很长,我懒得查哪些镜像有的哪些要添加的,直接上了,编译后
如果已经刷好Openwrt直接进Web界面刷 tar结尾固件,如果从原版系统,进web刷img结尾固件。
刷完后,128MB的空间全部释放出来,安装Python什么的都不是问题了,额,我是为了跑Python才折腾的,不是为了翻Q,跑跑自己写的代码做做智能家居玩玩。。