SlideShare a Scribd company logo
CONFIDENTIAL©2013 GlobalLogic Inc.
QEMU and Raspberry Pi
Instant embedded
development
©2013 GlobalLogic Inc. CONFIDENTIAL
• What is QEMU
• QEMU Project structure
• Extending QEMU
• Raspberry Pi on QEMU
• Simulating Accelerometer on QEMU
• Verification on real platform
3 CONFIDENTIAL
Goals:
• How to add support of new hardware to the QEMU (I2C
Accelerometer)
• How to simulate of the new hardware
• Write a simple application to work with Accelerometer
• Demonstrate that it works on the real platform as well as under
QEMU
4 CONFIDENTIAL
Environment:
• Ubuntu Linux on Host PC
• QEMU for ARM architecture
• Raspbian Linux on Raspberry Pi and QEMU
• QEMU-ready Linux kernel 3.6.11 for the ARM1176JZF-S (RPi)
• Raspberry Pi rev.B
• I2C Accelerometer ADXL345
5 CONFIDENTIAL
What is QEMU ?
− QEMU (short for "Quick EMUlator") is a free and open-source machine
emulator and virtualizer written originally by Fabrice Bellard
− Can emulate 80386, 80486, Pentium, Pentium Pro, AMD64 – from x86
architecture
− PowerPC, ARM, MIPS, SPARC, SPARC64
− Work on FreeBSD, FreeDOS, Linux, Windows 9x, Windows 2000, Mac
OS X, QNX, Android
6 CONFIDENTIAL
− Available CPUs:
− arm1026
− arm1136
− arm1136-r2
− arm1176
− arm11mpcore
− arm926
− arm946
− cortex-a15
− cortex-a8
− cortex-a9
− cortex-m3
− pxa250
− pxa255
− pxa260
− pxa261
− pxa262
− pxa270-a0
− pxa270-a1
− pxa270
− pxa270-b0
− pxa270-b1
− pxa270-c0
− pxa270-c5
− sa1100
− sa1110
− ti925t
− any
List of supported CPUs (ARM)
$ qemu-system-arm –cpu ?
7 CONFIDENTIAL
− smdkc210 Samsung SMDKC210 board (Exynos4210)
− connex Gumstix Connex (PXA255)
− verdex Gumstix Verdex (PXA270)
− highbank Calxeda Highbank (ECX-1000)
− midway Calxeda Midway (ECX-2000)
− integratorcp ARM Integrator/CP (ARM926EJ-S) (default)
− kzm ARM KZM Emulation Baseboard (ARM1136)
− mainstone Mainstone II (PXA27x)
− musicpal Marvell 88w8618 / MusicPal (ARM926EJ-S)
− n800 Nokia N800 tablet aka. RX-34 (OMAP2420)
− n810 Nokia N810 tablet aka. RX-44 (OMAP2420)
− sx1 Siemens SX1 (OMAP310) V2
− sx1-v1 Siemens SX1 (OMAP310) V1
− cheetah Palm Tungsten|E aka. Cheetah PDA (OMAP310)
− realview-eb ARM RealView Emulation Baseboard (ARM926EJ-
S)
− realview-eb-mpcore ARM RealView Emulation Baseboard
(ARM11MPCore)
− realview-pb-a8 ARM RealView Platform Baseboard for Cortex-
A8
− realview-pbx-a9 ARM RealView Platform Baseboard Explore for
Cortex-A9
− akita Akita PDA (PXA270)
− spitz Spitz PDA (PXA270)
− borzoi Borzoi PDA (PXA270)
− terrier Terrier PDA (PXA270)
− lm3s811evb Stellaris LM3S811EVB
− lm3s6965evb Stellaris LM3S6965EVB
− tosa Tosa PDA (PXA255)
− versatilepb ARM Versatile/PB (ARM926EJ-S)
− versatileab ARM Versatile/AB (ARM926EJ-S)
− vexpress-a9 ARM Versatile Express for Cortex-A9
− vexpress-a15 ARM Versatile Express for Cortex-A15
− xilinx-zynq-a9 Xilinx Zynq Platform Baseboard for Cortex-A9
− z2 Zipit Z2 (PXA27x)
List of Platforms (ARM)
$ qemu-system-arm -machine ?
8 CONFIDENTIAL
− "gpio_i2c", bus System, "Controller/Bridge/Hub", desc "Virtual GPIO to I2C
bridge"
− "usb-host", bus usb-bus, "Controller/Bridge/Hub"
− "usb-ehci", bus PCI, "USB"
− "ich9-usb-ehci2", bus PCI, "USB"
− "ich9-usb-ehci1", bus PCI, "USB"
− "usb-storage", bus usb-bus, "Storage"
− "usb-uas", bus usb-bus, "Storage"
− "i82562", bus PCI, "Network", desc "Intel i82562 Ethernet"
− "virtio-serial-device", bus virtio-bus, "Input"
− "pci-serial", bus PCI, "Input"
− "virtio-serial-pci", bus PCI, alias "virtio-serial", "Input"
− "usb-serial", bus usb-bus, "Input"
− "virtserialport", bus virtio-serial-bus, "Input"
− "AC97", bus PCI, "Sound", desc "Intel 82801AA AC97 Audio"
− "usb-audio", bus usb-bus, "Sound"
− "ds1338", bus i2c-bus, "Misc"
− "ssd0303", bus i2c-bus, "Misc"
− "lm8323", bus i2c-bus, "Misc"
− "max7310", bus i2c-bus, "Misc"
− "tmp105", bus i2c-bus, "Misc"
− "pci-testdev", bus PCI, "Misc", desc "PCI Test Device"
− "smbus-eeprom", bus i2c-bus, "Misc“
− ….
− …
− …
Supported peripherals (ARM):
$ qemu-system-arm -device?
• Zynq-7000 ARM Cortex-A9 CPU
• Zynq-7000 ARM Cortex-A9 MPCore
• Triple Timer Counter
• DDR Memory Controller
• DMA Controller (PL330)
• Static Memory Controller (NAND/NOR Flash)
• SD/SDIO Peripheral Controller (SDHCI)
• Zynq Gigabit Ethernet Controller
• USB Controller (EHCI - Host support only)
• Zynq UART Controller
• SPI and QSPI Controllers
• I2C Controller
9 CONFIDENTIAL
− http://qemu-project.org/Documentation/GettingStartedDevelopers
QEMU Project
“QEMU does not have a high level design description document - only the source
code tells the full story”
QEMU Cross Reference on Missing Link Electronics
10 CONFIDENTIAL
Extending QEMU
11 CONFIDENTIAL
QDev
12 CONFIDENTIAL
 Add statically in platform description file.
