Top Banner
Copyright © 2009 Accenture. All Rights Reserved. 1 QEMU Simulator & Symbian Foundation Johnathan White Accenture
21

Demo_Lab QEMU Simulator & Symbian Foundation

Nov 12, 2014

Download

Documents

SEE2009

Slides from hands on demo of QEMU at SEE 2009
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Demo_Lab QEMU Simulator & Symbian Foundation

Copyright © 2009 Accenture. All Rights Reserved. 1

QEMU Simulator & Symbian Foundation

Johnathan White

Accenture

Page 2: Demo_Lab QEMU Simulator & Symbian Foundation

Copyright © 2009 Accenture. All Rights Reserved. Accenture, its logo, and High Performance Delivered are trademarks of Accenture.

QEMU Simulator & Symbian Foundation Johnathan White SEE October 2009

Page 3: Demo_Lab QEMU Simulator & Symbian Foundation

Copyright © 2009 Accenture. All Rights Reserved. 3

Agenda

•  Simulator Introduction & Architecture

•  Running Simulator

•  Building/Debugging Simulator

•  Simulator Features/Demo

•  GUI environment

•  Questions

Page 4: Demo_Lab QEMU Simulator & Symbian Foundation

Copyright © 2009 Accenture. All Rights Reserved. 4

Simulator not Symbian Emulator

•  Existing Symbian Emulator is x86 based –  Requires entire environment built for x86 –  Requires different tool chain –  Often doesn’t accurately map hardware leading to

integration issues

•  Simulator is ARM based –  Single environment and tool chain required –  Accurate mapping of hardware environment

Page 5: Demo_Lab QEMU Simulator & Symbian Foundation

Copyright © 2009 Accenture. All Rights Reserved. 5

What is QEMU ?

•  QEMU is a machine emulator which enables guest (Symbian) to run on host environment

•  Emulates full hardware platform including CPU and peripherals

