cross compiling in Linux for android(arm_linux) platform
来源:互联网 发布:萧山司法拍卖淘宝网 编辑:程序博客网 时间:2024/05/04 11:40
There are two ways in cross compiling for android platform.
First, make use of arm-none-linux-gnueabi toolchain, you can download it from the following url:http://www.codesourcery.com/gnu_toolchains/arm/portal/package3399/public/arm-none-linux-gnueabi/arm-2008q3-41-arm-none-linux-gnueabi.bin
Second, use arm-gnueabi toolchain which is in NDK of Android.
Now I will tell how to cross compile for android platform by an example of compiling CyberGarage.
1. Firstly, introduce the method how to make use of arm-gnueabi toolchain. (The following referred three scripts can be extracted from attachment ” shell_cross_compiling_by_ndk.zip”)
a. Download SDK and NDK from Android official web
b. Build Android develop environment
c. Download Expat XML Parser on which is relied by CyberGarage:http://sourceforge.net/projects/expat/files/expat/2.0.1/expat-2.0.1.tar.gz/download
d. Download project CyberGarage for C fromhttp://www.cybergarage.org/twiki/bin/view/Main/CyberLinkForC
e. Edit /etc/profile in order to add ${path}: export PATH=${PATH}:/root/Desktop/android-ndk-r4b/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin
f. 1) Put “config_shell_expat” into folder “expat-2.0.1”;
2) #./config_shell_expat; (it will generate Makefile and libtool);
3) Set the line
deplibs_check_method=”pass_all”
instead of
deplibs_check_method=”unknown”
which is contained in the “libtool” script (Why need to change libtool? Because crtbegin_dynamic.o and crtend_android.o in NDK is not generated by libtool. Therefore I can say toolchain in NDK is not very perfect for porting. It needs further update in the future);
4) #make
5) #make install
g. 1) Put “config_shell_clinkc” into folder “clinkc-2.3”;
2) #./config_shell_clinkc;
3) Set the line
deplibs_check_method=”pass_all”
instead of
deplibs_check_method=”unknown”
which is contained in the “libtool” script;
4) #make
5) #make install
h. 1) Put file “make_shell” into application source folder;
2) #./make_shell;
3) you can get application under source folder
2. Then how to make use of arm-none-linux-gnueabi toolchain. (The following referred three scripts can be extracted from attachment ” shell_cross_compiling_by_gnu.zip”)
a. Download arm-none-linux-gnueabi from codesourcery;
b. Edit /etc/profile in order to add ${path}: export PATH=${PATH}:/root/CodeSourcery/Sourcery_G++_Lite/bin
c. 1) Put “config_shell_expat_gnu” into folder “expat-2.0.1”;
2) #./config_shell_expat_gnu; (it will generate Makefile and libtool);
3) #make
4) #make install
d. 1) Put “config_shell_clinkc_gnu” into folder “clinkc-2.3”;
2) #./config_shell_clinkc_gnu;
3) #make
4) #make install
e. 1) Put file “make_shell_gnu” into application source folder;
2) #./make_shell_gnu;
3) you can get application under source folder
The above two methods have been verified. If any questions, pls email me.
Thank you
Joshua
2010-10-20
- cross compiling in Linux for android(arm_linux) platform
- cross platform compiling
- Howto - Cross Compiling in Linux using MingW32
- Cross-Compiling Qt for Embedded Linux Applications
- Cross Compiling Python for Embedded Linux
- Cross Compiling Python for Embedded Linux
- Cross Compiling Python for Embedded Linux
- Cross-compiling for ARM
- Cross-Compiling Under Linux
- Cross compiling wxDFB-2.8.11 for ARM-Linux
- Cross Platform IDE for Android Native Development
- cross-compiling for iPhone dev
- cross-compiling for iPhone dev
- Cross compiling Libx264 for ARM
- MonoGame Cross Platform Implementation of XNA for iOS, Android, Mac , Linux, Windows, Windows8, OUYA
- Cross Compiling For ARM With Autoconf
- Cross-compiling GNU libmicrohttpd for OpenWRT
- Cross-compiling TensorFlow for the Raspberry Pi
- 基本物质结构
- Inno Setup 强制删除安装目录
- iew's problem
- C/C++调用MySQL的API测试
- PHP服务器时间差8小时解决方案
- cross compiling in Linux for android(arm_linux) platform
- 纯HTML页面之间传递参数
- 使用python访问文件,并存入数据库中
- 通过RMAN备份恢复数据库到其他服务器
- 汇编输入输出程序设计
- [转载][java]Java Map 集合类简介
- 经典汇编语言教程:第8章 输入输出和中断
- C语言指针 -- 面试题
- SSH 生成execl