hw/arm/versatilepb.c :
 Add dynamically at startup:
./qemu-system-arm -kernel zImage -cpu arm1176 -m 256 -M versatilepb -no-
reboot -serial stdio -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw" -hda
wheezy-raspbian.img -device adxl345,bus=/versatile_i2c,address=0x53
QDev
Register new type Add new device
13 CONFIDENTIAL
Qemu I2C slave device
14 CONFIDENTIAL
 Read/write registers
 Emulate control registers behavior
 Create server socket
 Read data from socket and fill data registers
adxl345 emulation
15 CONFIDENTIAL
− Python
− Linux user space ( python-smbus library)
− Linux kernel ( /dev/i2c-0 )
− Linux i2c protocol driver
− Linux i2c-versatile.c driver
− write to Memory Mapped I/O
− Qemu MMIO callback (versatile_i2c.c )
− Qemu i2c slave protocol implementation (bitbang_i2c.c )
− Qemu i2c core ( hw/i2c/core.c )
– For address=0x53 : call our callbacks. ( read, write, event )
adxl345 emulation process
16 CONFIDENTIAL
Linux kernel
adxl345 emulation process
Qemu
17 CONFIDENTIAL
Raspberry Pi
The Raspberry Pi is a credit-card-sized single-board computer
Raspberry Pi Model B
Target Price$35
SoCBroadcom BCM2835 (CPU, GPU, DSP, SDRAM, USB)
CPU700 MHz ARM1176JZF-S core (ARM11 family, ARMv6 instruction set)
GPUBroadcom VideoCore IV @ 250 MHz
SDRAM512 MB (shared with GPU)
USB 2.0 ports2 via 3-port USB hub
Video outComposite RCA (PAL and NTSC), HDMI, raw LCD Panels via DSI
Audio out3.5 mm jack, HDMI, and I²S audio
StorageSD / MMC / SDIO card slot
Network10/100 Ethernet
Peripherals8 × GPIO, UART, I²C bus, SPI, I²S audio, +3.3 V, +5 V, ground
Power700 mA (3.5 W)
Power Source5 volt via MicroUSB, GPIO header
Size86 x 54 mm
Weight45g
OS
Arch Linux ARM, Debian GNU/Linux, Gentoo, Fedora, FreeBSD,
NetBSD, Plan 9, Raspbian OS, RISC OS, Slackware Linux
18 CONFIDENTIAL
Raspberry Pi on QEMU
Emulating Raspberry Pi – The easy way (XEC DESIGN)
http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way
19 CONFIDENTIAL
Simulating Accelerometer on QEMU
Netcat: $nc 10.0.2.15 7766 < data.txt
20 CONFIDENTIAL
 QEMU: Open source processor emulator:
http://wiki.qemu.org/Manual
 QEMU – Compiling for ARM (1176) emulation (XEC DESIGN):
http://xecdesign.com/compiling-qemu/
 Compiling an ARM1176 kernel for QEMU (XEC DESIGN):
