Ubuntu 10.04 installation Arm cross compiler

Source: Internet
Author: User
Tags posix

There is a box of cotext-a9 (ARMV7-A) in the house, and now it is not.

Always thinking about the use of waste. So how to compile the program for this box.

Target machine:

uname -alinux routon2.6.  #3: £ armv7l gnu/linux

A virtual machine with an Ubuntu 10.04 X86 installed

uname -2.6. +--generic #4: i686 GNU  /Linux[email protected]:~# lsb_release-aNo LSB modules is available. Distributor id:ubuntudescription:    10.04. 4 ltsrelease:         10.04 codename:       Lucid

Installation process:

Install python-software-propertiesadd-apt-repository ppa:linaro-maintainers/toolchainapt  Installgcc-4.4-arm-linux-gnueabi

Test code:

#include <stdio.h>Main () {    printf ("Hello world\n");}

Compile process:

[Email protected]:~# arm-linux-gnueabi-GCC-4.4-v hello.cusing built-inchspecs. Target:arm-linux-gnueabiconfigured with:../src/configure-v--with-pkgversion='Ubuntu/linaro 4.4.6-3ubuntu1~ppa3'--with-bugurl=file:///Usr/share/doc/gcc-4.4/readme. Bugs--enable-languages=c,c++,fortran,objc,obj-c++--prefix=/usr--program-suffix=-4.4--enable-shared-- Enable-multiarch--enable-linker-build-id--with-system-zlib--libexecdir=/usr/lib--without-included-gettext-- Enable-threads=posix--with-gxx-include-dir=/usr/arm-linux-gnueabi/include/c++/4.4.6--libdir=/usr/lib-- Enable-nls--enable-clocale=gnu--enable-libstdcxx-debug--ENABLE-OBJC-GC--disable-sjlj-exceptions--with-arch= Armv7-a--with-float=softfp--with-fpu=vfpv3-d16--with-mode=thumb--disable-werror--enable-checking=release-- program-prefix=arm-linux-gnueabi---includedir=/usr/arm-linux-gnueabi/include--build=i486-linux-gnu--host= I486-linux-gnu--target=arm-linux-gnueabi--with-headers=/usr/arm-linux-gnueabi/include--with-libs=/usr/ Arm-linux-gnueabi/libThread Model:posixGCCVersion4.4.6(Ubuntu/linaro4.4.6-3ubuntu1~ppa3) Collect_gcc_options='- v' '-march=armv7-a' '-MFLOAT-ABI=SOFTFP' '-mfpu=vfpv3-d16' '-mthumb'/usr/lib/GCC/arm-linux-gnueabi/4.4.6/cc1-quiet-v hello.c-quiet-dumpbase hello.c-march=armv7-a-mfloat-abi=softfp-mfpu=vfpv3-d16-mthumb-auxbase Hello- Version-o/tmp/cckjdmkg.signoring Duplicate Directory"/usr/lib/gcc/arm-linux-gnueabi/4.4.6/. /.. /.. /.. /arm-linux-gnueabi/include"#include"..."search starts here: #include<...>Search starts here:/usr/lib/GCC/arm-linux-gnueabi/4.4.6/include/usr/lib/GCC/arm-linux-gnueabi/4.4.6/include-fixed/usr/arm-linux-gnueabi/includeend of search list. GNU C (Ubuntu/linaro4.4.6-3UBUNTU1~PPA3) version4.4.6(arm-linux-Gnueabi) compiled by GNU C version4.4.3, GMP version4.3.2, MPFR version2.4.2-P1. GGC Heuristics:--param ggc-min-expand=98--param ggc-min-heapsize=128244Compiler executable Checksum:d8b1c137400b627d969f13ef7d115d11collect_gcc_options='- v' '-march=armv7-a' '-MFLOAT-ABI=SOFTFP' '-mfpu=vfpv3-d16' '-mthumb'/usr/lib/GCC/arm-linux-gnueabi/4.4.6/.. /.. /.. /.. /arm-linux-gnueabi/bin/as-march=armv7-a-mfloat-abi=softfp-mfpu=vfpv3-d16-mimplicit-it=thumb-meabi=5-o/tmp/ccej19an.o/tmp/Cckjdmkg.scompiler_path=/usr/lib/GCC/arm-linux-gnueabi/4.4.6/:/usr/lib/GCC/arm-linux-gnueabi/4.4.6/:/usr/lib/GCC/arm-linux-gnueabi/:/usr/lib/GCC/arm-linux-gnueabi/4.4.6/:/usr/lib/GCC/arm-linux-gnueabi/:/usr/lib/GCC/arm-linux-gnueabi/4.4.6/.. /.. /.. /.. /arm-linux-gnueabi/bin/Library_path=/usr/lib/GCC/arm-linux-gnueabi/4.4.6/:/usr/lib/GCC/arm-linux-gnueabi/4.4.6/.. /.. /.. /.. /arm-linux-gnueabi/lib/collect_gcc_options='- v' '-march=armv7-a' '-MFLOAT-ABI=SOFTFP' '-mfpu=vfpv3-d16' '-mthumb'/usr/lib/GCC/arm-linux-gnueabi/4.4.6/collect2--build-ID--eh-frame-hdr-dynamic-linker/lib/LD-linux.so.3-X--hash-style=both-m armelf_linux_eabi/usr/lib/GCC/arm-linux-gnueabi/4.4.6/.. /.. /.. /.. /arm-linux-gnueabi/lib/crt1.o/usr/lib/GCC/arm-linux-gnueabi/4.4.6/.. /.. /.. /.. /arm-linux-gnueabi/lib/crti.o/usr/lib/GCC/arm-linux-gnueabi/4.4.6/crtbegin.o-l/usr/lib/GCC/arm-linux-gnueabi/4.4.6-l/usr/lib/GCC/arm-linux-gnueabi/4.4.6/.. /.. /.. /.. /ARM-LINUX-GNUEABI/LIB/TMP/CCEJ19AN.O-LGCC--as-needed-lgcc_s--NO-AS-NEEDED-LC-LGCC--as-needed-lgcc_s-- no-as-needed/usr/lib/GCC/arm-linux-gnueabi/4.4.6/crtend.o/usr/lib/GCC/arm-linux-gnueabi/4.4.6/.. /.. /.. /.. /arm-linux-gnueabi/lib/crtn.o

After uploading the target machine, execute:

[email protected]:/mnt/tool/reverse-h1#./A.outhello World

Ubuntu 10.04 installation Arm cross compiler

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.