The easiest way to play with aarch64

Source: Internet
Author: User
Tags gtk

Http://d.hatena.ne.jp/embedded/20140819/p1:

Although the aarch64 (arm64) Board is difficult to implement, you can use qemu to execute the aarch64 user space program. With docker, you can easily try the aarch64 environment. Compilation can also be executed. Preparation

Use Ubuntu 14.04 (x86_64.

First install docker. For details, refer to here

Then install qemu.

 $ sudo apt-get install qemu-user-static
Start
$ docker run -it ericvh/arm64-ubuntu-dev /bin/bash

As long as the root file system of aarch64 is loaded and executed from dockerhub, the bash prompt can be output.

Confirm the architecture.

root@5031da283529:/# uname -maarch64

GCC can also be used.

root@5031da283529:/# gcc -vUsing built-in specs.COLLECT_GCC=/usr/bin/gccCOLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/4.8/lto-wrapperTarget: aarch64-linux-gnuConfigured with: ../src/configure -v --with-pkgversion=‘Ubuntu/Linaro 4.8.2-19ubuntu1‘ --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --disable-libitm --disable-libsanitizer --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-arm64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-arm64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-arm64 --with-arch-directory=arm64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-multiarch --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnuThread model: posixgcc version 4.8.2 (Ubuntu/Linaro 4.8.2-19ubuntu1) 
root@5031da283529:/root# vi hello.croot@5031da283529:/root# gcc hello.croot@5031da283529:/root# ./a.outHello, worldroot@5031da283529:/root# file ./a.out ./a.out: ELF 64-bit LSB  executable, ARM aarch64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 3.7.0, BuildID[sha1]=a6ee525387725894f818f789acd9b0203adff657, not stripped

Although GDB exists, it is a pity that the following error will be output, and the breakpoint cannot be used normally.

qemu: Unsupported syscall: 117

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.