http://xecdesign.com/compiling-a-kernel/
 QEMU – Emulating Raspberry Pi the easy way (XEC DESIGN):
http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way/
 Hardware virtualization with QEMU:
http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:qemu
 KVM Forum 2013: Implementing New Block Drivers: A QEMU Developer Primer by Jeff Cody
https://www.youtube.com/watch?v=ybNaEeQ2jgo
 HOWTO: Virtual Raspbian on Qemu in Ubuntu Linux 12.10:
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=29&t=37386
 Raspberry Pi Wiki:
http://elinux.org/RPi_Hub
Links:
CONFIDENTIAL©2013 GlobalLogic Inc.
Stuff
Igor Kaplinsky
Senior Embedded Software Developer
mail: igor.kaplinskyi@globallogic.com
Taras Protsiv
Embedded Software Developer
mail: taras.protsiv@globallogic.com
Volodymyr Shymanskyy
Embedded Software Developer
mail: volodymyr.shymanskyy@globallogic.com
©2013 GlobalLogic Inc. CONFIDENTIAL
Thank you

More Related Content

What's hot (20)

PDF
Android起動周りのノウハウ
chancelab
 
PDF
Architecture Of The Linux Kernel
guest547d74
 
PPTX
Linux Kernel Booting Process (2) - For NLKB
shimosawa
 
PPTX
Yocto Project introduction
Yi-Hsiu Hsu
 
PDF
Qemu Introduction
Chiawei Wang
 
PPTX
qemu + gdb + sample_code: Run sample code in QEMU OS and observe Linux Kernel...
Adrian Huang
 
PDF
Uboot startup sequence
Houcheng Lin
 
PDF
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Linaro
 
PPTX
Linux MMAP & Ioremap introduction
Gene Chang
 
PDF
HKG18-203 - Overview of Linaro DRM
Linaro
 
PDF
[232] 성능어디까지쥐어짜봤니 송태웅
NAVER D2
 
PDF
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
Jérôme Petazzoni
 
PDF
Making Linux do Hard Real-time
National Cheng Kung University
 
PPTX
QEMU - Binary Translation
Jiann-Fuh Liaw
 
PPTX
DMA Survival Guide
Kernel TLV
 
PDF
from Binary to Binary: How Qemu Works
Zhen Wei
 
PDF
Embedded_Linux_Booting
Rashila Rr
 
PPTX
Bootloaders (U-Boot)
Omkar Rane
 
ODP
Linux Internals - Kernel/Core
Shay Cohen
 
PDF
Build your own embedded linux distributions by yocto project
Yen-Chin Lee
 
Android起動周りのノウハウ
chancelab
 
Architecture Of The Linux Kernel
guest547d74
 
Linux Kernel Booting Process (2) - For NLKB
shimosawa
 
Yocto Project introduction
Yi-Hsiu Hsu
 
Qemu Introduction
Chiawei Wang
 
qemu + gdb + sample_code: Run sample code in QEMU OS and observe Linux Kernel...
Adrian Huang
 
Uboot startup sequence
Houcheng Lin
 
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Linaro
 
Linux MMAP & Ioremap introduction
Gene Chang
 
HKG18-203 - Overview of Linaro DRM
Linaro
 
[232] 성능어디까지쥐어짜봤니 송태웅
NAVER D2
 
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
Jérôme Petazzoni
 
Making Linux do Hard Real-time
National Cheng Kung University
 
QEMU - Binary Translation
Jiann-Fuh Liaw
 
DMA Survival Guide
Kernel TLV
 
from Binary to Binary: How Qemu Works
Zhen Wei
 
Embedded_Linux_Booting
Rashila Rr
 
Bootloaders (U-Boot)
Omkar Rane
 
Linux Internals - Kernel/Core
Shay Cohen
 
Build your own embedded linux distributions by yocto project
Yen-Chin Lee
 

Viewers also liked (10)

PDF
Qemu JIT Code Generator and System Emulation
National Cheng Kung University
 
PDF
Translation Cache Policies for Dynamic Binary Translation
Saber Ferjani
 
PDF
The kvm virtualization way
Francisco Gonçalves
 
PPTX
Virtualization support by intel
Inzemamul Haque
 
PDF
Dave Gilbert - KVM and QEMU
Danny Abukalam
 
ODP
Mastering kvm virtualization- A complete guide of KVM virtualization
Humble Chirammal
 
PDF
Virtualization - Kernel Virtual Machine (KVM)
Wan Leung Wong
 
PPTX
Hardware support for efficient virtualization
Lennox Wu
 
PDF
Linux Profiling at Netflix
Brendan Gregg
 
Qemu JIT Code Generator and System Emulation
National Cheng Kung University
 
Translation Cache Policies for Dynamic Binary Translation
Saber Ferjani
 
The kvm virtualization way
Francisco Gonçalves
 
Virtualization support by intel
Inzemamul Haque
 
Dave Gilbert - KVM and QEMU
Danny Abukalam
 
Mastering kvm virtualization- A complete guide of KVM virtualization
Humble Chirammal
 
Virtualization - Kernel Virtual Machine (KVM)
Wan Leung Wong
 
Hardware support for efficient virtualization
Lennox Wu
 
Linux Profiling at Netflix
Brendan Gregg
 
Ad

Similar to QEMU and Raspberry Pi. Instant Embedded Development (20)

PDF
MIPS-X
Zoltan Balazs
 
ODP
Raspberry Pi introduction
Lotfi Messaoudi
 
PPTX
Starting Raspberry Pi
LloydMoore
 
PDF
Develop Your Own Operating Systems using Cheap ARM Boards
National Cheng Kung University
 
PPTX
Rasperry pi Part 10
Techvilla
 
PPTX
robotics for embedded systems.pptx
VikasMahor3
 
PDF
All Arduino boards contain a microcontroller, which is a small computer. It t...
QucngV
 
PPTX
Introduction to Embedded Linux
Hossain Reja
 
PDF
Introduction to the rapid prototyping with python and linux for embedded systems
Naohiko Shimizu
 
PDF
Porting Android
Opersys inc.
 
PDF
Hacking with ARM devices on Linux
Netwalker lab kapper
 
PDF
ARMvisor @ COSCUP2012
Peter Chang
 
PDF
Porting Android ABS 2011
Opersys inc.
 
PDF
Porting Android
Opersys inc.
 
PDF
Development platform virtualization using qemu
Premjith Achemveettil
 
PDF
Qemu Pcie
The Linux Foundation
 
PPT
Lemay jin-reddy-schoudel
xu3stones
 
PDF
XPDS16: Xenbedded: Xen-based client virtualization for phones and tablets - ...
The Linux Foundation
 
PPTX
Raspberry Pi (Introduction)
Mandeesh Singh
 
PDF
QEMU in Cross building
Tetsuyuki Kobayashi
 
Raspberry Pi introduction
Lotfi Messaoudi
 
Starting Raspberry Pi
LloydMoore
 
Develop Your Own Operating Systems using Cheap ARM Boards
National Cheng Kung University
 
Rasperry pi Part 10
Techvilla
 
robotics for embedded systems.pptx
VikasMahor3
 
All Arduino boards contain a microcontroller, which is a small computer. It t...
QucngV
 
Introduction to Embedded Linux
Hossain Reja
 
Introduction to the rapid prototyping with python and linux for embedded systems
Naohiko Shimizu
 
Porting Android
Opersys inc.
 
Hacking with ARM devices on Linux
Netwalker lab kapper
 
ARMvisor @ COSCUP2012
Peter Chang
 
Porting Android ABS 2011
Opersys inc.
 
Porting Android
Opersys inc.
 
Development platform virtualization using qemu
Premjith Achemveettil
 
Lemay jin-reddy-schoudel
xu3stones
 
XPDS16: Xenbedded: Xen-based client virtualization for phones and tablets - ...
The Linux Foundation
 
Raspberry Pi (Introduction)
Mandeesh Singh
 
QEMU in Cross building
Tetsuyuki Kobayashi
 
Ad

More from GlobalLogic Ukraine (20)

PDF
GlobalLogic JavaScript Community Webinar #21 “Інтерв’ю без заспокійливих”
GlobalLogic Ukraine
 
PPTX
Deadlocks in SQL - Turning Fear Into Understanding (by Sergii Stets)
GlobalLogic Ukraine
 
PDF
GlobalLogic Java Community Webinar #18 “How to Improve Web Application Perfor...
GlobalLogic Ukraine
 
PDF
GlobalLogic Embedded Community x ROS Ukraine Webinar "Surgical Robots"
GlobalLogic Ukraine
 
PDF
GlobalLogic Java Community Webinar #17 “SpringJDBC vs JDBC. Is Spring a Hero?”
GlobalLogic Ukraine
 
PDF
GlobalLogic JavaScript Community Webinar #18 “Long Story Short: OSI Model”
GlobalLogic Ukraine
 
PPTX
Штучний інтелект як допомога в навчанні, а не замінник.pptx
GlobalLogic Ukraine
 
PPTX
Задачі AI-розробника як застосовується штучний інтелект.pptx
GlobalLogic Ukraine
 
PPTX
Що треба вивчати, щоб стати розробником штучного інтелекту та нейромереж.pptx
GlobalLogic Ukraine
 
PDF
GlobalLogic Java Community Webinar #16 “Zaloni’s Architecture for Data-Driven...
GlobalLogic Ukraine
 
PDF
JavaScript Community Webinar #14 "Why Is Git Rebase?"
GlobalLogic Ukraine
 
PDF
GlobalLogic .NET Community Webinar #3 "Exploring Serverless with Azure Functi...
GlobalLogic Ukraine
 
PPTX
Страх і сила помилок - IT Inside від GlobalLogic Education
GlobalLogic Ukraine
 
PDF
GlobalLogic .NET Webinar #2 “Azure RBAC and Managed Identity”
GlobalLogic Ukraine
 
PDF
GlobalLogic QA Webinar “What does it take to become a Test Engineer”
GlobalLogic Ukraine
 
PDF
“How to Secure Your Applications With a Keycloak?
GlobalLogic Ukraine
 
PDF
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
GlobalLogic Ukraine
 
PPTX
GlobalLogic Machine Learning Webinar “Statistical learning of linear regressi...
GlobalLogic Ukraine
 
PDF
GlobalLogic C++ Webinar “The Minimum Knowledge to Become a C++ Developer”
GlobalLogic Ukraine
 
PDF
Embedded Webinar #17 "Low-level Network Testing in Embedded Devices Development"
GlobalLogic Ukraine
 
GlobalLogic JavaScript Community Webinar #21 “Інтерв’ю без заспокійливих”
GlobalLogic Ukraine
 
Deadlocks in SQL - Turning Fear Into Understanding (by Sergii Stets)
GlobalLogic Ukraine
 
GlobalLogic Java Community Webinar #18 “How to Improve Web Application Perfor...
GlobalLogic Ukraine
 
GlobalLogic Embedded Community x ROS Ukraine Webinar "Surgical Robots"
GlobalLogic Ukraine
 
GlobalLogic Java Community Webinar #17 “SpringJDBC vs JDBC. Is Spring a Hero?”
GlobalLogic Ukraine
 
GlobalLogic JavaScript Community Webinar #18 “Long Story Short: OSI Model”
GlobalLogic Ukraine
 
Штучний інтелект як допомога в навчанні, а не замінник.pptx
GlobalLogic Ukraine
 
Задачі AI-розробника як застосовується штучний інтелект.pptx
GlobalLogic Ukraine
 
Що треба вивчати, щоб стати розробником штучного інтелекту та нейромереж.pptx
GlobalLogic Ukraine
 
GlobalLogic Java Community Webinar #16 “Zaloni’s Architecture for Data-Driven...
GlobalLogic Ukraine
 
JavaScript Community Webinar #14 "Why Is Git Rebase?"
GlobalLogic Ukraine
 
GlobalLogic .NET Community Webinar #3 "Exploring Serverless with Azure Functi...
GlobalLogic Ukraine
 
Страх і сила помилок - IT Inside від GlobalLogic Education
GlobalLogic Ukraine
 
GlobalLogic .NET Webinar #2 “Azure RBAC and Managed Identity”
GlobalLogic Ukraine
 
GlobalLogic QA Webinar “What does it take to become a Test Engineer”
GlobalLogic Ukraine
 
“How to Secure Your Applications With a Keycloak?
GlobalLogic Ukraine
 
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
GlobalLogic Ukraine
 
GlobalLogic Machine Learning Webinar “Statistical learning of linear regressi...
GlobalLogic Ukraine
 
GlobalLogic C++ Webinar “The Minimum Knowledge to Become a C++ Developer”
GlobalLogic Ukraine
 
Embedded Webinar #17 "Low-level Network Testing in Embedded Devices Development"
GlobalLogic Ukraine
 

Recently uploaded (20)

DOC
MRRS Strength and Durability of Concrete
CivilMythili
 
PDF
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
PPTX
Lecture 1 Shell and Tube Heat exchanger-1.pptx
mailforillegalwork
 
PPTX
Hashing Introduction , hash functions and techniques
sailajam21
 
PDF
Unified_Cloud_Comm_Presentation anil singh ppt
anilsingh298751
 
PPTX
原版一样(Acadia毕业证书)加拿大阿卡迪亚大学毕业证办理方法
Taqyea
 
DOCX
8th International Conference on Electrical Engineering (ELEN 2025)
elelijjournal653
 
PPTX
Evaluation and thermal analysis of shell and tube heat exchanger as per requi...
shahveer210504
 
PPTX
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
PPTX
Product Development & DevelopmentLecture02.pptx
zeeshanwazir2
 
