主机为 ubuntu 14 x64 硬件: 优酷土豆宝 cpuMT7620A,内存128M,flash 32M
有2个源,用哪个也可以
git clone https://github.com/openwrt/openwrt.git
git clone https://git.openwrt.org/openwrt/openwrt.git
安装的插件
gcc, binutils, bzip2, flex, python, perl, make, find, grep, diff,
unzip, gawk, getopt, subversion, libz-dev
gcc 要求 4.8 以上
./scripts/feeds update -a
./scripts/feeds install -a
配置
make menuconfig
选择 mtk7620
Target System (MediaTek Ralink MIPS)
Subtarget (MT7620 based boards)
Target Profile (YOUKU YK1)
make -j 4
编译看不到编译信息
make V=99 -j 4
加上 V=99 参数看到具体信息,是下载不了,还是什么的错误
一共下载了2天时间。有的包还是手动下的。
编译以后全部文件有10个G 。
在路由器后台直接升级 squashfs-sysupgrade.bin 就可以了
需要装上界面
opkg update
opkg install luci
/etc/init.d/uhttpd enable
/etc/init.d/uhttpd start
更新 openwrt 19 2019-12-24
build_dir/hostpkg/libubox-2019-11-24-07413cce/json_script.c:124:3: error: missing initializer for field 'name' of 'struct blobmsg_policy' [-Werror=missing-field-initializers]
修改
/build_dir/hostpkg/libubox-2019-11-24-07413cce/CMakeLists.txt
-Werror 去掉即可,原因:存在 warning 当错误,导致编译不过。