LCU14 BURLINGAME
A. Bennée, C. Dall & P. Maydell, LCU14
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
● 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
● 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
● 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
● Anything unanswered?
● Questions?
QEMU ARMv8 - Questions and discussions
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
● 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
More about Linaro Connect: connect.linaro.org Linaro members: www.linaro.org/membersMore about Linaro: www.linaro.org/about/