Embedded Software Lab. @ SKKU 15 1 Tizen Emulation on PC.

20
Embedded Software Lab. @ SKKU 15 1 Tizen Emulation on PC

Transcript of Embedded Software Lab. @ SKKU 15 1 Tizen Emulation on PC.

Page 1: Embedded Software Lab. @ SKKU 15 1 Tizen Emulation on PC.

Embedded Software Lab. @ SKKU

15

1

Tizen Emulation on PC

Page 2: Embedded Software Lab. @ SKKU 15 1 Tizen Emulation on PC.

Embedded Software Lab. @ SKKU

15

2

• Tizen SDK Emulator• Tizen 3.0 with VMware– Tizen 3.0 IVI / Common– Emulate Tizen 3.0 IVI with VMware

Contents

Page 3: Embedded Software Lab. @ SKKU 15 1 Tizen Emulation on PC.

Embedded Software Lab. @ SKKU

15

3

Tizen emulator

Page 4: Embedded Software Lab. @ SKKU 15 1 Tizen Emulation on PC.

Embedded Software Lab. @ SKKU

15

4

• Web simulator– For web applications– Support oneshot web runtime

• Emulator– For web/native applications and platforms– Support full system runtime

• Physical phone– For web/native applications and platforms including BSP (Board

Support Package)– Support full system runtime

Tizen Development Runtime

Page 5: Embedded Software Lab. @ SKKU 15 1 Tizen Emulation on PC.

Embedded Software Lab. @ SKKU

15

5Tizen Emulator

Page 6: Embedded Software Lab. @ SKKU 15 1 Tizen Emulation on PC.

Embedded Software Lab. @ SKKU

15

6

• Event Injector– Event injection for ease of test

• Sensor input (accelerometer, motion), location, telephony, NFC, Device

• Emulator Manager– Provides interface to set and run various emulator

image with various configuration

• Emulator– Tizen x86 image with QEMU– Para-virtualization with virtio support – Uses HW acceleration (VT-x, AMD-V with KVM or HAXM)

Tizen Emulator (cont)

Page 7: Embedded Software Lab. @ SKKU 15 1 Tizen Emulation on PC.

Embedded Software Lab. @ SKKU

15

7

• Emulation– Strict implementation of device spec– No guest modification– Conventional approach of QEMU– Poor performance and flexibility

• Simulation (Para-virtualization)– API-centric implementation – Guest modification needed– e.g. virtio

Emulation vs. Simulation (Para-virt)

Page 8: Embedded Software Lab. @ SKKU 15 1 Tizen Emulation on PC.

Embedded Software Lab. @ SKKU

15

8

• Emulation + Simulation for better performance and flexibility– Uses virtio device driver for performance

sensitive device– Because of OAL (OEM Abstraction Layer)

it is not difficult to switch real device driver into virtio device driver

Hybrid Emulation on Tizen

Page 9: Embedded Software Lab. @ SKKU 15 1 Tizen Emulation on PC.

Embedded Software Lab. @ SKKU

15

9OEM Abstraction Layer

Page 10: Embedded Software Lab. @ SKKU 15 1 Tizen Emulation on PC.

Embedded Software Lab. @ SKKU

15

10

• Tizen Virtual board provides virtual HW devices• Board Constructions– QEMU PC board

• Intel Pentium II chipset + devices

– virtio devices from QEMU• Vrtio-disk, virtio-net and virtio-9p

– New virtio devices from Tizen• virtio-opengl• codec, overlay, camera, multi-touch

Virtual Board

Page 11: Embedded Software Lab. @ SKKU 15 1 Tizen Emulation on PC.

Embedded Software Lab. @ SKKU

15

11

• Separate display process from emulator process• Display devices based VGA– VGA device (1 fb) + Overlay device (2 obs)– Sharing SDL display buffer between QEMU and skin processes

Skin / Display

Page 12: Embedded Software Lab. @ SKKU 15 1 Tizen Emulation on PC.

Embedded Software Lab. @ SKKU

15

12

• Support OpenGLES/EGL APIs with high performance• GLES/EGL calls are performed in off-screen

