您尚未登录。

楼主 #1 2017-10-31 10:40:49

sindy
会员
注册时间: 2017-09-09
已发帖子: 146
积分: 146

Ubuntu14.04 平台 MT7688 widora编译过程

1. git clone https://github.com/widora/openwrt_widora.git

$ cd openwrt_widora
$ ./scripts/feeds update -a
$ ./scripts/feeds install -a

2. 更新Ubuntu软件包

sudo apt-get install libncurses-dev
sudo apt-get install libz-dev
sudo apt-get install libssl-dev
sudo apt-get install subversion

3. 配置
$ make menuconfig select the target:
Target System(Ralink RT288x/RT3xxx) --->
Subtarget(MT7688 based board) --->
Target Profile(Widora) --->

4.编译
$ make -j4

5. image烧录文件
the binary image name like this in bin/ramips/: openwrt-ramips-mt7688-Widora-squashfs-sysupgrade.bin

最近编辑记录 sindy (2017-10-31 10:52:56)

离线

#2 2017-10-31 11:31:23

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,342
积分: 9202

Re: Ubuntu14.04 平台 MT7688 widora编译过程

x86_64-linux-gnu-g++   -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -DGENERATOR_FILE  -o build/genchecksum \
            build/genchecksum.o ../build-x86_64-linux-gnu/libiberty/libiberty.a
echo "x86_64-linux-gnu-gcc   -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H " > checksum-options.tmp \
        && /opt/openwrt_widora/build_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04/gcc/../move-if-change checksum-options.tmp checksum-options
x86_64-linux-gnu-g++ -c   -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I/opt/openwrt_widora/build_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04/gcc -I/opt/openwrt_widora/build_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04/gcc/build -I/opt/openwrt_widora/build_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04/gcc/../include -I/opt/openwrt_widora/build_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04/gcc/../libcpp/include -I/opt/openwrt_widora/staging_dir/host/include -I/opt/openwrt_widora/staging_dir/host/include -I/opt/openwrt_widora/staging_dir/host/include  -I/opt/openwrt_widora/build_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04/gcc/../libdecnumber -I/opt/openwrt_widora/build_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04/gcc/../libdecnumber/dpd -I../libdecnumber -I/opt/openwrt_widora/build_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04/gcc/../libbacktrace    \
                -o build/genattrtab.o /opt/openwrt_widora/build_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04/gcc/genattrtab.c
x86_64-linux-gnu-g++   -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -DGENERATOR_FILE  -o build/genattrtab \
            build/genattrtab.o build/rtl.o build/read-rtl.o build/ggc-none.o build/vec.o build/min-insn-modes.o build/gensupport.o build/print-rtl.o build/read-md.o build/errors.o ../build-x86_64-linux-gnu/libiberty/libiberty.a
build/genattrtab /opt/openwrt_widora/build_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04/gcc/config/mips/mips.md insn-conditions.md \
                -Atmp-attrtab.c -Dtmp-dfatab.c -Ltmp-latencytab.c
make[5]: *** [s-attrtab] Killed
make[5]: Leaving directory `/opt/openwrt_widora/build_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04-minimal/gcc'
make[4]: *** [all-gcc] Error 2
make[4]: Leaving directory `/opt/openwrt_widora/build_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04-minimal'
make[3]: *** [/opt/openwrt_widora/build_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04-minimal/.built] Error 2
make[3]: Leaving directory `/opt/openwrt_widora/toolchain/gcc/minimal'
make[2]: *** [toolchain/gcc/minimal/compile] Error 2
make[2]: Leaving directory `/opt/openwrt_widora'
make[1]: *** [/opt/openwrt_widora/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/stamp/.toolchain_install] Error 2
make[1]: Leaving directory `/opt/openwrt_widora'
make: *** [world] Error 2

出师不利, 编译出错.





离线

#3 2017-10-31 11:34:52

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,342
积分: 9202

Re: Ubuntu14.04 平台 MT7688 widora编译过程

升级gcc6.3.0的时候编译总是出现这个错误,然后就升级到gcc5.4.0试试。结果发现也会出现make[3]: *** [s-attrtab] Killed。一时懵逼了。后来查到了说这是内存不足引起的,通过设置内存交换文件就可以解决问题。

艹, 好像是内存不足, 换机...





离线

#4 2017-10-31 19:19:18

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,342
积分: 9202

Re: Ubuntu14.04 平台 MT7688 widora编译过程

mipsel-openwrt-linux-uclibc-gcc shairport.o daemon.o rtsp.o mdns.o mdns_external.o mdns_tinysvcmdns.o common.o rtp.o metadata.o player.o alac.o audio.o audio_dummy.o audio_pipe.o tinysvcmdns.o -L/disk3/openwrt_widora/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/lib -L/disk3/openwrt_widora/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/lib -L/disk3/openwrt_widora/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/usr/lib -L/disk3/openwrt_widora/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/lib -lm -lcrypto -lpthread -lavahi-common -lavahi-client -lasound -o shairport
/disk3/openwrt_widora/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin/../lib/gcc/mipsel-openwrt-linux-uclibc/4.8.3/../../../../mipsel-openwrt-linux-uclibc/bin/ld: cannot find -lavahi-common
/disk3/openwrt_widora/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin/../lib/gcc/mipsel-openwrt-linux-uclibc/4.8.3/../../../../mipsel-openwrt-linux-uclibc/bin/ld: cannot find -lavahi-client
/disk3/openwrt_widora/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin/../lib/gcc/mipsel-openwrt-linux-uclibc/4.8.3/../../../../mipsel-openwrt-linux-uclibc/bin/ld: cannot find -lasound
/disk3/openwrt_widora/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/lib/libcrypto.so: warning: gethostbyname is obsolescent, use getnameinfo() instead.
collect2: error: ld returned 1 exit status
Makefile:66: recipe for target 'shairport' failed
make[4]: *** [shairport] Error 1
make[4]: Leaving directory '/disk3/openwrt_widora/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/shairport_mmap'
Makefile:58: recipe for target '/disk3/openwrt_widora/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/shairport_mmap/.built' failed
make[3]: *** [/disk3/openwrt_widora/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/shairport_mmap/.built] Error 2
make[3]: Leaving directory '/disk3/openwrt_widora/package/shairport_mmap'
package/Makefile:191: recipe for target 'package/shairport_mmap/compile' failed
make[2]: *** [package/shairport_mmap/compile] Error 2
make[2]: Leaving directory '/disk3/openwrt_widora'
package/Makefile:188: recipe for target '/disk3/openwrt_widora/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/stamp/.package_compile' failed
make[1]: *** [/disk3/openwrt_widora/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/stamp/.package_compile] Error 2
make[1]: Leaving directory '/disk3/openwrt_widora'
/disk3/openwrt_widora/include/toplevel.mk:181: recipe for target 'world' failed
make: *** [world] Error 2





离线

#5 2017-10-31 20:25:08

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,342
积分: 9202

Re: Ubuntu14.04 平台 MT7688 widora编译过程

貌似 shairport编译失败,
进入make menuconfig 把 Sound -> Shairport_mmap 取消编译,然后成功了
生成了  bin/ramips/openwrt-ramips-mt7688-Widora-squashfs-sysupgrade.bin





离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn