lcu14 106- qemu for armv8 and the 64-bit android emulator

9
LCU14 BURLINGAME A. Bennée, C. Dall & P. Maydell, LCU14 LCU14-106: QEMU for ARMv8 and the 64-bit Android Emulator

Upload: linaro

Post on 18-Nov-2014

492 views

Category:

Software


10 download

DESCRIPTION

LCU14 106- QEMU for ARMv8 and the 64-bit android emulator --------------------------------------------------- Speaker: A. Bennée, C. Dall & P. Maydell Date: September 15, 2014 --------------------------------------------------- ★ Session Summary ★ QEMU ARMv8-A system emulation was completed shortly after LCA14 and has been fully upstreamed in QEMU. During this session we will briefly cover the level of support and functionality, and we will introduce developers to using QEMU for running 64-bit ARM kernels and distributions using QEMU. We also developed a small set of patches on top of upstream QEMU which allows us to run a 64-bit build of AOSP. We will explain the status and efforts coordinated between Google and Linaro, demo the working system, and show how developers can start playing with this. --------------------------------------------------- ★ Resources ★ Zerista: http://lcu14.zerista.com/event/member/137709 Google Event: https://plus.google.com/u/0/events/cp14ietrgoh99mrm0cg1hibroj0 Video: https://www.youtube.com/watch?v=e6IjNpCKmT4&list=UUIVqQKxCyQLJS6xvSmfndLA Etherpad: http://pad.linaro.org/p/lcu14-106 --------------------------------------------------- ★ Event Details ★ Linaro Connect USA - #LCU14 September 15-19th, 2014 Hyatt Regency San Francisco Airport --------------------------------------------------- http://www.linaro.org http://connect.linaro.org

TRANSCRIPT

Page 1: LCU14 106- QEMU for ARMv8 and the 64-bit android emulator

LCU14 BURLINGAME

A. Bennée, C. Dall & P. Maydell, LCU14

LCU14-106: QEMU for ARMv8 and the 64-bit Android Emulator

Page 2: LCU14 106- QEMU for ARMv8 and the 64-bit android emulator

● ARMv8-A Instruction Set Support - Upstream January 2014● Provides User Mode Emulation

● Includes ARMv8 AArch32 extensions, AArch32 crypto instructions, and ARMv8 NEON support

● System Mode Emulation - Upstream March 2014● ARMv8 Debug Architecture - in the works● TCG PSCI Support - patches from Ard Biesheuvel on list (originally

from Rob Herring)

QEMU ARMv8 State of the union

Page 3: LCU14 106- QEMU for ARMv8 and the 64-bit android emulator

● Really old fork of QEMU● Heavily modified by Google● Backporting ARMv8-A support is a

huge pain● Defines a “Goldfish” board:

● ADB Pipe (a.k.a. QEMU Pipe)● GPU Emulation● Skinning● Emulated battery● Emulated sensors● Android Console● ADB backend

The Android Emulator

Page 4: LCU14 106- QEMU for ARMv8 and the 64-bit android emulator

● A new Goldfish● Based on -M virt

● Uses Virtio where it can (block, net)

● ADB Pipe

● ADB backend

● Android Console based on QEMU Monitor

Ranchu - 64-bit Android on QEMU

Page 5: LCU14 106- QEMU for ARMv8 and the 64-bit android emulator

● Working with Google on basing new Android Emulator on upstream QEMU, using Ranchu as base

● Working on Ranchu-based 32-bit Android support as well

● Benefit from future additions to QEMU (like TrustZone)

● Linaro to complete the initial prototype (screen rotation, full Android console, …)

● Plans to send RFC patch set upstream

● Google is working on GPU support and skinning

Ranchu - Future Plans

Page 6: LCU14 106- QEMU for ARMv8 and the 64-bit android emulator

● Anything unanswered?

● Questions?

QEMU ARMv8 - Questions and discussions

Page 7: LCU14 106- QEMU for ARMv8 and the 64-bit android emulator

QEMU ARMv8: A practical guide● ARMv8 Models

● Virt I/O based (block, net, fs, char), Serial UART, RTC, Flash● Very Simple Example

● You can use modern mainline kernel, no patches required● ARCH=arm64 make defconfig + aarch64 initrd userspace

qemu-system-aarch64 -machine virt -cpu cortex-a57 -nographic -smp 1 -m 2048 -kernel ../linux.git/arch/arm64/boot/Image --append "console=ttyAMA0"

● Adding VIRT-IO features● CONFIG_VIRT_DRIVERS, CONFIG_VIRTIO_*, CONFIG_NET_9P_VIRTIO● Together with a rootfs on a block device (any standard FS)

qemu-system-aarch64 -machine virt -cpu cortex-a57 -machine type=virt -nographic -smp 1 -m 2048 -kernel ../linux.git/arch/arm64/boot/Image --append "console=ttyAMA0 root=/dev/vda debug=vc" -drive file=../rootfs/ubuntu-trusty.img,id=myblock,index=0 -device virtio-blk-device,drive=myblock -netdev user,id=unet -device virtio-net-device,netdev=unet

Page 8: LCU14 106- QEMU for ARMv8 and the 64-bit android emulator

● Not upstream, you will need● Custom kernel● Patched AOSP tree● Beta branch of the QEMU git tree

● See the fine blog post:● http://www.linaro.org/blog/core-dump/running-64bit-android-l-qemu/

64 Bit Android Emulator

Page 9: LCU14 106- QEMU for ARMv8 and the 64-bit android emulator

More about Linaro Connect: connect.linaro.org Linaro members: www.linaro.org/membersMore about Linaro: www.linaro.org/about/