PDF
International Journal of Information Technology Convergence and services (IJI...
ijitcsjournal4
 
PPT
PPT2_Metal formingMECHANICALENGINEEIRNG .ppt
Praveen Kumar
 
PDF
Design Thinking basics for Engineers.pdf
CMR University
 
PPTX
Arduino Based Gas Leakage Detector Project
CircuitDigest
 
DOCX
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
PPTX
Depth First Search Algorithm in 🧠 DFS in Artificial Intelligence (AI)
rafeeqshaik212002
 
PDF
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
PDF
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
PPTX
Mechanical Design of shell and tube heat exchangers as per ASME Sec VIII Divi...
shahveer210504
 
PPTX
Thermal runway and thermal stability.pptx
godow93766
 
MRRS Strength and Durability of Concrete
CivilMythili
 
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
Lecture 1 Shell and Tube Heat exchanger-1.pptx
mailforillegalwork
 
Hashing Introduction , hash functions and techniques
sailajam21
 
Unified_Cloud_Comm_Presentation anil singh ppt
anilsingh298751
 
原版一样(Acadia毕业证书)加拿大阿卡迪亚大学毕业证办理方法
Taqyea
 
8th International Conference on Electrical Engineering (ELEN 2025)
elelijjournal653
 
Evaluation and thermal analysis of shell and tube heat exchanger as per requi...
shahveer210504
 
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
Product Development & DevelopmentLecture02.pptx
zeeshanwazir2
 
International Journal of Information Technology Convergence and services (IJI...
ijitcsjournal4
 
PPT2_Metal formingMECHANICALENGINEEIRNG .ppt
Praveen Kumar
 
Design Thinking basics for Engineers.pdf
CMR University
 
Arduino Based Gas Leakage Detector Project
CircuitDigest
 
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
Depth First Search Algorithm in 🧠 DFS in Artificial Intelligence (AI)
rafeeqshaik212002
 
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
Mechanical Design of shell and tube heat exchangers as per ASME Sec VIII Divi...
shahveer210504
 
Thermal runway and thermal stability.pptx
godow93766
 

QEMU and Raspberry Pi. Instant Embedded Development

  • 1. CONFIDENTIAL©2013 GlobalLogic Inc. QEMU and Raspberry Pi Instant embedded development
  • 2. ©2013 GlobalLogic Inc. CONFIDENTIAL • What is QEMU • QEMU Project structure • Extending QEMU • Raspberry Pi on QEMU • Simulating Accelerometer on QEMU • Verification on real platform
  • 3. 3 CONFIDENTIAL Goals: • How to add support of new hardware to the QEMU (I2C Accelerometer) • How to simulate of the new hardware • Write a simple application to work with Accelerometer • Demonstrate that it works on the real platform as well as under QEMU
  • 4. 4 CONFIDENTIAL Environment: • Ubuntu Linux on Host PC • QEMU for ARM architecture • Raspbian Linux on Raspberry Pi and QEMU • QEMU-ready Linux kernel 3.6.11 for the ARM1176JZF-S (RPi) • Raspberry Pi rev.B • I2C Accelerometer ADXL345
  • 5. 5 CONFIDENTIAL What is QEMU ? − QEMU (short for "Quick EMUlator") is a free and open-source machine emulator and virtualizer written originally by Fabrice Bellard − Can emulate 80386, 80486, Pentium, Pentium Pro, AMD64 – from x86 architecture − PowerPC, ARM, MIPS, SPARC, SPARC64 − Work on FreeBSD, FreeDOS, Linux, Windows 9x, Windows 2000, Mac OS X, QNX, Android
  • 6. 6 CONFIDENTIAL − Available CPUs: − arm1026 − arm1136 − arm1136-r2 − arm1176 − arm11mpcore − arm926 − arm946 − cortex-a15 − cortex-a8 − cortex-a9 − cortex-m3 − pxa250 − pxa255 − pxa260 − pxa261 − pxa262 − pxa270-a0 − pxa270-a1 − pxa270 − pxa270-b0 − pxa270-b1 − pxa270-c0 − pxa270-c5 − sa1100 − sa1110 − ti925t − any List of supported CPUs (ARM) $ qemu-system-arm –cpu ?
  • 7. 7 CONFIDENTIAL − smdkc210 Samsung SMDKC210 board (Exynos4210) − connex Gumstix Connex (PXA255) − verdex Gumstix Verdex (PXA270) − highbank Calxeda Highbank (ECX-1000) − midway Calxeda Midway (ECX-2000) − integratorcp ARM Integrator/CP (ARM926EJ-S) (default) − kzm ARM KZM Emulation Baseboard (ARM1136) − mainstone Mainstone II (PXA27x) − musicpal Marvell 88w8618 / MusicPal (ARM926EJ-S) − n800 Nokia N800 tablet aka. RX-34 (OMAP2420) − n810 Nokia N810 tablet aka. RX-44 (OMAP2420) − sx1 Siemens SX1 (OMAP310) V2 − sx1-v1 Siemens SX1 (OMAP310) V1 − cheetah Palm Tungsten|E aka. Cheetah PDA (OMAP310) − realview-eb ARM RealView Emulation Baseboard (ARM926EJ- S) − realview-eb-mpcore ARM RealView Emulation Baseboard (ARM11MPCore) − realview-pb-a8 ARM RealView Platform Baseboard for Cortex- A8 − realview-pbx-a9 ARM RealView Platform Baseboard Explore for Cortex-A9 − akita Akita PDA (PXA270) − spitz Spitz PDA (PXA270) − borzoi Borzoi PDA (PXA270) − terrier Terrier PDA (PXA270) − lm3s811evb Stellaris LM3S811EVB − lm3s6965evb Stellaris LM3S6965EVB − tosa Tosa PDA (PXA255) − versatilepb ARM Versatile/PB (ARM926EJ-S) − versatileab ARM Versatile/AB (ARM926EJ-S) − vexpress-a9 ARM Versatile Express for Cortex-A9 − vexpress-a15 ARM Versatile Express for Cortex-A15 − xilinx-zynq-a9 Xilinx Zynq Platform Baseboard for Cortex-A9 − z2 Zipit Z2 (PXA27x) List of Platforms (ARM) $ qemu-system-arm -machine ?
  • 8. 8 CONFIDENTIAL − "gpio_i2c", bus System, "Controller/Bridge/Hub", desc "Virtual GPIO to I2C bridge" − "usb-host", bus usb-bus, "Controller/Bridge/Hub" − "usb-ehci", bus PCI, "USB" − "ich9-usb-ehci2", bus PCI, "USB" − "ich9-usb-ehci1", bus PCI, "USB" − "usb-storage", bus usb-bus, "Storage" − "usb-uas", bus usb-bus, "Storage" − "i82562", bus PCI, "Network", desc "Intel i82562 Ethernet" − "virtio-serial-device", bus virtio-bus, "Input" − "pci-serial", bus PCI, "Input" − "virtio-serial-pci", bus PCI, alias "virtio-serial", "Input" − "usb-serial", bus usb-bus, "Input" − "virtserialport", bus virtio-serial-bus, "Input" − "AC97", bus PCI, "Sound", desc "Intel 82801AA AC97 Audio" − "usb-audio", bus usb-bus, "Sound" − "ds1338", bus i2c-bus, "Misc" − "ssd0303", bus i2c-bus, "Misc" − "lm8323", bus i2c-bus, "Misc" − "max7310", bus i2c-bus, "Misc" − "tmp105", bus i2c-bus, "Misc" − "pci-testdev", bus PCI, "Misc", desc "PCI Test Device" − "smbus-eeprom", bus i2c-bus, "Misc“ − …. − … − … Supported peripherals (ARM): $ qemu-system-arm -device? • Zynq-7000 ARM Cortex-A9 CPU • Zynq-7000 ARM Cortex-A9 MPCore • Triple Timer Counter • DDR Memory Controller • DMA Controller (PL330) • Static Memory Controller (NAND/NOR Flash) • SD/SDIO Peripheral Controller (SDHCI) • Zynq Gigabit Ethernet Controller • USB Controller (EHCI - Host support only) • Zynq UART Controller • SPI and QSPI Controllers • I2C Controller
  • 9. 9 CONFIDENTIAL − http://qemu-project.org/Documentation/GettingStartedDevelopers QEMU Project “QEMU does not have a high level design description document - only the source code tells the full story” QEMU Cross Reference on Missing Link Electronics
  • 12. 12 CONFIDENTIAL  Add statically in platform description file. hw/arm/versatilepb.c :  Add dynamically at startup: ./qemu-system-arm -kernel zImage -cpu arm1176 -m 256 -M versatilepb -no- reboot -serial stdio -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw" -hda wheezy-raspbian.img -device adxl345,bus=/versatile_i2c,address=0x53 QDev Register new type Add new device
  • 13. 13 CONFIDENTIAL Qemu I2C slave device
  • 14. 14 CONFIDENTIAL  Read/write registers  Emulate control registers behavior  Create server socket  Read data from socket and fill data registers adxl345 emulation
  • 15. 15 CONFIDENTIAL − Python − Linux user space ( python-smbus library) − Linux kernel ( /dev/i2c-0 ) − Linux i2c protocol driver − Linux i2c-versatile.c driver − write to Memory Mapped I/O − Qemu MMIO callback (versatile_i2c.c ) − Qemu i2c slave protocol implementation (bitbang_i2c.c ) − Qemu i2c core ( hw/i2c/core.c ) – For address=0x53 : call our callbacks. ( read, write, event ) adxl345 emulation process
  • 16. 16 CONFIDENTIAL Linux kernel adxl345 emulation process Qemu
  • 17. 17 CONFIDENTIAL Raspberry Pi The Raspberry Pi is a credit-card-sized single-board computer Raspberry Pi Model B Target Price$35 SoCBroadcom BCM2835 (CPU, GPU, DSP, SDRAM, USB) CPU700 MHz ARM1176JZF-S core (ARM11 family, ARMv6 instruction set) GPUBroadcom VideoCore IV @ 250 MHz SDRAM512 MB (shared with GPU) USB 2.0 ports2 via 3-port USB hub Video outComposite RCA (PAL and NTSC), HDMI, raw LCD Panels via DSI Audio out3.5 mm jack, HDMI, and I²S audio StorageSD / MMC / SDIO card slot Network10/100 Ethernet Peripherals8 × GPIO, UART, I²C bus, SPI, I²S audio, +3.3 V, +5 V, ground Power700 mA (3.5 W) Power Source5 volt via MicroUSB, GPIO header Size86 x 54 mm Weight45g OS Arch Linux ARM, Debian GNU/Linux, Gentoo, Fedora, FreeBSD, NetBSD, Plan 9, Raspbian OS, RISC OS, Slackware Linux
  • 18. 18 CONFIDENTIAL Raspberry Pi on QEMU Emulating Raspberry Pi – The easy way (XEC DESIGN) http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way
  • 19. 19 CONFIDENTIAL Simulating Accelerometer on QEMU Netcat: $nc 10.0.2.15 7766 < data.txt
  • 20. 20 CONFIDENTIAL  QEMU: Open source processor emulator: http://wiki.qemu.org/Manual  QEMU – Compiling for ARM (1176) emulation (XEC DESIGN): http://xecdesign.com/compiling-qemu/  Compiling an ARM1176 kernel for QEMU (XEC DESIGN): http://xecdesign.com/compiling-a-kernel/  QEMU – Emulating Raspberry Pi the easy way (XEC DESIGN): http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way/  Hardware virtualization with QEMU: http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:qemu  KVM Forum 2013: Implementing New Block Drivers: A QEMU Developer Primer by Jeff Cody https://www.youtube.com/watch?v=ybNaEeQ2jgo  HOWTO: Virtual Raspbian on Qemu in Ubuntu Linux 12.10: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=29&t=37386  Raspberry Pi Wiki: http://elinux.org/RPi_Hub Links:
  • 21. CONFIDENTIAL©2013 GlobalLogic Inc. Stuff Igor Kaplinsky Senior Embedded Software Developer mail: [email protected] Taras Protsiv Embedded Software Developer mail: [email protected] Volodymyr Shymanskyy Embedded Software Developer mail: [email protected]
  • 22. ©2013 GlobalLogic Inc. CONFIDENTIAL Thank you

Editor's Notes

  • #2: TITLE PAGE – Headline 36pt Arial in WHITE – Sub-head 18pt Arial Reg in GREY – Do not include client logos on title page – TEXT ONLY ***It’s not recommended to use any sort of graphic animation. Although in some cases it may be appropriate to apply “Appear” effect to slide sections to show sections one-by-one on the slide***
  • #6: TITLE AND TEXT – Headline 32pt Arial in BLACK – Subtitle 20pt Arial Reg in ORANGE – Body copy & bulleted text 20pt Arial Reg in GRAY; body copy not to go below 16 pt – Left-justify all text and design elements
  • #7: TITLE AND TEXT – Headline 32pt Arial in BLACK – Body copy & bulleted text 12pt Arial Reg in GRAY; body copy not to go below 10 pt – Left-justify all text and design element
  • #8: TITLE AND TEXT – Headline 32pt Arial in BLACK – Body copy & bulleted text 12pt Arial Reg in GRAY; body copy not to go below 10 pt – Left-justify all text and design element
  • #9: TITLE AND TEXT – Headline 32pt Arial in BLACK – Body copy & bulleted text 12pt Arial Reg in GRAY; body copy not to go below 10 pt – Left-justify all text and design element
  • #10: TITLE AND TEXT – Headline 32pt Arial in BLACK – Body copy & bulleted text 12pt Arial Reg in GRAY; body copy not to go below 10 pt – Left-justify all text and design element
  • #11: TITLE AND TEXT – Headline 32pt Arial in BLACK – Body copy & bulleted text 12pt Arial Reg in GRAY; body copy not to go below 10 pt – Left-justify all text and design element
  • #12: TITLE AND TEXT – Headline 32pt Arial in BLACK – Body copy & bulleted text 12pt Arial Reg in GRAY; body copy not to go below 10 pt – Left-justify all text and design element
  • #13: TITLE AND TEXT – Headline 32pt Arial in BLACK – Body copy & bulleted text 12pt Arial Reg in GRAY; body copy not to go below 10 pt – Left-justify all text and design element
  • #18: TITLE AND TEXT – Headline 32pt Arial in BLACK – Body copy & bulleted text 12pt Arial Reg in GRAY; body copy not to go below 10 pt – Left-justify all text and design element
  • #19: TITLE AND TEXT – Headline 32pt Arial in BLACK – Body copy & bulleted text 12pt Arial Reg in GRAY; body copy not to go below 10 pt – Left-justify all text and design element
  • #20: TITLE AND TEXT – Headline 32pt Arial in BLACK – Body copy & bulleted text 12pt Arial Reg in GRAY; body copy not to go below 10 pt – Left-justify all text and design element
  • #23: TITLE PAGE (ALT)