zoukankan      html  css  js  c++  java
  • openwrt 编译newifi 应用程序

    首先找交叉编译工具( toolchain )

    Development Snapshots

    http://downloads.openwrt.org/snapshots/trunk/

    我需要的版本是 m7620 

    http://downloads.openwrt.org/snapshots/trunk/ramips/mt7620/ 

    下载文件  OpenWrt-Toolchain-ramips-mt7620_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2 

    [root@VM_129_51_centos openwrt]# wget http://downloads.openwrt.org/snapshots/trunk/ramips/mt7620/OpenWrt-Toolchain-ramips-mt7620_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2
    [root@VM_129_51_centos openwrt]# tar -jxf OpenWrt-Toolchain-ramips-mt7620_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2
    [root@VM_129_51_centos openwrt]# mv OpenWrt-Toolchain-ramips-mt7620_gcc-5.3.0_musl-1.1.15.Linux-x86_64 toolchain
    [root@VM_129_51_centos openwrt]# wget http://downloads.openwrt.org/chaos_calmer/15.05.1/ramips/mt7620/OpenWrt-SDK-15.05.1-ramips-mt7620_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64.tar.bz2
    [root@VM_129_51_centos openwrt]# tar -jxf OpenWrt-SDK-15.05.1-ramips-mt7620_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64.tar.bz2
    [root@VM_129_51_centos openwrt]# mv OpenWrt-SDK-15.05.1-ramips-mt7620_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64 SDK
    [root@VM_129_51_centos openwrt]# find / -name staging_dir
    /root/openwrt/SDK/staging_dir
    [root@VM_129_51_centos bin]# export STAGING_DIR='/root/openwrt/SDK/staging_dir'
    [root@VM_129_51_centos bin]# export CC=/root/openwrt/toolchain/toolchain-mipsel_24kec+dsp_gcc-5.3.0_musl-1.1.15/bin/mipsel-openwrt-linux-musl-g++
    [root@VM_129_51_centos bin]# export CPLUS_INCLUDE_PATH=/root/openwrt/SDK/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620/linux-3.18.23/include/uapi/linux/can/
    [root@VM_129_51_centos bin]# export LD_FLAGS=-L/root/openwrt/toolchain/toolchain-mipsel_24kec+dsp_gcc-5.3.0_musl-1.1.15/lib/  -static-libstdc++ -static-libgcc -lgcc_s
    -static-libstdc++ -static-libgcc

    两个选项必须同时使用。相关的介绍请参照:http://blog.csdn.net/kissnsms/article/details/17142149

    交叉工具链没有ldd,因此无法查找库依赖关系,可以用以下替代解决方案

    readelf -a filename|grep "Shared library"

  • 相关阅读:
    js 定时器 执行一次和重复执行
    Django 会议室预定
    关于跨域介绍和djiago解决跨域问题
    原生Form 和 Form组件 Modelform
    关于Djiango中 前端多对多字段点(,)的显示问题
    Djiango权限组件
    关于 or 判断都是Ture的问题
    基于多对多字段的增删改查
    二.面向对象进阶
    python大数据初探--pandas,numpy代码示例
  • 原文地址:https://www.cnblogs.com/diylab/p/6021432.html
Copyright © 2011-2022 走看看