SlideShare ist ein Scribd-Unternehmen logo
1 von 22
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

Weitere ähnliche Inhalte

Was ist angesagt?

OSC2011 Tokyo/Fall 濃いバナ(virtio)
OSC2011 Tokyo/Fall 濃いバナ(virtio)OSC2011 Tokyo/Fall 濃いバナ(virtio)
OSC2011 Tokyo/Fall 濃いバナ(virtio)
Takeshi HASEGAWA
 
/proc/irq/&lt;irq>/smp_affinity
/proc/irq/&lt;irq>/smp_affinity/proc/irq/&lt;irq>/smp_affinity
/proc/irq/&lt;irq>/smp_affinity
Takuya ASADA
 
I2C Subsystem In Linux-2.6.24
I2C Subsystem In Linux-2.6.24I2C Subsystem In Linux-2.6.24
I2C Subsystem In Linux-2.6.24
Varun Mahajan
 

Was ist angesagt? (20)

Rootlinux17: Hypervisors on ARM - Overview and Design Choices by Julien Grall...
Rootlinux17: Hypervisors on ARM - Overview and Design Choices by Julien Grall...Rootlinux17: Hypervisors on ARM - Overview and Design Choices by Julien Grall...
Rootlinux17: Hypervisors on ARM - Overview and Design Choices by Julien Grall...
 
Dave Gilbert - KVM and QEMU
Dave Gilbert - KVM and QEMUDave Gilbert - KVM and QEMU
Dave Gilbert - KVM and QEMU
 
Hypervisors
HypervisorsHypervisors
Hypervisors
 
OSC2011 Tokyo/Fall 濃いバナ(virtio)
OSC2011 Tokyo/Fall 濃いバナ(virtio)OSC2011 Tokyo/Fall 濃いバナ(virtio)
OSC2011 Tokyo/Fall 濃いバナ(virtio)
 
Qemu
QemuQemu
Qemu
 
SFO15-TR9: PSCI, ACPI (and UEFI to boot)
SFO15-TR9: PSCI, ACPI (and UEFI to boot)SFO15-TR9: PSCI, ACPI (and UEFI to boot)
SFO15-TR9: PSCI, ACPI (and UEFI to boot)
 
【プライム・ストラテジー】ローカルLLMを複数組み合わてみた(インフラエンジニアのためのChatGPT入門LT)
【プライム・ストラテジー】ローカルLLMを複数組み合わてみた(インフラエンジニアのためのChatGPT入門LT)【プライム・ストラテジー】ローカルLLMを複数組み合わてみた(インフラエンジニアのためのChatGPT入門LT)
【プライム・ストラテジー】ローカルLLMを複数組み合わてみた(インフラエンジニアのためのChatGPT入門LT)
 
Qemu JIT Code Generator and System Emulation
Qemu JIT Code Generator and System EmulationQemu JIT Code Generator and System Emulation
Qemu JIT Code Generator and System Emulation
 
Network Automation with Ansible
Network Automation with AnsibleNetwork Automation with Ansible
Network Automation with Ansible
 
Was ist Docker?
Was ist Docker?Was ist Docker?
Was ist Docker?
 
/proc/irq/&lt;irq>/smp_affinity
/proc/irq/&lt;irq>/smp_affinity/proc/irq/&lt;irq>/smp_affinity
/proc/irq/&lt;irq>/smp_affinity
 
QEMU - Binary Translation
QEMU - Binary Translation QEMU - Binary Translation
QEMU - Binary Translation
 
Containerd + buildkit breakout
Containerd + buildkit breakoutContainerd + buildkit breakout
Containerd + buildkit breakout
 
Linux KVMではじめるカンタン仮想化入門
Linux KVMではじめるカンタン仮想化入門Linux KVMではじめるカンタン仮想化入門
Linux KVMではじめるカンタン仮想化入門
 
Linux Initialization Process (2)
Linux Initialization Process (2)Linux Initialization Process (2)
Linux Initialization Process (2)
 
Arm device tree and linux device drivers
Arm device tree and linux device driversArm device tree and linux device drivers
Arm device tree and linux device drivers
 
Study on Android Emulator
Study on Android EmulatorStudy on Android Emulator
Study on Android Emulator
 
systemd
systemdsystemd
systemd
 
I2C Subsystem In Linux-2.6.24
I2C Subsystem In Linux-2.6.24I2C Subsystem In Linux-2.6.24
I2C Subsystem In Linux-2.6.24
 
HKG15-107: ACPI Power Management on ARM64 Servers (v2)
HKG15-107: ACPI Power Management on ARM64 Servers (v2)HKG15-107: ACPI Power Management on ARM64 Servers (v2)
HKG15-107: ACPI Power Management on ARM64 Servers (v2)
 

Andere mochten auch

Virtualization - Kernel Virtual Machine (KVM)
Virtualization - Kernel Virtual Machine (KVM)Virtualization - Kernel Virtual Machine (KVM)
Virtualization - Kernel Virtual Machine (KVM)
Wan Leung Wong
 
Uboot startup sequence
Uboot startup sequenceUboot startup sequence
Uboot startup sequence
Houcheng Lin
 

Andere mochten auch (8)

Translation Cache Policies for Dynamic Binary Translation
Translation Cache Policies for Dynamic Binary TranslationTranslation Cache Policies for Dynamic Binary Translation
Translation Cache Policies for Dynamic Binary Translation
 
