记录日常工作关于系统运维,虚拟化云计算,数据库,网络安全等各方面问题。
 
0

Arm64Qemu

发表者:admin分类:云计算容器2015-12-08 23:28:40 阅读[3157]

Qemu 2.0 includes arm64 support, and Debian 8 (and above) fully supports it.

Background

In October 2013 the arm64 (aarch64) qemu port became publicly available. It is a user-space emulation, so it may not be applicable to all development tasks. It is fine for building software, and it is _much_ faster and often easier to use than ARM's proprietary (free beer) Foundation Model.

The development was done by folks at SUSE Linux, so kudos to them. This code was incorporated into Qemu 2.0 in March 2014 by Linaro, and there is no longer a need to build arm64 from the development branch.

You can verify support by checking for the availability of the aarch64 interpreter:

# update-binfmts --display | grep -i aarch
qemu-aarch64 (enabled):
interpreter = /usr/bin/qemu-aarch64-static

Installation

Since Debian supports arm64, installation is as simple as as the following.

Step 1

The first task is to elevate to root:

$ su -
password:
#

Step 2

The second step is to configure locales so your Qemu Chroots have access to them. Otherwise, you will have to configure each Chroot's locale individually.

# From the host
# dpkg-reconfigure locales
(complete the process)

Step 3

The third step is to install the requisite packages. They are qemu, qemu-user-static, binfmt-support and debootstrap.

# From the host
apt-get install qemu qemu-user-static binfmt-support debootstrap

Step 4

The fourth step uses debootstrap to create the Chroot environment. In the command below, the Chroot will be named debian-arm64. You can change it to suit your taste.

# From the host
# qemu-debootstrap --arch=arm64 --keyring /usr/share/keyrings/debian-archive-keyring.gpg \
--variant=buildd --exclude=debfoster jessie debian-arm64 http://ftp.debian.org/debian
...
I: Retrieving Release
I: Retrieving Release.gpg
I: Checking Release signature
I: Valid Release signature (key id 75DDC3C4A499F1A18CB5F3C8CBF8D6FD518E17E1)
I: Retrieving Packages
I: Validating Packages
I: Resolving dependencies of required packages...
...
I: Checking component main on http://ftp.debian.org/debian...
I: Retrieving acl 2.2.52-2
I: Validating acl 2.2.52-2
I: Retrieving apt 1.0.9.8.1
I: Validating apt 1.0.9.8.1
...

Step 5

The fifth step enters the arm64 Chroot:

# From the host
# chroot debian-arm64/

# Now in the guest
# uname -a
Linux core2 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u5 (2015-10-09) aarch64 GNU/Linux

Step 6

The final steps installs the Debian Ports keyring and installs some software to use in the environment:

# In the guest
# apt-get install debian-ports-archive-keyring
...
apt-get install locales build-essential gcc g++ gdb make subversion git curl zip unzip


转载请标明出处【Arm64Qemu】。

《www.micoder.cc》 虚拟化云计算,系统运维,安全技术服务.

网站已经关闭评论