• ubuntu 14.04 64位系统编译RT288x_SDK


    sudo apt-get install gcc  g++  binutils  patch bzip2  flex  bison  make  autoconf  gettext  texinfo  unzip  sharutils  subversion  libncurses5-dev ncurses-term  zlib1g-dev gawk asciidoc libz-dev git git-man liberror-perl libsigsegv2 mercurial python-iniparse tortoisehg tortoisehg-nautilus python-nautilus build-essential gcc-multilib 

    编译buildroot

    /opt/buildroot-2012.11.1/output/toolchain/gcc-4.6.3/gcc/doc/cppopts.texi:772: @itemx must follow @item
    make[2]: *** [doc/cpp.info] 错误 1

    原因是ubuntu 14.04版本带的texinfo版本过高导致,需要降级

    wget http://ftp.gnu.org/gnu/texinfo/texinfo-4.13a.tar.gz
    tar -zxvf texinfo-4.13a.tar.gz
    cd texinfo-4.13
    ./configure
    make
    sudo make install

    编译mksquash

    #cd RT288x_SDK/toolchain/mksquash_lzma-3.2
    #make
    #make install (copy lzma_alone to /opt/buildroot-gcc463/usr/bin/)

    错误1

    /usr/bin/ld: mksquashfs.o: undefined reference to symbol 'log10@@GLIBC_2.2.5'
    //lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
    collect2: error: ld returned 1 exit status
    make[1]: *** [mksquashfs] 错误 1

    上网搜了一下,应该缺少math库的链接导致的,在编译选项中增加-lm可以解决

    修改文件RT288x_SDK/toolchain/mksquash_lzma-3.2/squashfs3.2-r2/squashfs-tools/Makefile

    mksquashfs: LDLIBS += -lpthread -lunlzma_r -llzma_r -lstdc++ -lm

    http://blog.csdn.net/chaehom/article/details/7776047

    错误2

    uncomp.c:(.text+0x4b):对‘inflateReset’未定义的引用
    uncomp.c:(.text+0x8c):对‘inflate’未定义的引用
    uncomp.c:(.text+0x180):对‘zError’未定义的引用
    /home/yondy/MTK7688_SDK/MediaTek_ApSoC_SDK_4300_20140916/RT288x_SDK/toolchain/mksquash_lzma-3.2/lzma443/C/7zip/Compress/LZMA_C/libunlzma.a(uncomp.o):在函数‘sqlzma_init’中:
    uncomp.c:(.text+0x3a3):对‘inflateInit_’未定义的引用
    collect2: error: ld returned 1 exit status
    make[1]: *** [unsquashfs] 错误 1
    make[1]:正在离开目录 `/home/yondy/MTK7688_SDK/MediaTek_ApSoC_SDK_4300_20140916/RT288x_SDK/toolchain/mksquash_lzma-3.2/squashfs3.2-r2/squashfs-tools'
    make: *** [all] 错误 2

    还是修改修改文件RT288x_SDK/toolchain/mksquash_lzma-3.2/squashfs3.2-r2/squashfs-tools/Makefile

    在最后面增加-lz选项

    unsquashfs: LDLIBS += -lunlzma -lz

    编译完成以后,复制到opt下的相应目录

    sudo cp ~/MTK7688_SDK/MediaTek_ApSoC_SDK_4300_20140916/RT288x_SDK/toolchain/mksquash_lzma-3.2/lzma443/C/7zip/Compress/LZMA_Alone/lzma_alone /opt/buildroot-gcc463/usr/bin/

    source make报错

    error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory

    原因是缺少libz.so.1这个库,可以通过ubuntu的apt-file search查找对应的软件包

    sudo apt-get install apt-file

    之后更新

    sudo apt-file update

    然后就可以查找了

    $ apt-file search libz.so.1
    lib32z1: /usr/lib32/libz.so.1
    lib32z1: /usr/lib32/libz.so.1.2.8
    libx32z1: /usr/libx32/libz.so.1
    libx32z1: /usr/libx32/libz.so.1.2.8
    zlib1g: /lib/x86_64-linux-gnu/libz.so.1
    zlib1g: /lib/x86_64-linux-gnu/libz.so.1.2.8

    选择安装lib32z1

    sudo apt-get install lib32z1

    错误

    /home/yondy/MTK7688_SDK/MediaTek_ApSoC_SDK_4300_20140916/RT288x_SDK/source/vendors/Ralink/MT7628/mkimage: invalid entry point -n
    make[2]: *** [image] 错误 1
    make[2]:正在离开目录 `/home/yondy/MTK7688_SDK/MediaTek_ApSoC_SDK_4300_20140916/RT288x_SDK/source/vendors/Ralink/MT7628'
    make[1]: *** [image] 错误 2
    make[1]:正在离开目录 `/home/yondy/MTK7688_SDK/MediaTek_ApSoC_SDK_4300_20140916/RT288x_SDK/source/vendors'
    make: *** [image] 错误 2

    修改RT288x_SDK/source/vendors/Ralink/***/Makefile

    ENTRY=`readelf -h $(ROOTDIR)/$(LINUXDIR)/vmlinux | grep "Entry" | awk '{print $$4}'` ; 

    ENTRY=`readelf -h $(ROOTDIR)/$(LINUXDIR)/vmlinux | grep "入口点地址" | awk '{print $$2}'` ; 

    主要原因是原始的编译脚本是英文环境下编写的,在中文的环境下,出现匹配异常

    Entry Point: 0x8000C120

    入口点地址:0x8000C120

    http://www.oschina.net/question/1401799_178896

  • 相关阅读:
    部署K2 Blackpearl流程时出错(与基础事务管理器的通信失败或Communication with the underlying transaction manager has failed.)
    用SQL命令将查询结果集导出为文本文件
    SQL函数计算两个日期间的工作日天数
    CommonJS模块加载方法
    async 属性
    如何用VS.NET2005调式.asp和.aspx混合的web系统
    对web.config文件的节点进行加解密
    [转]看似简单的问题 静态方法和实例化方法的区别
    单引号(')和双引号(")
    从一个时间段中查找出星期为“Sunday”的日期
  • 原文地址:https://www.cnblogs.com/yondy/p/5402839.html
Copyright © 2020-2023  润新知