为wndr4300编译openwrt 15.05系统

sudo apt-get install subversion git-core gcc g++ binutils patch bzip2 flex bison make autoconf gettext texinfo unzip sharutils ncurses-term zlib1g-dev libncurses5-dev gawk libssl-dev build-essential xsltproc gcc-multilib vim ccache

mkdir openwrt && cd openwrt
git clone git://git.openwrt.org/15.05/openwrt.git
git checkout 15.05
./scripts/feeds update -a
./scripts/feeds install luci

2.1 编译

2.1.1 获取官方配置

wget https://downloads.openwrt.org/chaos_calmer/15.05/ar71xx/nand/config.diff
将 config.diffg 文件
CONFIG_TARGET_ar71xx_nand_R6100=y
行修改为
CONFIG_TARGET_ar71xx_nand_WNDR4300=y

2.1.2 生成配置

cat config.diff >> .config
make defconfig

2.1.3 修改 /root 为128MB

修改 target/linux/ar71xx/image/Makefile 文件,
修改 wndr4300_mtdlayout 中 23552k(ubi) 为 120832k(ubi);
修改 25600k@0x6c0000(firmware) 为 122880k@0x6c0000(firmware)

2.1.4 运行编译

make
或使用 make -jN 加速编译,如 make -j4。

2.1.5 生成文件位置

最后文件生成在 bin 目录下:

openwrt/bin/ar71xx/openwrt-15.05-ar71xx-nand-wndr4300-squashfs-sysupgrade.tar
openwrt/bin/ar71xx/openwrt-15.05-ar71xx-nand-wndr4300-ubi-factory.img

openwrt-15.05-ar71xx-nand-wndr4300-ubi-factory.img.zip

  • openwrt/编译wndr4300_15.05固件.txt
  • 最后更改: 2019/04/16 18:31
  • (外部编辑)