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..Linux-x86_64.tar.bz2
[root@VM_129_51_centos openwrt]# mv OpenWrt-Toolchain-ramips-mt7620_gcc-5.3.0_musl-1.1..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.-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./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"
openwrt 编译newifi 应用程序的更多相关文章
- 使用VS+VisualGDB编译调试Linux程序
Linux程序开发变得越来越多,越来越多的程序.产品需要跨平台,甚至有些开源项目只支持Linux平台,所以掌握Linux开发变得越来越重要. 但是对于习惯了Windows下的开发,使用了VS这个宇宙第 ...
- openwrt编译环境搭建
1,首先安装ubuntu系统,这里安装的是虚拟机 2,安装openwrt编译所需环境 apt-get install build-essential libncures5-dev gawk libs ...
- 如何编译ReactNative示例程序Examples
通过示例程序可以看到一些基本组件的使用,对于学习ReactNative是很有帮助的. 编译示例程序需要将整个项目导入到androidStudio中,androidStudio导入项目时选择react- ...
- Ubuntu编译源码程序依赖查找方法
ubuntu平时编译源码程序的时候会提示缺少相关的库或是头文件,可以按照以下两种方法进行查找,然后再安装相应的软件包. 1.使用apt-file查找头文件 安装apt-file sudo apt-ge ...
- VS2010 win7 QT4.8.0,实现VS2010编译调试Qt程序,QtCreator静态发布程序
下载源代码,注意一定是源码压缩包如qt-everywhere-opensource-src-4.8.0.zip, 不是Qt发布的已编译的不同版本的标准库如qt-win-opensource-4.8.0 ...
- 运行编译后的程序报错 error while loading shared libraries: lib*.so: cannot open shared object file: No such file or directory
运行编译后的程序报错 error while loading shared libraries: lib*.so: cannot open shared object file: No such f ...
- 减小Delphi XE5编译出来的程序体积
默认Delphi XE, XE2, XE3,XE4,XE5, XE6 ... 编译出来的程序体积很大. 一般用两个方法可以很大程度上减少程序体积. 一.在工程中用编译指令禁用RTTI 禁用的方法很简单 ...
- linux终端下 编译c语言程序
linux终端下,编译C语言程序步骤为: 采用vi进行源代码编写,编写完成后,:wq存盘退出,如: vi test.c 在命令行下,运行gcc编译程序,生成执行码,如: gcc -o test te ...
- VS编译的QT程序发布时产生的AppCrash问题
至少我碰到了三个情况,都是AppCrash错误(以下都指VS2008的Release的设置) 第1个错误,报错模块是程序自己 我使用VS2008 Team with SP1和QT4.86编译程序,一直 ...
随机推荐
- autorelease的对象何时被释放
autorelease的对象何时被释放 参考答案: 如果了解一点点Run Loop的知道,应该了解到:Run Loop在每个事件循环结束后会去自动释放池将所有自动释放对象的引用计数减一,若引用计数变成 ...
- [C#] 编程控制笔记本蓝牙与外部蓝牙设备通信
一.蓝牙模块XLBT232‐D01介绍(外部设备蓝牙) 1.1.蓝牙模块简介 XLBT232-D0101蓝牙模块采用CSR BlueCore 芯片,配置6-8Mbit 的软件存储空间, 支持AT 指令 ...
- Atitit. 异常的使用总结最佳实践java .net php Vo8f
Atitit.java 异常的使用总结最佳实践 Vo8f 1. 为什么使用异常 1 2. 用throw抛出一个异常到catch子句中与通过函数调用传递一个参数两者基本相同. 2 3. S E H的主要 ...
- atitit. 解决org.hibernate.SessionException Session is closed
atitit. 解决org.hibernate.SessionException Session is closed #--现象:: org.hibernate.SessionException ...
- paip.提升用户体验--radio图片选择器 easyui 实现..
#paip.提升用户体验--radio图片选择器 easyui 实现.. =================================== ##原因... ------------------- ...
- 优化TableView性能
优化tableView性能(针对滑动时出现卡的现象) (2013-08-02 11:18:15) 转载▼ 标签: ios tableview it 分类: 技术文档 在iOS应用中,UITableVi ...
- CSS3参考手册
很好用的CSS3 API http://www.css88.com/book/css/
- Delphi -- Compiler helper for initializing/finalizing variable
it CompilerhelperForInitializingFinalizingVariable; interface { Compiler helper for initializing/fin ...
- PHOTOSHOP CC 2015插件安装方法
收到很多评论说不能安装.抱歉,这里解释一下,不是所有插件都能用这个方法,安装不了的只能等插件更新了,这里只是给大家一个尝试的方法,有一些插件可以用这个方法安装. 试试嘛,如果懒得试,可以忽略这篇文章. ...
- Linux驱动开发学习笔记(1):LINUX驱动版本的hello world
1.关于目录 /lib/modules/2.6.9-42.ELsmp/build/ 这个是内核源码所在的目录 一般使用这样的命令进入这个目录:cd /lib/modules/$(una ...