•  QEMU is open source (http://www.qemu.org/)

•  Wide QEMU usage in the industry

Page 6: Demo_Lab QEMU Simulator & Symbian Foundation

Copyright © 2009 Accenture. All Rights Reserved. 6

Baseport

•  Symbian baseport (Syborg) required for Symbian to function on QEMU virtual hardware platform

•  Baseport comprises of ASSP/Variant code as well drivers and kernel extensions

•  Code above baseport is common between Simulator and other target hardware

Page 7: Demo_Lab QEMU Simulator & Symbian Foundation

Copyright © 2009 Accenture. All Rights Reserved. 7

Symbian

QEMU

Host

USER SPACE

KERNEL SPACE EUSER

SYBORG BASEPORT

DEVICE DRIVERS

KERNEL EXTENSIONS

ASSP / VARIANT

KERNEL NANO KERNEL

HOST OS API’s

SYBORG BOARD MODEL PERIPHERALS

BINARY TRANSLATION

ARM

HOST

HOST ENV – Windows, Linux, MAC

Hardware

Overall Architecture

Page 8: Demo_Lab QEMU Simulator & Symbian Foundation

Copyright © 2009 Accenture. All Rights Reserved. 8

Simulator – EPL Kernel kit

All “ingredients” required to create and run a basic Symbian image in QEMU are released under EPL and thus available to all

Symbian

QEMU

Host

Pre-compiled Syborg baseport provided (\epoc32\release\armv5\urel &udeb)

Syborg source code provided (\sf\adaptation\qemu\baseport\syborg) Binaries Required to create Symbian TextShell Rom Image

Pre-compiled QEMU (\symbian-qemu-0.9.1\bin)

QEMU source code provided (\sf\adaptation\qemu\symbian-qemu-0.9.1-12)

QEMU environment compiled for win32 environment

SF Mercurial repo - http://developer.symbian.org/oss/FCL/sf/adaptation/qemu

Page 9: Demo_Lab QEMU Simulator & Symbian Foundation

Copyright © 2009 Accenture. All Rights Reserved. 9

QEMU Simulator … its alive !

•  First build a textshell Symbian ROM \sf\os\kernelhwsrv\kernel\eka\rombuild> rom -v syborg -i armv5 -b udeb

•  Then run ROM image in QEMU \symbian-qemu-0.9.1\bin> arm-none-symbianelf-qemu-system.exe -kernel \sf\os\kernelhwsrv\kernel\eka\rombuild\syborgarmv5d.img -M \sf\adaptation\qemu\baseport\syborg\syborg.dtb -serial COM2

Creates debug textshell ROM

image file

Launches ROM image in QEMU

simulator

Page 10: Demo_Lab QEMU Simulator & Symbian Foundation

Copyright © 2009 Accenture. All Rights Reserved. 10

PRACTICAL 1

Instructions for Practical 1 & 2 & 3

Page 11: Demo_Lab QEMU Simulator & Symbian Foundation

Copyright © 2009 Accenture. All Rights Reserved. 11

QEMU – Output … and how it works

Display

Debug Port

EShell -> Console Windows Server -> Screen Driver -> LCD Driver -> Frame Buffer -> Host

Kernel code -> Debug Handler -> Syborg UART -> Host UART -> Host UART

Board Model Configuration controlled by DTS file

Page 12: Demo_Lab QEMU Simulator & Symbian Foundation

Copyright © 2009 Accenture. All Rights Reserved. 12

Rebuilding Syborg

•  Altering screen size Modify KConfigLcdHeight to be 100 in \sf\adaptation\qemu\baseport\syborg\fb\Syborg_fb.h

•  Adding debug print Add Kern::Printf(“Hello World”) to void TPointerRv::Init3() in \sf\adaptation\baseport\syborg\pointer\syborg_pointer.cpp

•  Building baseport

\sf\adaptation\qemu\baseport\syborg> sbs -b bld.inf -c armv5_udeb –j 1

•  Shows the ease of modification of the environment

Page 13: Demo_Lab QEMU Simulator & Symbian Foundation

Copyright © 2009 Accenture. All Rights Reserved. 13

PRACTICAL 2

Page 14: Demo_Lab QEMU Simulator & Symbian Foundation

Copyright © 2009 Accenture. All Rights Reserved. 14

Debugging Simulator

•  GDB Stop Mode Debugging

QEMU contains GDB stub which allows simulation environment to be controlled by GDB debugger

GDB only understands ELF -> need to convert from Symbian E32 image

•  Command Line -> Use Eclipse GUI

Further info http://developer.symbian.org/wiki/index.php/QEMU_&_Syborg_Debugging & \sf\adaption\qemu\docs directory

Page 15: Demo_Lab QEMU Simulator & Symbian Foundation

Copyright © 2009 Accenture. All Rights Reserved. 15

Simulator Features

•  Display driver •  Keyboard /keymapping •  Pointer driver •  Serial Pdd •  Ethernet Pdd •  Sound Pdd (dummy) •  Host file system (fsy + driver) •  Debug Monitor

Page 16: Demo_Lab QEMU Simulator & Symbian Foundation

Copyright © 2009 Accenture. All Rights Reserved. 16

•  Simple Console Application

•  Source code - \sf\adaptation\qemu\applications\SymbianLogo_TextShell

•  Build using command - sbs -b bld.inf -c armv5 –j 1

•  Add application into ROM - Modiify \sf\os\kernelhwsrv\kernel\eka\rombuild\Tshell.oby to include line ‘ #include <rom\include\symbianlogo.iby> ’

•  Build ROM / Start ROM in QEMU

Simulator Features Demo (1)

Page 17: Demo_Lab QEMU Simulator & Symbian Foundation

Copyright © 2009 Accenture. All Rights Reserved. 17

PRACTICAL 3

Page 18: Demo_Lab QEMU Simulator & Symbian Foundation

Copyright © 2009 Accenture. All Rights Reserved. 18

Simulator Features Demo (2)

•  Type “symbianlogo” from prompt Host File System Pointer Driver Keyboard Driver Display Driver

•  Where next with the demo Have a play … -  Learning -  Port image codec onto Symbian -  Port audio assets, implement hooks to QEMU audio

hardware -  Don’t use console Wserv, create own implementation

for direct input events, create own UI

Page 19: Demo_Lab QEMU Simulator & Symbian Foundation

Copyright © 2009 Accenture. All Rights Reserved. 19

GUI environment …

SF GUI image configuration running in QEMU … not just Text shell

SFL code plus configuration required to allow GUI to boot

All user space code is common allowing for rapid prototyping of product images

Page 20: Demo_Lab QEMU Simulator & Symbian Foundation

Copyright © 2009 Accenture. All Rights Reserved. 20

QT UI environment …

QT apps running on top of SF GUI image

Open source QT from http://pepper.troll.no/s60prereleases/

QT libs and example apps built from source then included in Syborg ROM

Excellent usage of prototyping future technology

Page 21: Demo_Lab QEMU Simulator & Symbian Foundation

Copyright © 2009 Accenture. All Rights Reserved. 21

Next Steps …

•  This is just the beginning… –  New/enhanced drivers & board model peripherals –  Configurations & new directions –  Contributions

•  Questions ?

•  Further information - \sf\adaptation\qemu\docs\

- developer.symbian.org –wiki,forum,articles