The kvm virtualization way
The kvm virtualization wayThe kvm virtualization way
The kvm virtualization way
 
Virtualization support by intel
Virtualization support by intelVirtualization support by intel
Virtualization support by intel
 
Mastering kvm virtualization- A complete guide of KVM virtualization
Mastering kvm virtualization- A complete guide of KVM virtualizationMastering kvm virtualization- A complete guide of KVM virtualization
Mastering kvm virtualization- A complete guide of KVM virtualization
 
Virtualization - Kernel Virtual Machine (KVM)
Virtualization - Kernel Virtual Machine (KVM)Virtualization - Kernel Virtual Machine (KVM)
Virtualization - Kernel Virtual Machine (KVM)
 
Hardware support for efficient virtualization
Hardware support for efficient virtualizationHardware support for efficient virtualization
Hardware support for efficient virtualization
 
Linux Profiling at Netflix
Linux Profiling at NetflixLinux Profiling at Netflix
Linux Profiling at Netflix
 
Uboot startup sequence
Uboot startup sequenceUboot startup sequence
Uboot startup sequence
 

Ähnlich wie QEMU and Raspberry Pi. Instant Embedded Development

Ähnlich wie QEMU and Raspberry Pi. Instant Embedded Development (20)

HiPEAC-Keynote.pptx
HiPEAC-Keynote.pptxHiPEAC-Keynote.pptx
HiPEAC-Keynote.pptx
 
Rasperry pi Part 10
Rasperry pi Part 10Rasperry pi Part 10
Rasperry pi Part 10
 
iWave Systems Techologies Pvt Ltd: Products- Software BSPs
iWave Systems Techologies Pvt Ltd: Products- Software BSPsiWave Systems Techologies Pvt Ltd: Products- Software BSPs
iWave Systems Techologies Pvt Ltd: Products- Software BSPs
 
Cubie board
Cubie boardCubie board
Cubie board
 
Webinar: NVIDIA JETSON – A Inteligência Artificial na palma de sua mão
Webinar: NVIDIA JETSON – A Inteligência Artificial na palma de sua mãoWebinar: NVIDIA JETSON – A Inteligência Artificial na palma de sua mão
Webinar: NVIDIA JETSON – A Inteligência Artificial na palma de sua mão
 
Myir product catalog
Myir product catalogMyir product catalog
Myir product catalog
 
Andes RISC-V processor solutions
Andes RISC-V processor solutionsAndes RISC-V processor solutions
Andes RISC-V processor solutions
 
Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...
Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...
Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...
 
Product Roadmap iEi 2017
Product Roadmap iEi 2017Product Roadmap iEi 2017
Product Roadmap iEi 2017
 
Morello Technology Demonstrator Hardware Overview - Mark Inskip, Arm
Morello Technology Demonstrator Hardware Overview - Mark Inskip, ArmMorello Technology Demonstrator Hardware Overview - Mark Inskip, Arm
Morello Technology Demonstrator Hardware Overview - Mark Inskip, Arm
 
ARM Processor Tutorial
ARM Processor Tutorial ARM Processor Tutorial
ARM Processor Tutorial
 
AMD K6
AMD K6AMD K6
AMD K6
 
Deep learning: Hardware Landscape
Deep learning: Hardware LandscapeDeep learning: Hardware Landscape
Deep learning: Hardware Landscape
 
Aewin network security appliance network management platform_scb8973_intel ha...
Aewin network security appliance network management platform_scb8973_intel ha...Aewin network security appliance network management platform_scb8973_intel ha...
Aewin network security appliance network management platform_scb8973_intel ha...
 
Raspberry Pi Introduction
Raspberry Pi IntroductionRaspberry Pi Introduction
Raspberry Pi Introduction
 
Rico board
Rico boardRico board
Rico board
 
SoM with Zynq UltraScale device
SoM with Zynq UltraScale deviceSoM with Zynq UltraScale device
SoM with Zynq UltraScale device
 
NGIoT Sustainability Workshop 2023_Rene Griessl presentation
NGIoT Sustainability Workshop 2023_Rene Griessl presentationNGIoT Sustainability Workshop 2023_Rene Griessl presentation
NGIoT Sustainability Workshop 2023_Rene Griessl presentation
 
The new AMD EPYC solutions from OVHcloud: what benefits?
The new AMD EPYC solutions from OVHcloud: what benefits?The new AMD EPYC solutions from OVHcloud: what benefits?
The new AMD EPYC solutions from OVHcloud: what benefits?
 
MYC-C7Z015 CPU Module
MYC-C7Z015 CPU ModuleMYC-C7Z015 CPU Module
MYC-C7Z015 CPU Module
 

Mehr von GlobalLogic Ukraine

GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
GlobalLogic Ukraine
 

Mehr von GlobalLogic Ukraine (20)

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

Kürzlich hochgeladen

notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
dharasingh5698
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Kürzlich hochgeladen (20)

Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 

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: igor.kaplinskyi@globallogic.com Taras Protsiv Embedded Software Developer mail: taras.protsiv@globallogic.com Volodymyr Shymanskyy Embedded Software Developer mail: volodymyr.shymanskyy@globallogic.com
  • 22. ©2013 GlobalLogic Inc. CONFIDENTIAL Thank you

Hinweis der Redaktion

  1. 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***
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  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 PAGE (ALT)