SlideShare ist ein Scribd-Unternehmen logo
1 von 31
Downloaden Sie, um offline zu lesen
Using QEMU
       for
Cross Development


  Tetsuyuki Kobayashi

     Kyoto Microcomputer Co., Ltd.   1
Let's use QEMU
                    to boost your project


               Real system : System emulator
                          =
                    Atoms : Bits

                            This is what I impress today.
                            Take advantage of 'bits'!


                                    Kyoto Microcomputer Co., Ltd.   2
”Being Digital” by Nicholas Negroponte
 http://archives.obs-us.com/obs/english/books/nn/ch01c01.htm
Who am I?

   20+ years involved in embedded systems
       10 years in real time OS, such as iTRON
       10 years in embedded Java Virtual Machine
       Now Gcc, Linux, QEMU, Android, …
   Blogs
       http://d.hatena.ne.jp/embedded/ (Personal)
       http://blog.kmckk.com/ (Corporate)
   Twitter
       @tetsu_koba
                       Kyoto Microcomputer Co., Ltd.   3
Today's topic

   What is QEMU
   Atoms vs Bits
   QEMU is NOT good for …
   QEMU is GOOD for …
   Practices (from KMC blog)





           Kyoto Microcomputer Co., Ltd.   4
About QEMU

   http://wiki.qemu.org/
   QEMU is
    a generic and open source
    machine emulator
    and virtualizer.



                     Kyoto Microcomputer Co., Ltd.   5
QEMU is used …

   As virtualizer,
       KVM
       Xen
       VirtualBox
   Host CPU == Target CPU
       Today I don't focus on this.



                        Kyoto Microcomputer Co., Ltd.   6
QEMU is used …

   As a system emulator,
   Host CPU != Target CPU
   Many open source projects such as:
       Android
       Maemo
       Symbian
       ARM port of Open Solaris
        ...
                       Kyoto Microcomputer Co., Ltd.   7
QEMU has …

   Virtual disk.
   Many of virtual devices.
   Tiny Code Generator (TCG) to execute fast.
   Port redirector, Virtual network card.
   Bootloader to boot Linux kernel.
   gdbserver to connect gdb.
   ...

                     Kyoto Microcomputer Co., Ltd.   8
QEMU is *NOT* …

   Cycle accurate simulator (which is
    usually used for H/W development).
   So QEMU is not good for developing device
    driver which have to take account of accurate
    cycles.




                    Kyoto Microcomputer Co., Ltd.   9
License

   The whole QEMU is GPL.
   The QEMU virtual CPU core library (libqemu.a)
    is LGPL.
   TCG is BSD like license.
   Each virtual hardware has their own license.
       Check the source file.
   QEMU is a trademark of Fabrice Bellard.


                        Kyoto Microcomputer Co., Ltd.   10
Atoms vs Bits

   Developing embedded system require real
    system (= the physical board).
       Because the GOAL is there.



   System emulator is good complement for it.



   System emulator is 'bits', so free from any
    physical limitation.
   I mention QEMU for the system emulator.
                      Kyoto Microcomputer Co., Ltd.   11
How to get

   The physical board needs money to buy.
       Some special board can not buy because of dis-
        continue.



   QEMU does not need any money to get.




                       Kyoto Microcomputer Co., Ltd.     12
Footprint

   The physical board needs space to put.
       No space for a dozen of boards on your desk.



   QEMU does not need any desk space.
       (but disk space.)




                       Kyoto Microcomputer Co., Ltd.   13
Portability (in Physical)

   Bring the physical board and set it up is a work.
       The board might be crash in trouble.



   You are happy to bring QEMU in your USB key.
   Or you can transfer it via broad band network.




                       Kyoto Microcomputer Co., Ltd.   14
Duplication & Distribution

   The physical board can not be duplicate.



   You can duplicate your QEMU as many as you
    like and distribute them.
       You might ask for experts to take a look your
        problem on QEMU.




                        Kyoto Microcomputer Co., Ltd.   15
QEMU is *NOT* good for

   Performance evaluation.
   Especially SMP mode.
       SMP is simulated in single thread, not parallel.
       Deadly slow.
   Interesting session about QEMU multi core
       Japan Technical Jamboree24, Dec 2008
       CELF_JTJ24_qemu-multicore_English.pdf
       http://tree.celinuxforum.org/CelfPubWiki/JapanTechnicalJamboree24


                             Kyoto Microcomputer Co., Ltd.                  16
QEMU is *NOT* good for

   developing a device driver for a
    *NEW* device.
       Before, you need the accurate virtual device for the
        device.
       You have to develop a device driver with REAL
        device at first. Then you can develop virtual device
        with the device driver.




                        Kyoto Microcomputer Co., Ltd.          17
QEMU is *NOT* good for

   Compiling a huge mount of source
    code.
       Too slow for compiling.
       It takes more than one night to compile Linux
        kernel.




                        Kyoto Microcomputer Co., Ltd.   18
QEMU is GOOD for

   Learning.
       Even if you tweak too much to break, you lose
        nothing.
       Not only for beginners. Experts may examine the
        latest Linux kernel except for x86/x86_64, using
        QEMU.




                       Kyoto Microcomputer Co., Ltd.       19
QEMU is GOOD for

   Developing applications.
       without the real system.
       Android SDK is a perfect example.
   also good for designers to evaluate UI.




                        Kyoto Microcomputer Co., Ltd.   20
QEMU is GOOD for

   Testing.
       Fault injection by the virtual device.
       You can duplicate as many as you like and test
        them in parallel.
       Still need testing on real system.




                         Kyoto Microcomputer Co., Ltd.   21
Practice #1

       Following blog pages are written in Japanese. Try
        machine translation such as Google. It will work.
   Building QEMU from source archive
       QEMU requires zlib and SDL to build.
       http://blog.kmckk.com/archives/2223793.html
   Net-installing Debian on QEMU
       Don't use obsolete installer.
       http://blog.kmckk.com/archives/2233167.html

                       Kyoto Microcomputer Co., Ltd.        22
Practice #2

   Rebuilding kernel from Debian source package
       Get the source package and extract and patch it on
        ARM QEMU.
       Do compiling on PC Linux.
       QEMU system emulator is too slow to compile
        kernel.
       http://blog.kmckk.com/archives/2237994.html
Practice #3

   How to setup NFS server for QEMU
       Need ”insecure” option for NFS because QEMU
        redirect NFS port.
       http://blog.kmckk.com/archives/2257952.html




                       Kyoto Microcomputer Co., Ltd.   24
Practice #4

   Booting Debian in NFS root on ARM QEMU
       Booting from NFS root is good for early-stage
        developing.
                   You can read/write target file system any time.
                   You can boot kernel before implementing storage
                     device.
                   You don't have to care about size of storage.
       http://blog.kmckk.com/archives/2257962.html
Practice #5

   Build latest kernel in kernel.org and try SMP
    mode
       Finally the latest kernel successfully ran.
       versatile_defconfig remains old. It need updated.
       You can try another virtual board easily on QEMU.
       SMP implementation of QEMU is just simple and
        can not run fast.
       http://blog.kmckk.com/archives/2333826.html
Practice #6

   Try ARM Ubuntu using QEMU
       Ubuntu 9.04 is built for ARMv5TE.
       Ubuntu 9.10, ARMv6.
       Ubuntu 10.04, ARMv7 Thumb2.
       Debian, ARMv4T
       Rootstock script is nice and easy to build Ubuntu
        root file system.
       http://blog.kmckk.com/archives/2339128.html
Practice #7

   Using debugger with QEMU
       Dive into QEMU itself using gdb.
       Connect gdb to target machine of QEMU.
       Debug both the target and QEMU itself using 2
        gdbs.
       Another debugger for QEMU.
       http://blog.kmckk.com/archives/2363473.html
Other topics

   TCG and QEMU internals
       http://blog.kmckk.com/archives/2067157.html
       http://blog.kmckk.com/archives/2067178.html
       http://blog.kmckk.com/archives/2067210.html
   Using user mode emulation of QEMU + binfmt
    + chroot to self-build
       http://blog.kmckk.com/archives/2342452.html



                       Kyoto Microcomputer Co., Ltd.   29
Q&A

   & Demo




      Thank you for listening!
      Any comments to blogs are welcome.
                 Kyoto Microcomputer Co., Ltd.   30
One more thing ...




KMC PARTNER debugger for QEMU
Breaking at do_execve in linux kernel running on Android emulator.


                    Kyoto Microcomputer Co., Ltd.                    31

Weitere ähnliche Inhalte

Was ist angesagt?

Embedded Linux Quick Start Guide v1.5
Embedded Linux Quick Start Guide v1.5Embedded Linux Quick Start Guide v1.5
Embedded Linux Quick Start Guide v1.5Chris Simmonds
 
Software update for embedded systems - elce2014
Software update for embedded systems - elce2014Software update for embedded systems - elce2014
Software update for embedded systems - elce2014Stefano Babic
 
Run Qt on Linux embedded systems using Yocto
Run Qt on Linux embedded systems using YoctoRun Qt on Linux embedded systems using Yocto
Run Qt on Linux embedded systems using YoctoMarco Cavallini
 
Dave Gilbert - KVM and QEMU
Dave Gilbert - KVM and QEMUDave Gilbert - KVM and QEMU
Dave Gilbert - KVM and QEMUDanny Abukalam
 
Audio in linux embedded
Audio in linux embeddedAudio in linux embedded
Audio in linux embeddedtrx2001
 
20111015 勉強会 (PCIe / SR-IOV)
20111015 勉強会 (PCIe / SR-IOV)20111015 勉強会 (PCIe / SR-IOV)
20111015 勉強会 (PCIe / SR-IOV)Kentaro Ebisawa
 
Learn how to addressing medical and industrial challenges with BlackBerry QNX...
Learn how to addressing medical and industrial challenges with BlackBerry QNX...Learn how to addressing medical and industrial challenges with BlackBerry QNX...
Learn how to addressing medical and industrial challenges with BlackBerry QNX...Qt
 
Scheduling in Android
Scheduling in AndroidScheduling in Android
Scheduling in AndroidOpersys inc.
 
HSA Design (2015-04-30)
HSA Design (2015-04-30)HSA Design (2015-04-30)
HSA Design (2015-04-30)Jay Wang
 
超激安WinタブレットにLinuxを入れて 賢く経済的にリサイクルしよう in 2018 #oscnagoya
超激安WinタブレットにLinuxを入れて 賢く経済的にリサイクルしよう in 2018 #oscnagoya 超激安WinタブレットにLinuxを入れて 賢く経済的にリサイクルしよう in 2018 #oscnagoya
超激安WinタブレットにLinuxを入れて 賢く経済的にリサイクルしよう in 2018 #oscnagoya Netwalker lab kapper
 
[D20] 高速Software Switch/Router 開発から得られた高性能ソフトウェアルータ・スイッチ活用の知見 (July Tech Fest...
[D20] 高速Software Switch/Router 開発から得られた高性能ソフトウェアルータ・スイッチ活用の知見 (July Tech Fest...[D20] 高速Software Switch/Router 開発から得られた高性能ソフトウェアルータ・スイッチ活用の知見 (July Tech Fest...
[D20] 高速Software Switch/Router 開発から得られた高性能ソフトウェアルータ・スイッチ活用の知見 (July Tech Fest...Tomoya Hibi
 
How to Choose a Software Update Mechanism for Embedded Linux Devices
How to Choose a Software Update Mechanism for Embedded Linux DevicesHow to Choose a Software Update Mechanism for Embedded Linux Devices
How to Choose a Software Update Mechanism for Embedded Linux DevicesLeon Anavi
 
CXL_説明_公開用.pdf
CXL_説明_公開用.pdfCXL_説明_公開用.pdf
CXL_説明_公開用.pdfYasunori Goto
 
Yet another introduction to Linux RCU
Yet another introduction to Linux RCUYet another introduction to Linux RCU
Yet another introduction to Linux RCUViller Hsiao
 
Linux Preempt-RT Internals
Linux Preempt-RT InternalsLinux Preempt-RT Internals
Linux Preempt-RT Internals哲豪 康哲豪
 
LISA2019 Linux Systems Performance
LISA2019 Linux Systems PerformanceLISA2019 Linux Systems Performance
LISA2019 Linux Systems PerformanceBrendan Gregg
 
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 driversHoucheng Lin
 

Was ist angesagt? (20)

Embedded Linux Quick Start Guide v1.5
Embedded Linux Quick Start Guide v1.5Embedded Linux Quick Start Guide v1.5
Embedded Linux Quick Start Guide v1.5
 
Software update for embedded systems - elce2014
Software update for embedded systems - elce2014Software update for embedded systems - elce2014
Software update for embedded systems - elce2014
 
Yocto project
Yocto projectYocto project
Yocto project
 
Run Qt on Linux embedded systems using Yocto
Run Qt on Linux embedded systems using YoctoRun Qt on Linux embedded systems using Yocto
Run Qt on Linux embedded systems using Yocto
 
Dave Gilbert - KVM and QEMU
Dave Gilbert - KVM and QEMUDave Gilbert - KVM and QEMU
Dave Gilbert - KVM and QEMU
 
QEMU in Cross building
QEMU in Cross buildingQEMU in Cross building
QEMU in Cross building
 
Audio in linux embedded
Audio in linux embeddedAudio in linux embedded
Audio in linux embedded
 
20111015 勉強会 (PCIe / SR-IOV)
20111015 勉強会 (PCIe / SR-IOV)20111015 勉強会 (PCIe / SR-IOV)
20111015 勉強会 (PCIe / SR-IOV)
 
Learn how to addressing medical and industrial challenges with BlackBerry QNX...
Learn how to addressing medical and industrial challenges with BlackBerry QNX...Learn how to addressing medical and industrial challenges with BlackBerry QNX...
Learn how to addressing medical and industrial challenges with BlackBerry QNX...
 
Scheduling in Android
Scheduling in AndroidScheduling in Android
Scheduling in Android
 
HSA Design (2015-04-30)
HSA Design (2015-04-30)HSA Design (2015-04-30)
HSA Design (2015-04-30)
 
超激安WinタブレットにLinuxを入れて 賢く経済的にリサイクルしよう in 2018 #oscnagoya
超激安WinタブレットにLinuxを入れて 賢く経済的にリサイクルしよう in 2018 #oscnagoya 超激安WinタブレットにLinuxを入れて 賢く経済的にリサイクルしよう in 2018 #oscnagoya
超激安WinタブレットにLinuxを入れて 賢く経済的にリサイクルしよう in 2018 #oscnagoya
 
[D20] 高速Software Switch/Router 開発から得られた高性能ソフトウェアルータ・スイッチ活用の知見 (July Tech Fest...
[D20] 高速Software Switch/Router 開発から得られた高性能ソフトウェアルータ・スイッチ活用の知見 (July Tech Fest...[D20] 高速Software Switch/Router 開発から得られた高性能ソフトウェアルータ・スイッチ活用の知見 (July Tech Fest...
[D20] 高速Software Switch/Router 開発から得られた高性能ソフトウェアルータ・スイッチ活用の知見 (July Tech Fest...
 
How to Choose a Software Update Mechanism for Embedded Linux Devices
How to Choose a Software Update Mechanism for Embedded Linux DevicesHow to Choose a Software Update Mechanism for Embedded Linux Devices
How to Choose a Software Update Mechanism for Embedded Linux Devices
 
CXL_説明_公開用.pdf
CXL_説明_公開用.pdfCXL_説明_公開用.pdf
CXL_説明_公開用.pdf
 
Yet another introduction to Linux RCU
Yet another introduction to Linux RCUYet another introduction to Linux RCU
Yet another introduction to Linux RCU
 
Linux Preempt-RT Internals
Linux Preempt-RT InternalsLinux Preempt-RT Internals
Linux Preempt-RT Internals
 
LISA2019 Linux Systems Performance
LISA2019 Linux Systems PerformanceLISA2019 Linux Systems Performance
LISA2019 Linux Systems Performance
 
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
 
Qemu
QemuQemu
Qemu
 

Andere mochten auch

Andere mochten auch (11)

From printk to QEMU: Xen/Linux Kernel debugging
From printk to QEMU: Xen/Linux Kernel debuggingFrom printk to QEMU: Xen/Linux Kernel debugging
From printk to QEMU: Xen/Linux Kernel debugging
 
Android ipm 20110409
Android ipm 20110409Android ipm 20110409
Android ipm 20110409
 
Tricky implementation of Go ARM soft float
Tricky implementation of Go ARM soft floatTricky implementation of Go ARM soft float
Tricky implementation of Go ARM soft float
 
Android On Ubuntu for developer
Android On Ubuntu for developerAndroid On Ubuntu for developer
Android On Ubuntu for developer
 
Logging system of Android
Logging system of AndroidLogging system of Android
Logging system of Android
 
Froyo DalvikVM JIT
Froyo DalvikVM JITFroyo DalvikVM JIT
Froyo DalvikVM JIT
 
Reusing your existing software on Android
Reusing your existing software on AndroidReusing your existing software on Android
Reusing your existing software on Android
 
Tips of Malloc & Free
Tips of Malloc & FreeTips of Malloc & Free
Tips of Malloc & Free
 
Logging system of Android
Logging system of AndroidLogging system of Android
Logging system of Android
 
Basic of virtual memory of Linux
Basic of virtual memory of LinuxBasic of virtual memory of Linux
Basic of virtual memory of Linux
 
ADB(Android Debug Bridge): How it works?
ADB(Android Debug Bridge): How it works?ADB(Android Debug Bridge): How it works?
ADB(Android Debug Bridge): How it works?
 

Ähnlich wie Using QEMU for cross development

Improving User Experience with Ubiquitous QuickBoot
 Improving User Experience with Ubiquitous QuickBoot Improving User Experience with Ubiquitous QuickBoot
Improving User Experience with Ubiquitous QuickBootICS
 
Improving MeeGo boot-up time
Improving MeeGo boot-up timeImproving MeeGo boot-up time
Improving MeeGo boot-up timeHiroshi Doyu
 
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMU
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMUSFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMU
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMULinaro
 
”Bare-Metal Container" presented at HPCC2016
”Bare-Metal Container" presented at HPCC2016”Bare-Metal Container" presented at HPCC2016
”Bare-Metal Container" presented at HPCC2016Kuniyasu Suzaki
 
Status of AEM for Intel and AMD
Status of AEM for Intel and AMDStatus of AEM for Intel and AMD
Status of AEM for Intel and AMDPiotr Król
 
The Yocto Project
The Yocto ProjectThe Yocto Project
The Yocto Projectrossburton
 
Getting started with LinuxBoot Firmware on AArch64 Server
Getting started with LinuxBoot Firmware on AArch64 Server Getting started with LinuxBoot Firmware on AArch64 Server
Getting started with LinuxBoot Firmware on AArch64 Server Naohiro Tamura
 
Reducing boot time in embedded Linux
Reducing boot time in embedded LinuxReducing boot time in embedded Linux
Reducing boot time in embedded LinuxChris Simmonds
 
Reducing the boot time of Linux devices
Reducing the boot time of Linux devicesReducing the boot time of Linux devices
Reducing the boot time of Linux devicesChris Simmonds
 
ChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPadChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPadAndrewWright224
 
TI TechDays 2010: swiftBoot
TI TechDays 2010: swiftBootTI TechDays 2010: swiftBoot
TI TechDays 2010: swiftBootandrewmurraympc
 
ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220AndrewWright224
 
Krenel Based Virtual Machine In Centos7
Krenel Based Virtual Machine In Centos7Krenel Based Virtual Machine In Centos7
Krenel Based Virtual Machine In Centos7a_ratra
 
Containerize your Blackbox tests
Containerize your Blackbox testsContainerize your Blackbox tests
Containerize your Blackbox testsKevin Beeman
 
Custum GNU/Linux Kali distribution
Custum GNU/Linux Kali distribution Custum GNU/Linux Kali distribution
Custum GNU/Linux Kali distribution Mohamed BENCHENOUF
 

Ähnlich wie Using QEMU for cross development (20)

Improving User Experience with Ubiquitous QuickBoot
 Improving User Experience with Ubiquitous QuickBoot Improving User Experience with Ubiquitous QuickBoot
Improving User Experience with Ubiquitous QuickBoot
 
Improving MeeGo boot-up time
Improving MeeGo boot-up timeImproving MeeGo boot-up time
Improving MeeGo boot-up time
 
The Andc Cluster
The Andc ClusterThe Andc Cluster
The Andc Cluster
 
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMU
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMUSFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMU
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMU
 
MIPS-X
MIPS-XMIPS-X
MIPS-X
 
”Bare-Metal Container" presented at HPCC2016
”Bare-Metal Container" presented at HPCC2016”Bare-Metal Container" presented at HPCC2016
”Bare-Metal Container" presented at HPCC2016
 
Status of AEM for Intel and AMD
Status of AEM for Intel and AMDStatus of AEM for Intel and AMD
Status of AEM for Intel and AMD
 
The Yocto Project
The Yocto ProjectThe Yocto Project
The Yocto Project
 
Getting started with LinuxBoot Firmware on AArch64 Server
Getting started with LinuxBoot Firmware on AArch64 Server Getting started with LinuxBoot Firmware on AArch64 Server
Getting started with LinuxBoot Firmware on AArch64 Server
 
Reducing boot time in embedded Linux
Reducing boot time in embedded LinuxReducing boot time in embedded Linux
Reducing boot time in embedded Linux
 
Tweaking Google TV emulator
Tweaking Google TV emulatorTweaking Google TV emulator
Tweaking Google TV emulator
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Reducing the boot time of Linux devices
Reducing the boot time of Linux devicesReducing the boot time of Linux devices
Reducing the boot time of Linux devices
 
ChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPadChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPad
 
TI TechDays 2010: swiftBoot
TI TechDays 2010: swiftBootTI TechDays 2010: swiftBoot
TI TechDays 2010: swiftBoot
 
ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220
 
Krenel Based Virtual Machine In Centos7
Krenel Based Virtual Machine In Centos7Krenel Based Virtual Machine In Centos7
Krenel Based Virtual Machine In Centos7
 
BeagleBone Black Booting Process
BeagleBone Black Booting ProcessBeagleBone Black Booting Process
BeagleBone Black Booting Process
 
Containerize your Blackbox tests
Containerize your Blackbox testsContainerize your Blackbox tests
Containerize your Blackbox tests
 
Custum GNU/Linux Kali distribution
Custum GNU/Linux Kali distribution Custum GNU/Linux Kali distribution
Custum GNU/Linux Kali distribution
 

Mehr von Tetsuyuki Kobayashi

Try new transport protocol SRT (ver. 2)
Try new transport protocol SRT  (ver. 2)Try new transport protocol SRT  (ver. 2)
Try new transport protocol SRT (ver. 2)Tetsuyuki Kobayashi
 
Raspberry Pi Zero とカメラモジュールで作るライブ配信実験機
Raspberry Pi Zero とカメラモジュールで作るライブ配信実験機Raspberry Pi Zero とカメラモジュールで作るライブ配信実験機
Raspberry Pi Zero とカメラモジュールで作るライブ配信実験機Tetsuyuki Kobayashi
 
WebOS Open Source Edition を試してみた
WebOS Open Source Edition を試してみたWebOS Open Source Edition を試してみた
WebOS Open Source Edition を試してみたTetsuyuki Kobayashi
 
Linuxのユーザーランドをinitから全てまるごとgolangで書く
Linuxのユーザーランドをinitから全てまるごとgolangで書くLinuxのユーザーランドをinitから全てまるごとgolangで書く
Linuxのユーザーランドをinitから全てまるごとgolangで書くTetsuyuki Kobayashi
 
組み込みLinuxでのGolangのススメ(Go con版)
組み込みLinuxでのGolangのススメ(Go con版)組み込みLinuxでのGolangのススメ(Go con版)
組み込みLinuxでのGolangのススメ(Go con版)Tetsuyuki Kobayashi
 
組み込みLinuxでのGolangのススメ
組み込みLinuxでのGolangのススメ組み込みLinuxでのGolangのススメ
組み込みLinuxでのGolangのススメTetsuyuki Kobayashi
 
Simple and efficient way to get the last log using MMAP
Simple and efficient way to get the last log using MMAPSimple and efficient way to get the last log using MMAP
Simple and efficient way to get the last log using MMAPTetsuyuki Kobayashi
 
Inter-process communication of Android
Inter-process communication of AndroidInter-process communication of Android
Inter-process communication of AndroidTetsuyuki Kobayashi
 
Android is NOT just 'Java on Linux'
Android is NOT just 'Java on Linux'Android is NOT just 'Java on Linux'
Android is NOT just 'Java on Linux'Tetsuyuki Kobayashi
 

Mehr von Tetsuyuki Kobayashi (18)

some topic of ffmpeg
some topic of ffmpeg some topic of ffmpeg
some topic of ffmpeg
 
New VIdeo CODEC AV1
New VIdeo CODEC AV1 New VIdeo CODEC AV1
New VIdeo CODEC AV1
 
Try new transport protocol SRT (ver. 2)
Try new transport protocol SRT  (ver. 2)Try new transport protocol SRT  (ver. 2)
Try new transport protocol SRT (ver. 2)
 
Try new transport protocol SRT
Try new transport protocol SRTTry new transport protocol SRT
Try new transport protocol SRT
 
Raspberry Pi Zero とカメラモジュールで作るライブ配信実験機
Raspberry Pi Zero とカメラモジュールで作るライブ配信実験機Raspberry Pi Zero とカメラモジュールで作るライブ配信実験機
Raspberry Pi Zero とカメラモジュールで作るライブ配信実験機
 
WebOS Open Source Edition を試してみた
WebOS Open Source Edition を試してみたWebOS Open Source Edition を試してみた
WebOS Open Source Edition を試してみた
 
Linuxのユーザーランドをinitから全てまるごとgolangで書く
Linuxのユーザーランドをinitから全てまるごとgolangで書くLinuxのユーザーランドをinitから全てまるごとgolangで書く
Linuxのユーザーランドをinitから全てまるごとgolangで書く
 
組み込みLinuxでのGolangのススメ(Go con版)
組み込みLinuxでのGolangのススメ(Go con版)組み込みLinuxでのGolangのススメ(Go con版)
組み込みLinuxでのGolangのススメ(Go con版)
 
組み込みLinuxでのGolangのススメ
組み込みLinuxでのGolangのススメ組み込みLinuxでのGolangのススメ
組み込みLinuxでのGolangのススメ
 
ARM 64bit has come!
ARM 64bit has come!ARM 64bit has come!
ARM 64bit has come!
 
Virtual memory 20070222-en
Virtual memory 20070222-enVirtual memory 20070222-en
Virtual memory 20070222-en
 
Simple and efficient way to get the last log using MMAP
Simple and efficient way to get the last log using MMAPSimple and efficient way to get the last log using MMAP
Simple and efficient way to get the last log using MMAP
 
Patch101
Patch101Patch101
Patch101
 
Inter-process communication of Android
Inter-process communication of AndroidInter-process communication of Android
Inter-process communication of Android
 
Android is NOT just 'Java on Linux'
Android is NOT just 'Java on Linux'Android is NOT just 'Java on Linux'
Android is NOT just 'Java on Linux'
 
Init of Android
Init of AndroidInit of Android
Init of Android
 
Let's play with Goldfish
Let's play with GoldfishLet's play with Goldfish
Let's play with Goldfish
 
Opensource Android
Opensource AndroidOpensource Android
Opensource Android
 

Kürzlich hochgeladen

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 

Kürzlich hochgeladen (20)

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

Using QEMU for cross development

  • 1. Using QEMU for Cross Development Tetsuyuki Kobayashi Kyoto Microcomputer Co., Ltd. 1
  • 2. Let's use QEMU to boost your project Real system : System emulator = Atoms : Bits This is what I impress today. Take advantage of 'bits'! Kyoto Microcomputer Co., Ltd. 2 ”Being Digital” by Nicholas Negroponte http://archives.obs-us.com/obs/english/books/nn/ch01c01.htm
  • 3. Who am I?  20+ years involved in embedded systems  10 years in real time OS, such as iTRON  10 years in embedded Java Virtual Machine  Now Gcc, Linux, QEMU, Android, …  Blogs  http://d.hatena.ne.jp/embedded/ (Personal)  http://blog.kmckk.com/ (Corporate)  Twitter  @tetsu_koba Kyoto Microcomputer Co., Ltd. 3
  • 4. Today's topic  What is QEMU  Atoms vs Bits  QEMU is NOT good for …  QEMU is GOOD for …  Practices (from KMC blog)  Kyoto Microcomputer Co., Ltd. 4
  • 5. About QEMU  http://wiki.qemu.org/  QEMU is a generic and open source machine emulator and virtualizer. Kyoto Microcomputer Co., Ltd. 5
  • 6. QEMU is used …  As virtualizer,  KVM  Xen  VirtualBox  Host CPU == Target CPU  Today I don't focus on this. Kyoto Microcomputer Co., Ltd. 6
  • 7. QEMU is used …  As a system emulator,  Host CPU != Target CPU  Many open source projects such as:  Android  Maemo  Symbian  ARM port of Open Solaris  ... Kyoto Microcomputer Co., Ltd. 7
  • 8. QEMU has …  Virtual disk.  Many of virtual devices.  Tiny Code Generator (TCG) to execute fast.  Port redirector, Virtual network card.  Bootloader to boot Linux kernel.  gdbserver to connect gdb.  ... Kyoto Microcomputer Co., Ltd. 8
  • 9. QEMU is *NOT* …  Cycle accurate simulator (which is usually used for H/W development).  So QEMU is not good for developing device driver which have to take account of accurate cycles. Kyoto Microcomputer Co., Ltd. 9
  • 10. License  The whole QEMU is GPL.  The QEMU virtual CPU core library (libqemu.a) is LGPL.  TCG is BSD like license.  Each virtual hardware has their own license.  Check the source file.  QEMU is a trademark of Fabrice Bellard. Kyoto Microcomputer Co., Ltd. 10
  • 11. Atoms vs Bits  Developing embedded system require real system (= the physical board).  Because the GOAL is there.   System emulator is good complement for it.   System emulator is 'bits', so free from any physical limitation.  I mention QEMU for the system emulator. Kyoto Microcomputer Co., Ltd. 11
  • 12. How to get  The physical board needs money to buy.  Some special board can not buy because of dis- continue.   QEMU does not need any money to get. Kyoto Microcomputer Co., Ltd. 12
  • 13. Footprint  The physical board needs space to put.  No space for a dozen of boards on your desk.   QEMU does not need any desk space.  (but disk space.) Kyoto Microcomputer Co., Ltd. 13
  • 14. Portability (in Physical)  Bring the physical board and set it up is a work.  The board might be crash in trouble.   You are happy to bring QEMU in your USB key.  Or you can transfer it via broad band network. Kyoto Microcomputer Co., Ltd. 14
  • 15. Duplication & Distribution  The physical board can not be duplicate.   You can duplicate your QEMU as many as you like and distribute them.  You might ask for experts to take a look your problem on QEMU. Kyoto Microcomputer Co., Ltd. 15
  • 16. QEMU is *NOT* good for  Performance evaluation.  Especially SMP mode.  SMP is simulated in single thread, not parallel.  Deadly slow.  Interesting session about QEMU multi core  Japan Technical Jamboree24, Dec 2008  CELF_JTJ24_qemu-multicore_English.pdf  http://tree.celinuxforum.org/CelfPubWiki/JapanTechnicalJamboree24 Kyoto Microcomputer Co., Ltd. 16
  • 17. QEMU is *NOT* good for  developing a device driver for a *NEW* device.  Before, you need the accurate virtual device for the device.  You have to develop a device driver with REAL device at first. Then you can develop virtual device with the device driver. Kyoto Microcomputer Co., Ltd. 17
  • 18. QEMU is *NOT* good for  Compiling a huge mount of source code.  Too slow for compiling.  It takes more than one night to compile Linux kernel. Kyoto Microcomputer Co., Ltd. 18
  • 19. QEMU is GOOD for  Learning.  Even if you tweak too much to break, you lose nothing.  Not only for beginners. Experts may examine the latest Linux kernel except for x86/x86_64, using QEMU. Kyoto Microcomputer Co., Ltd. 19
  • 20. QEMU is GOOD for  Developing applications.  without the real system.  Android SDK is a perfect example.  also good for designers to evaluate UI. Kyoto Microcomputer Co., Ltd. 20
  • 21. QEMU is GOOD for  Testing.  Fault injection by the virtual device.  You can duplicate as many as you like and test them in parallel.  Still need testing on real system. Kyoto Microcomputer Co., Ltd. 21
  • 22. Practice #1  Following blog pages are written in Japanese. Try machine translation such as Google. It will work.  Building QEMU from source archive  QEMU requires zlib and SDL to build.  http://blog.kmckk.com/archives/2223793.html  Net-installing Debian on QEMU  Don't use obsolete installer.  http://blog.kmckk.com/archives/2233167.html Kyoto Microcomputer Co., Ltd. 22
  • 23. Practice #2  Rebuilding kernel from Debian source package  Get the source package and extract and patch it on ARM QEMU.  Do compiling on PC Linux.  QEMU system emulator is too slow to compile kernel.  http://blog.kmckk.com/archives/2237994.html
  • 24. Practice #3  How to setup NFS server for QEMU  Need ”insecure” option for NFS because QEMU redirect NFS port.  http://blog.kmckk.com/archives/2257952.html Kyoto Microcomputer Co., Ltd. 24
  • 25. Practice #4  Booting Debian in NFS root on ARM QEMU  Booting from NFS root is good for early-stage developing.  You can read/write target file system any time.  You can boot kernel before implementing storage device.  You don't have to care about size of storage.  http://blog.kmckk.com/archives/2257962.html
  • 26. Practice #5  Build latest kernel in kernel.org and try SMP mode  Finally the latest kernel successfully ran.  versatile_defconfig remains old. It need updated.  You can try another virtual board easily on QEMU.  SMP implementation of QEMU is just simple and can not run fast.  http://blog.kmckk.com/archives/2333826.html
  • 27. Practice #6  Try ARM Ubuntu using QEMU  Ubuntu 9.04 is built for ARMv5TE.  Ubuntu 9.10, ARMv6.  Ubuntu 10.04, ARMv7 Thumb2.  Debian, ARMv4T  Rootstock script is nice and easy to build Ubuntu root file system.  http://blog.kmckk.com/archives/2339128.html
  • 28. Practice #7  Using debugger with QEMU  Dive into QEMU itself using gdb.  Connect gdb to target machine of QEMU.  Debug both the target and QEMU itself using 2 gdbs.  Another debugger for QEMU.  http://blog.kmckk.com/archives/2363473.html
  • 29. Other topics  TCG and QEMU internals  http://blog.kmckk.com/archives/2067157.html  http://blog.kmckk.com/archives/2067178.html  http://blog.kmckk.com/archives/2067210.html  Using user mode emulation of QEMU + binfmt + chroot to self-build  http://blog.kmckk.com/archives/2342452.html Kyoto Microcomputer Co., Ltd. 29
  • 30. Q&A  & Demo Thank you for listening! Any comments to blogs are welcome. Kyoto Microcomputer Co., Ltd. 30
  • 31. One more thing ... KMC PARTNER debugger for QEMU Breaking at do_execve in linux kernel running on Android emulator. Kyoto Microcomputer Co., Ltd. 31