rendering by host GPU– GL command passing to QEMU via virtio

GLES Acceleration

Page 13: Embedded Software Lab. @ SKKU 15 1 Tizen Emulation on PC.

Embedded Software Lab. @ SKKU

15

13

• Supprot video playing even w/oHW VT support– QEMU TCG (Tiny Code Generator) is not

fast enough to run guest video codec

• AV Codec API delegation to host

Codec Acceleration

Page 14: Embedded Software Lab. @ SKKU 15 1 Tizen Emulation on PC.

Embedded Software Lab. @ SKKU

15

14

• We can build Tizen emulator (also all Tizen SDK) with own hands.– git clone ssh://review.tizen.org:gerrit/sdk/emulator/qemu– execute ./[qemu-root]/tizen/build.sh

• Required: libasound2-dev, libcurlpp-dev, libcurl4-openssl-dev, libglib2.0-dev, libpixman-1-dev, libpng12-dev, libcap-dev, libattr1-dev, libv4l-dev, libxext-dev, libglu1-mesa-dev, libsdl1.2-dev

– Uses [qemu-root]/tizen/emulator/bin/emulator-x86– currently Tizen_2.2 branch

is not available (code missing)• Available soon.

Tizen Emulator is also Open Source

Page 15: Embedded Software Lab. @ SKKU 15 1 Tizen Emulation on PC.

Embedded Software Lab. @ SKKU

15

15

Tizen 3.0 with VMware

Page 16: Embedded Software Lab. @ SKKU 15 1 Tizen Emulation on PC.

Embedded Software Lab. @ SKKU

15

16

• Tizen 3.0– Full open source development project (upstream branch)– Support various profiles (IVI, mobile, Common)– Support various architectures (arm, x86, x86_64)

• New features– WRT Crosswalk

• HTML5 application runtime based on Chromium & Blink

– X Wayland & Weston (for multi-display support)

Tizen 3.0 IVI and Common

Page 17: Embedded Software Lab. @ SKKU 15 1 Tizen Emulation on PC.

Embedded Software Lab. @ SKKU

15

17

• Tizen SDK Emulator– Tizen 3.0 also provides Tizen SDK emulator similar to 2.2– https://wiki.tizen.org/wiki/Tizen_IVI_SDK#Installing_Tizen_IVI_SDK

• Tizen Standalone Emulator– Tizen emulator w/o Tizen SDK – https://wiki.tizen.org/wiki/Tizen_Standalone_Emulator

• Tizen with Vmware or VirtualBox– Tizen 3.0 x86 image can be booted with common Hypervisor

with no changes– https://wiki.tizen.org/wiki/IVI/IVI_3.0_VMware

Various methods to use Tizen 3.0 on PC

Page 18: Embedded Software Lab. @ SKKU 15 1 Tizen Emulation on PC.

Embedded Software Lab. @ SKKU

15

18

• Download image– from Tizen daily build

http://download.tizen.org/releases/daily/tizen/ivi/ – or build by yourself

https://source.tizen.org/ko/documentation/developer-guide/all-one-instructions/creating-tizen-ivi-images-based-on-specific-snapshot-one-page

• Convert image into vmdk (using qemu-img tool)• Run VMware with vmdk image

Tizen IVI 3.0 with VMware

Page 19: Embedded Software Lab. @ SKKU 15 1 Tizen Emulation on PC.

Embedded Software Lab. @ SKKU

15

19

• Only terminal with simple GUI• Modello (https://wiki.tizen.org/wiki/IVI/Modello)– proof-of-concept HTML UI designed for IVI

Tizen IVI 3.0 with VMware (cont)

with modello

Page 20: Embedded Software Lab. @ SKKU 15 1 Tizen Emulation on PC.

Embedded Software Lab. @ SKKU

15

20

• Design and Implementation of Tizen Emulator, TDC2012

• Tizen:Common, TDC2014• Tizen IVI, Korea Linux forum 2012• Tizen wiki, https://wiki.tizen.org • Tizen mailing list, [email protected]

References