編譯 openwrt 及初始配置


主機為 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 當錯誤,導致編譯不過。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM