SlideShare ist ein Scribd-Unternehmen logo
1 von 47
Downloaden Sie, um offline zu lesen
Develop Your Own Operating
Systems using Cheap ARM
Boards

Jim Huang ( 黃敬群 ) <jserv@0xlab.org>
Jan 8, 2014 / NCTU, Taiwan
Rights to copy
© Copyright 2014 0xlab
http://0xlab.org/
Corrections, suggestions, contributions and translations
are welcome!

Attribution – ShareAlike 3.0
Latest update: Jan 14, 2014
You are free
to copy, distribute, display, and perform the work
to make derivative works
to make commercial use of the work
Under the following conditions
Attribution. You must give the original author credit.
Share Alike. If you alter, transform, or build upon this work, you may distribute the
resulting work only under a license identical to this one.
For any reuse or distribution, you must make clear to others the license terms of this work.
Any of these conditions can be waived if you get permission from the copyright holder.
Your fair use and other rights are in no way affected by the above.
License text: http://creativecommons.org/licenses/by-sa/3.0/legalcode
Goals of This Presentation
• Know the reasons why various operating systems exist
and how they are functioned for dedicated purposes
• Understand the basic concepts while building system
software from scratch
• How can we benefit from cheap ARM boards and the
related open source tools?
– Raspberry Pi & STM32F4-Discovery
Agenda
•
•
•
•

Yet another Operating System?
Embedded Operating System Designs
Cheap ARM boards
Development flow using open source technologies
Yet Another Operating Systems?
Reasons of Home-brew OS
• Escape from large-scale and uncertain code base
– Linux is a good example: Mature but hard to fit
everyone's need

• Exploit new systematic methods

– Hypervisor for virtualization, runtime isolation
– Heterogeneous computing for both performance and power
efficiency

• Customization

– Deeply embedded environments, security, education (xinu,
minix, xv6), domain-specific language/runtime, mobile
(OKL4; 1.5 billion shipment!)

• "Just for Fun" – Linus Torvalds
Techniques inspired by OS
• Even Web/Application Framework learn the
performance techniques from OS concepts.
• Virtualization
– Hypervisor, Resource Kernel (KVM), …
– Intel VT-d , ARM Cortex-A15/A7, ARMv8
• Security
– Dynamic tracing, analysis, and instrumentation
using VM
Statistics about Large-scale Systems
• Drivers cause 85% of Windows XP crashes.
– Michael M. Swift, Brian N. Bershad, Henry M. Levy:
“Improving the Reliability of Commodity Operating
Systems”, SOSP 2003
• Error rate in Linux drivers is 3x (maximum: 10x) higher
than for the rest of the kernel
– Life expectancy of a bug in the Linux kernel (~2.4):
1.8 years
– Andy Chou, Junfeng Yang, Benjamin Chelf, Seth
Hallem, Dawson R. Engler: “An Empirical Study of
Operating System Errors”, SOSP 2001
Some statistics
• Causes for driver bugs
– 23% programming error
– 38% mismatch regarding device specification
– 39% OS-driver-interface misconceptions
– Leonid Ryzhyk, Peter Chubb, Ihor Kuz and Gernot
Heiser: “Dingo: Taming device drivers”, EuroSys
2009
Anecdote: Linux e1000 NVRAM bug
• [Aug 8, 2008] Bug report: e1000 PCI-X network cards

rendered broken by Linux 2.6.27-rc
– overwritten NVRAM on card

• [Oct 1, 2008] Intel releases quickfix
– map NVRAM somewhere else
• [Oct 15, 2008] Reason found:
– dynamic ftrace framework tries to patch __init code, but .init
sections are unmapped after running init code
– NVRAM got mapped to same location
– scary cmpxchg() behavior on I/O memory
• [Nov 2, 2008] dynamic ftrace reworked for Linux

2.6.28-rc3
FTrace & NIC driver!
instrumentation vs. device driver
Linux Device Driver bugs

[Dingo: Taming device drivers, 2009]
Linux version 3.0
• consists of
– 7702 features
– 893 Kconfig files
– 31281 source files
– 88897 #ifdef blocks
Even worse...
Device Driver Model
Bugs in Linux Device Driver
Bugs in Linux Device Driver

Device protocol violation examples:
✗
Issuing a command to uninitialized device
✗
Writing an invalid register value
✗
Incorrectly managing DMA descriptors
Linux Device Driver Bug Portion
Bugs in Linux Device Driver

Mellanox Infinihost controller Driver
if(cur_state==IB_RESET &&
new_state==IB_RESET){
return 0;
}
Linux Device Driver Bug Portion
Concurrency errors
Further study about concurrency bugs
• Markus Peloquin, Lena Olson, Andrew Coonce,
University of Wisconsin–Madison, “Simultaneity Safari:
A Study of Concurrency Bugs in Device Drivers"
(2009)
• Types of Device Driver Bugs
Linux Device Driver Bug Portion
Embedded Operating System
Designs
IoT = I own Technologies, but...
• You can only use the devices, services, rights, etc.
without really owning them even if you buy the
“products" in higher price.
• Ecosystem is getting quite essential for applications.
Deeply Embedded Devices
• Power awareness; solid and limited applications
• Multi-tasking or cooperative scheduling is still required
• IoT (Internet of Things) is the specialized derivative
with networking facility
• Communication capability is built-in for some products
• Example: AIRO wristband (health tracker)
http://www.weweartech.com/amazing-new-uses-smart-watches/
Work at AcoMo: Physiological Inspection
• Analyze signals from various bio sensors and apply
efficient algorithms to examine the healthy condition
HRV Knows You
AcoMo built in-house OS for products and releases
the basic part as an open source effort

(invisible) Medical devices make sense in our life.
:: home-care :: advance warning :: security
Booting Process

Power On

PC

Embedded

BIOS

Power On

X-Loader
Get Bootloader

Get Bootloader

GRUB

U-Boot
Get Kernel

Kernel

Embedded hardware: TI OMAP3730 SoC

Get Kernel
Kernel
Embedded vs. PC
• Hardware specification is not the major difference!
– The functionality is.
• PCs are a highly modular platform. Most
components are in sockets or slots that permits
easy replacement.
• Embedded Systems tend to solder their
components directly to the PCB as they don’t
need to be replaced.
Embedded vs. PC
i7-930

i7-920

i7-940
i7-950

i7-965X

i7-960

i7-970

i7-980X
Embedded vs. PC

DDR3-2133
DDR3-1866
DDR3-1600
DDR3-1333
DDR3-1066
DDR3-800

Voltage
1.2-1.5v

Legacy
CS-RAS-CAS-WE
Embedded vs. PC

D i ff e r e n t P C I - E s t a n d a r d s
V1.0/v2.0/v3.0
D i ff e r e n t l a n e c o u n t s
x1/x2/x4/x8/x16
Also Legacy PCI support
Embedded vs. PC
USB 2.0
USB 3.0

Intel PCH

Gigabit Ethernet
7.1 Audio Codec
S-ATA
3 & 6Gbps
IDE & Floppy
Embedded vs. PC

TI OMAP 3730 Processor
512MB DDR@200MHz
PowerVR SGX530 Graphics
All soldered directly to the
board. Not intended for
replacements.
Booting Process
ROM Code

U-Boot
IPL
Startup
Kernel

X-Loader

U-Boot

Linux
Kernel

• On-Chip boot ROM code generally causes the CPU to
perform minimal initialization of peripheral such as
NAND Flash and instructs it to begin reading code from
there into memory and executing it.
• This code can be a standard embedded bootloader
such as U-Boot, or it can be an IPL.
• U-Boot loads the “IPL” image into memory, and begins
executing it.
• The “IPL” is an “Initial Program Loader” which is
responsible for initializing basic hardware and passing
control to “Startup” code, and subsequently the Kernel.

Embedded hardware: TI OMAP3730 SoC
IPL
•
•
•
•

Begin in assembly, performs initialization for HLL
Initialize CPU/(some) Peripheral Clocks
Initialize basic I/O (serial)
Minimal pin multiplexing for required peripherals
(i.e. SDHC hardware)

• Read in and decompresse “IFS” image (ramdisk +
kernel)

• Include basic (FAT) fi lesystem drivers for SDHC
reading
• Passes control to “Startup”
• Can start “minidrivers” for device interaction
before OS/Kernel even begins booting
Startup
• Startup begin in C language, initialize most
peripherals, and sets up important kernel
structures
• Kernel expects a “syspage” structure to exist at
a pre-defi ned location in memory. This structures
provides important information about the host
system.
• Enable CPU SMP operation (multiple-cores)
• Often re-do initialization done by IPL (such as
serial I/O) to enable more advanced functionality
• Inform minidrivers of new environment before
passing control to kernel.
System Information
• Indicate CPU type (e.g. ARM) and vital
information (e.g. number of cores), and other
supported features such as NEON extensions.
• Provide access to hardware-specifi c function
callouts made available to the system before the
Kernel was running
• Provide information about the memory
environment in which the kernel is running
• Information about bus devices, IRQs
• Information about connected peripherals and
device trees for /dev population
Cheap ARM Boards

check "Introduction to Raspberry Pi" by Computer
Science Club, University of Cyprus Student Clubs
Development flow using Open
Source Technologies
Baking Pi – Operating System
Development

• Operating Systems Development! Course by Alex
Chadwick. Version 1.0c (July 2013).

http://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/

• Divided into several basic “blocks".
JTAG
• Initially devised for testing printed circuit boards with
its boundary scanning functionality JTAG is now used
extensively for debugging, programming CPLDS and
initialising flash memory.
• Can be useful to recover bricked devices or write new
firmware to NAND on restricted devices. But the IGEP
is un-brickable
• Tools like OpenOCD and GDB ARM have successfully
been used on OMAP530 devices like Beagleboard.
Conclusion
• BYOD (Build Your Own Device) and BYOD (Build
Your Own Operating System) are feasible and getting
easier with open source technologies
• Domain specific applications always expect
innovations from various sources including the
customized kernel and userland
• System trial with very low cost
Reference
• “Dingo: Taming Device Drivers”, Leonid Ryzhyk, Peter Chubb,
Ihor Kuz, Gernot Heiser, UNSW/NICTA/Open Kernel Labs
(2009)
• "Hardware and Device Drivers", Björn Döbel, TU Dresden
(2012)
• "Configuration Coverage in the Analysis of Large-Scale System
Software", Reinhard Tartler, Daniel Lohmann, Christian Dietrich,
Christoph Egger, Julio Sincero, Friedrich-Alexander University
(2011)
• “AIRAC: A Static Analyzer for Detecting All Buffer Overrun
Errors in C Programs", Kwangkeun Yi, Seoul National University
(2005)
• “CCured: Taming C Pointers”, George Necula, Scott McPeak,
Wes Weimer, Berkeley (2002)
http://0xlab.org

Weitere ähnliche Inhalte

Was ist angesagt?

OPTEE on QEMU - Build Tutorial
OPTEE on QEMU - Build TutorialOPTEE on QEMU - Build Tutorial
OPTEE on QEMU - Build TutorialDalton Valadares
 
LCU14-103: How to create and run Trusted Applications on OP-TEE
LCU14-103: How to create and run Trusted Applications on OP-TEELCU14-103: How to create and run Trusted Applications on OP-TEE
LCU14-103: How to create and run Trusted Applications on OP-TEELinaro
 
Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)RuggedBoardGroup
 
LCU14 302- How to port OP-TEE to another platform
LCU14 302- How to port OP-TEE to another platformLCU14 302- How to port OP-TEE to another platform
LCU14 302- How to port OP-TEE to another platformLinaro
 
LAS16-402: ARM Trusted Firmware – from Enterprise to Embedded
LAS16-402: ARM Trusted Firmware – from Enterprise to EmbeddedLAS16-402: ARM Trusted Firmware – from Enterprise to Embedded
LAS16-402: ARM Trusted Firmware – from Enterprise to EmbeddedLinaro
 
LCA14: LCA14-502: The way to a generic TrustZone® solution
LCA14: LCA14-502: The way to a generic TrustZone® solutionLCA14: LCA14-502: The way to a generic TrustZone® solution
LCA14: LCA14-502: The way to a generic TrustZone® solutionLinaro
 
LCA14: LCA14-418: Testing a secure framework
LCA14: LCA14-418: Testing a secure frameworkLCA14: LCA14-418: Testing a secure framework
LCA14: LCA14-418: Testing a secure frameworkLinaro
 
Lcu14 107- op-tee on ar mv8
Lcu14 107- op-tee on ar mv8Lcu14 107- op-tee on ar mv8
Lcu14 107- op-tee on ar mv8Linaro
 
TFLite NNAPI and GPU Delegates
TFLite NNAPI and GPU DelegatesTFLite NNAPI and GPU Delegates
TFLite NNAPI and GPU DelegatesKoan-Sin Tan
 
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime RipardKernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime RipardAnne Nicolas
 
LCU13: An Introduction to ARM Trusted Firmware
LCU13: An Introduction to ARM Trusted FirmwareLCU13: An Introduction to ARM Trusted Firmware
LCU13: An Introduction to ARM Trusted FirmwareLinaro
 
Embedded Linux/ Debian with ARM64 Platform
Embedded Linux/ Debian with ARM64 PlatformEmbedded Linux/ Debian with ARM64 Platform
Embedded Linux/ Debian with ARM64 PlatformSZ Lin
 
SFO15-503: Secure storage in OP-TEE
SFO15-503: Secure storage in OP-TEESFO15-503: Secure storage in OP-TEE
SFO15-503: Secure storage in OP-TEELinaro
 
Deep learning: Hardware Landscape
Deep learning: Hardware LandscapeDeep learning: Hardware Landscape
Deep learning: Hardware LandscapeGrigory Sapunov
 
BKK16-110 A Gentle Introduction to Trusted Execution and OP-TEE
BKK16-110 A Gentle Introduction to Trusted Execution and OP-TEEBKK16-110 A Gentle Introduction to Trusted Execution and OP-TEE
BKK16-110 A Gentle Introduction to Trusted Execution and OP-TEELinaro
 
Shorten Device Boot Time for Automotive IVI and Navigation Systems
Shorten Device Boot Time for Automotive IVI and Navigation SystemsShorten Device Boot Time for Automotive IVI and Navigation Systems
Shorten Device Boot Time for Automotive IVI and Navigation SystemsNational Cheng Kung University
 

Was ist angesagt? (20)

OPTEE on QEMU - Build Tutorial
OPTEE on QEMU - Build TutorialOPTEE on QEMU - Build Tutorial
OPTEE on QEMU - Build Tutorial
 
LCU14-103: How to create and run Trusted Applications on OP-TEE
LCU14-103: How to create and run Trusted Applications on OP-TEELCU14-103: How to create and run Trusted Applications on OP-TEE
LCU14-103: How to create and run Trusted Applications on OP-TEE
 
Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)
 
LCU14 302- How to port OP-TEE to another platform
LCU14 302- How to port OP-TEE to another platformLCU14 302- How to port OP-TEE to another platform
LCU14 302- How to port OP-TEE to another platform
 
LAS16-402: ARM Trusted Firmware – from Enterprise to Embedded
LAS16-402: ARM Trusted Firmware – from Enterprise to EmbeddedLAS16-402: ARM Trusted Firmware – from Enterprise to Embedded
LAS16-402: ARM Trusted Firmware – from Enterprise to Embedded
 
LCA14: LCA14-502: The way to a generic TrustZone® solution
LCA14: LCA14-502: The way to a generic TrustZone® solutionLCA14: LCA14-502: The way to a generic TrustZone® solution
LCA14: LCA14-502: The way to a generic TrustZone® solution
 
Linux Device Driver’s
Linux Device Driver’sLinux Device Driver’s
Linux Device Driver’s
 
LCA14: LCA14-418: Testing a secure framework
LCA14: LCA14-418: Testing a secure frameworkLCA14: LCA14-418: Testing a secure framework
LCA14: LCA14-418: Testing a secure framework
 
Lcu14 107- op-tee on ar mv8
Lcu14 107- op-tee on ar mv8Lcu14 107- op-tee on ar mv8
Lcu14 107- op-tee on ar mv8
 
Qemu Introduction
Qemu IntroductionQemu Introduction
Qemu Introduction
 
TFLite NNAPI and GPU Delegates
TFLite NNAPI and GPU DelegatesTFLite NNAPI and GPU Delegates
TFLite NNAPI and GPU Delegates
 
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime RipardKernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
 
Embedded Linux on ARM
Embedded Linux on ARMEmbedded Linux on ARM
Embedded Linux on ARM
 
LCU13: An Introduction to ARM Trusted Firmware
LCU13: An Introduction to ARM Trusted FirmwareLCU13: An Introduction to ARM Trusted Firmware
LCU13: An Introduction to ARM Trusted Firmware
 
Embedded Linux/ Debian with ARM64 Platform
Embedded Linux/ Debian with ARM64 PlatformEmbedded Linux/ Debian with ARM64 Platform
Embedded Linux/ Debian with ARM64 Platform
 
SFO15-503: Secure storage in OP-TEE
SFO15-503: Secure storage in OP-TEESFO15-503: Secure storage in OP-TEE
SFO15-503: Secure storage in OP-TEE
 
Deep learning: Hardware Landscape
Deep learning: Hardware LandscapeDeep learning: Hardware Landscape
Deep learning: Hardware Landscape
 
Amd vs intel
Amd vs intelAmd vs intel
Amd vs intel
 
BKK16-110 A Gentle Introduction to Trusted Execution and OP-TEE
BKK16-110 A Gentle Introduction to Trusted Execution and OP-TEEBKK16-110 A Gentle Introduction to Trusted Execution and OP-TEE
BKK16-110 A Gentle Introduction to Trusted Execution and OP-TEE
 
Shorten Device Boot Time for Automotive IVI and Navigation Systems
Shorten Device Boot Time for Automotive IVI and Navigation SystemsShorten Device Boot Time for Automotive IVI and Navigation Systems
Shorten Device Boot Time for Automotive IVI and Navigation Systems
 

Andere mochten auch

中輟生談教育: 完全用開放原始碼軟體進行 嵌入式系統教學
中輟生談教育: 完全用開放原始碼軟體進行 嵌入式系統教學中輟生談教育: 完全用開放原始碼軟體進行 嵌入式系統教學
中輟生談教育: 完全用開放原始碼軟體進行 嵌入式系統教學National Cheng Kung University
 
進階嵌入式系統開發與實做 (2014 年秋季 ) 課程說明
進階嵌入式系統開發與實做 (2014 年秋季 ) 課程說明進階嵌入式系統開發與實做 (2014 年秋季 ) 課程說明
進階嵌入式系統開發與實做 (2014 年秋季 ) 課程說明National Cheng Kung University
 
給自己更好未來的 3 個練習:嵌入式作業系統設計、實做,與移植 (2015 年春季 ) 課程說明
給自己更好未來的 3 個練習:嵌入式作業系統設計、實做,與移植 (2015 年春季 ) 課程說明給自己更好未來的 3 個練習:嵌入式作業系統設計、實做,與移植 (2015 年春季 ) 課程說明
給自己更好未來的 3 個練習:嵌入式作業系統設計、實做,與移植 (2015 年春季 ) 課程說明National Cheng Kung University
 
Lecture notice about Embedded Operating System Design and Implementation
Lecture notice about Embedded Operating System Design and ImplementationLecture notice about Embedded Operating System Design and Implementation
Lecture notice about Embedded Operating System Design and ImplementationNational Cheng Kung University
 
PyPy's approach to construct domain-specific language runtime
PyPy's approach to construct domain-specific language runtimePyPy's approach to construct domain-specific language runtime
PyPy's approach to construct domain-specific language runtimeNational Cheng Kung University
 

Andere mochten auch (12)

中輟生談教育: 完全用開放原始碼軟體進行 嵌入式系統教學
中輟生談教育: 完全用開放原始碼軟體進行 嵌入式系統教學中輟生談教育: 完全用開放原始碼軟體進行 嵌入式系統教學
中輟生談教育: 完全用開放原始碼軟體進行 嵌入式系統教學
 
Making Linux do Hard Real-time
Making Linux do Hard Real-timeMaking Linux do Hard Real-time
Making Linux do Hard Real-time
 
進階嵌入式系統開發與實做 (2014 年秋季 ) 課程說明
進階嵌入式系統開發與實做 (2014 年秋季 ) 課程說明進階嵌入式系統開發與實做 (2014 年秋季 ) 課程說明
進階嵌入式系統開發與實做 (2014 年秋季 ) 課程說明
 
How A Compiler Works: GNU Toolchain
How A Compiler Works: GNU ToolchainHow A Compiler Works: GNU Toolchain
How A Compiler Works: GNU Toolchain
 
給自己更好未來的 3 個練習:嵌入式作業系統設計、實做,與移植 (2015 年春季 ) 課程說明
給自己更好未來的 3 個練習:嵌入式作業系統設計、實做,與移植 (2015 年春季 ) 課程說明給自己更好未來的 3 個練習:嵌入式作業系統設計、實做,與移植 (2015 年春季 ) 課程說明
給自己更好未來的 3 個練習:嵌入式作業系統設計、實做,與移植 (2015 年春季 ) 課程說明
 
Lecture notice about Embedded Operating System Design and Implementation
Lecture notice about Embedded Operating System Design and ImplementationLecture notice about Embedded Operating System Design and Implementation
Lecture notice about Embedded Operating System Design and Implementation
 
Explore Android Internals
Explore Android InternalsExplore Android Internals
Explore Android Internals
 
Implement Runtime Environments for HSA using LLVM
Implement Runtime Environments for HSA using LLVMImplement Runtime Environments for HSA using LLVM
Implement Runtime Environments for HSA using LLVM
 
從線上售票看作業系統設計議題
從線上售票看作業系統設計議題從線上售票看作業系統設計議題
從線上售票看作業系統設計議題
 
Virtual Machine Constructions for Dummies
Virtual Machine Constructions for DummiesVirtual Machine Constructions for Dummies
Virtual Machine Constructions for Dummies
 
PyPy's approach to construct domain-specific language runtime
PyPy's approach to construct domain-specific language runtimePyPy's approach to construct domain-specific language runtime
PyPy's approach to construct domain-specific language runtime
 
Priority Inversion on Mars
Priority Inversion on MarsPriority Inversion on Mars
Priority Inversion on Mars
 

Ähnlich wie Develop Your Own Operating Systems using Cheap ARM Boards

F9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
F9: A Secure and Efficient Microkernel Built for Deeply Embedded SystemsF9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
F9: A Secure and Efficient Microkernel Built for Deeply Embedded SystemsNational Cheng Kung University
 
Chap1
Chap1Chap1
Chap1adisi
 
LCNA14: Why Use Xen for Large Scale Enterprise Deployments? - Konrad Rzeszute...
LCNA14: Why Use Xen for Large Scale Enterprise Deployments? - Konrad Rzeszute...LCNA14: Why Use Xen for Large Scale Enterprise Deployments? - Konrad Rzeszute...
LCNA14: Why Use Xen for Large Scale Enterprise Deployments? - Konrad Rzeszute...The Linux Foundation
 
Building SuperComputers @ Home
Building SuperComputers @ HomeBuilding SuperComputers @ Home
Building SuperComputers @ HomeAbhishek Parolkar
 
Computer system organization
Computer system organizationComputer system organization
Computer system organizationSyed Zaid Irshad
 
Embedded linux
Embedded linuxEmbedded linux
Embedded linuxWingston
 
Unit-I_part-II_Virtualization.pptx
Unit-I_part-II_Virtualization.pptxUnit-I_part-II_Virtualization.pptx
Unit-I_part-II_Virtualization.pptxDARKKNIGHT116809
 
What Linux can learn from Solaris performance and vice-versa
What Linux can learn from Solaris performance and vice-versaWhat Linux can learn from Solaris performance and vice-versa
What Linux can learn from Solaris performance and vice-versaBrendan Gregg
 
OpenHPC: A Comprehensive System Software Stack
OpenHPC: A Comprehensive System Software StackOpenHPC: A Comprehensive System Software Stack
OpenHPC: A Comprehensive System Software Stackinside-BigData.com
 
Embedded Os [Linux & Co.]
Embedded Os [Linux & Co.]Embedded Os [Linux & Co.]
Embedded Os [Linux & Co.]Ionela
 
Operating Systems 1 (4/12) - Architectures (Windows)
Operating Systems 1 (4/12) - Architectures (Windows)Operating Systems 1 (4/12) - Architectures (Windows)
Operating Systems 1 (4/12) - Architectures (Windows)Peter Tröger
 
Embree Ray Tracing Kernels | Overview and New Features | SIGGRAPH 2018 Tech S...
Embree Ray Tracing Kernels | Overview and New Features | SIGGRAPH 2018 Tech S...Embree Ray Tracing Kernels | Overview and New Features | SIGGRAPH 2018 Tech S...
Embree Ray Tracing Kernels | Overview and New Features | SIGGRAPH 2018 Tech S...Intel® Software
 

Ähnlich wie Develop Your Own Operating Systems using Cheap ARM Boards (20)

Faults inside System Software
Faults inside System SoftwareFaults inside System Software
Faults inside System Software
 
F9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
F9: A Secure and Efficient Microkernel Built for Deeply Embedded SystemsF9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
F9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
 
Chap1
Chap1Chap1
Chap1
 
LCNA14: Why Use Xen for Large Scale Enterprise Deployments? - Konrad Rzeszute...
LCNA14: Why Use Xen for Large Scale Enterprise Deployments? - Konrad Rzeszute...LCNA14: Why Use Xen for Large Scale Enterprise Deployments? - Konrad Rzeszute...
LCNA14: Why Use Xen for Large Scale Enterprise Deployments? - Konrad Rzeszute...
 
Hints for L4 Microkernel
Hints for L4 MicrokernelHints for L4 Microkernel
Hints for L4 Microkernel
 
Building SuperComputers @ Home
Building SuperComputers @ HomeBuilding SuperComputers @ Home
Building SuperComputers @ Home
 
Device Drivers
Device DriversDevice Drivers
Device Drivers
 
Construct an Efficient and Secure Microkernel for IoT
Construct an Efficient and Secure Microkernel for IoTConstruct an Efficient and Secure Microkernel for IoT
Construct an Efficient and Secure Microkernel for IoT
 
Computer system organization
Computer system organizationComputer system organization
Computer system organization
 
Embedded linux
Embedded linuxEmbedded linux
Embedded linux
 
Unit-I_part-II_Virtualization.pptx
Unit-I_part-II_Virtualization.pptxUnit-I_part-II_Virtualization.pptx
Unit-I_part-II_Virtualization.pptx
 
What Linux can learn from Solaris performance and vice-versa
What Linux can learn from Solaris performance and vice-versaWhat Linux can learn from Solaris performance and vice-versa
What Linux can learn from Solaris performance and vice-versa
 
L4 Microkernel :: Design Overview
L4 Microkernel :: Design OverviewL4 Microkernel :: Design Overview
L4 Microkernel :: Design Overview
 
OpenHPC: A Comprehensive System Software Stack
OpenHPC: A Comprehensive System Software StackOpenHPC: A Comprehensive System Software Stack
OpenHPC: A Comprehensive System Software Stack
 
Embedded Os [Linux & Co.]
Embedded Os [Linux & Co.]Embedded Os [Linux & Co.]
Embedded Os [Linux & Co.]
 
Embedded Systems
Embedded SystemsEmbedded Systems
Embedded Systems
 
Operating Systems 1 (4/12) - Architectures (Windows)
Operating Systems 1 (4/12) - Architectures (Windows)Operating Systems 1 (4/12) - Architectures (Windows)
Operating Systems 1 (4/12) - Architectures (Windows)
 
Handout2o
Handout2oHandout2o
Handout2o
 
Embree Ray Tracing Kernels | Overview and New Features | SIGGRAPH 2018 Tech S...
Embree Ray Tracing Kernels | Overview and New Features | SIGGRAPH 2018 Tech S...Embree Ray Tracing Kernels | Overview and New Features | SIGGRAPH 2018 Tech S...
Embree Ray Tracing Kernels | Overview and New Features | SIGGRAPH 2018 Tech S...
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
 

Mehr von National Cheng Kung University

Mehr von National Cheng Kung University (12)

Making Linux do Hard Real-time
Making Linux do Hard Real-timeMaking Linux do Hard Real-time
Making Linux do Hard Real-time
 
2016 年春季嵌入式作業系統課程說明
2016 年春季嵌入式作業系統課程說明2016 年春季嵌入式作業系統課程說明
2016 年春季嵌入式作業系統課程說明
 
Interpreter, Compiler, JIT from scratch
Interpreter, Compiler, JIT from scratchInterpreter, Compiler, JIT from scratch
Interpreter, Compiler, JIT from scratch
 
進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明
進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明
進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明
 
The Internals of "Hello World" Program
The Internals of "Hello World" ProgramThe Internals of "Hello World" Program
The Internals of "Hello World" Program
 
Open Source from Legend, Business, to Ecosystem
Open Source from Legend, Business, to EcosystemOpen Source from Legend, Business, to Ecosystem
Open Source from Legend, Business, to Ecosystem
 
Summer Project: Microkernel (2013)
Summer Project: Microkernel (2013)Summer Project: Microkernel (2013)
Summer Project: Microkernel (2013)
 
進階嵌入式系統開發與實作 (2013 秋季班 ) 課程說明
進階嵌入式系統開發與實作 (2013 秋季班 ) 課程說明進階嵌入式系統開發與實作 (2013 秋季班 ) 課程說明
進階嵌入式系統開發與實作 (2013 秋季班 ) 課程說明
 
LLVM 總是打開你的心:從電玩模擬器看編譯器應用實例
LLVM 總是打開你的心:從電玩模擬器看編譯器應用實例LLVM 總是打開你的心:從電玩模擬器看編譯器應用實例
LLVM 總是打開你的心:從電玩模擬器看編譯器應用實例
 
Microkernel Evolution
Microkernel EvolutionMicrokernel Evolution
Microkernel Evolution
 
Develop Your Own Operating System
Develop Your Own Operating SystemDevelop Your Own Operating System
Develop Your Own Operating System
 
olibc: Another C Library optimized for Embedded Linux
olibc: Another C Library optimized for Embedded Linuxolibc: Another C Library optimized for Embedded Linux
olibc: Another C Library optimized for Embedded Linux
 

Kürzlich hochgeladen

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
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
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 

Kürzlich hochgeladen (20)

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
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?
 
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...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

Develop Your Own Operating Systems using Cheap ARM Boards

  • 1. Develop Your Own Operating Systems using Cheap ARM Boards Jim Huang ( 黃敬群 ) <jserv@0xlab.org> Jan 8, 2014 / NCTU, Taiwan
  • 2. Rights to copy © Copyright 2014 0xlab http://0xlab.org/ Corrections, suggestions, contributions and translations are welcome! Attribution – ShareAlike 3.0 Latest update: Jan 14, 2014 You are free to copy, distribute, display, and perform the work to make derivative works to make commercial use of the work Under the following conditions Attribution. You must give the original author credit. Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under a license identical to this one. For any reuse or distribution, you must make clear to others the license terms of this work. Any of these conditions can be waived if you get permission from the copyright holder. Your fair use and other rights are in no way affected by the above. License text: http://creativecommons.org/licenses/by-sa/3.0/legalcode
  • 3. Goals of This Presentation • Know the reasons why various operating systems exist and how they are functioned for dedicated purposes • Understand the basic concepts while building system software from scratch • How can we benefit from cheap ARM boards and the related open source tools? – Raspberry Pi & STM32F4-Discovery
  • 4. Agenda • • • • Yet another Operating System? Embedded Operating System Designs Cheap ARM boards Development flow using open source technologies
  • 6. Reasons of Home-brew OS • Escape from large-scale and uncertain code base – Linux is a good example: Mature but hard to fit everyone's need • Exploit new systematic methods – Hypervisor for virtualization, runtime isolation – Heterogeneous computing for both performance and power efficiency • Customization – Deeply embedded environments, security, education (xinu, minix, xv6), domain-specific language/runtime, mobile (OKL4; 1.5 billion shipment!) • "Just for Fun" – Linus Torvalds
  • 7. Techniques inspired by OS • Even Web/Application Framework learn the performance techniques from OS concepts. • Virtualization – Hypervisor, Resource Kernel (KVM), … – Intel VT-d , ARM Cortex-A15/A7, ARMv8 • Security – Dynamic tracing, analysis, and instrumentation using VM
  • 8. Statistics about Large-scale Systems • Drivers cause 85% of Windows XP crashes. – Michael M. Swift, Brian N. Bershad, Henry M. Levy: “Improving the Reliability of Commodity Operating Systems”, SOSP 2003 • Error rate in Linux drivers is 3x (maximum: 10x) higher than for the rest of the kernel – Life expectancy of a bug in the Linux kernel (~2.4): 1.8 years – Andy Chou, Junfeng Yang, Benjamin Chelf, Seth Hallem, Dawson R. Engler: “An Empirical Study of Operating System Errors”, SOSP 2001
  • 9. Some statistics • Causes for driver bugs – 23% programming error – 38% mismatch regarding device specification – 39% OS-driver-interface misconceptions – Leonid Ryzhyk, Peter Chubb, Ihor Kuz and Gernot Heiser: “Dingo: Taming device drivers”, EuroSys 2009
  • 10. Anecdote: Linux e1000 NVRAM bug • [Aug 8, 2008] Bug report: e1000 PCI-X network cards rendered broken by Linux 2.6.27-rc – overwritten NVRAM on card • [Oct 1, 2008] Intel releases quickfix – map NVRAM somewhere else • [Oct 15, 2008] Reason found: – dynamic ftrace framework tries to patch __init code, but .init sections are unmapped after running init code – NVRAM got mapped to same location – scary cmpxchg() behavior on I/O memory • [Nov 2, 2008] dynamic ftrace reworked for Linux 2.6.28-rc3 FTrace & NIC driver! instrumentation vs. device driver
  • 11. Linux Device Driver bugs [Dingo: Taming device drivers, 2009]
  • 12. Linux version 3.0 • consists of – 7702 features – 893 Kconfig files – 31281 source files – 88897 #ifdef blocks
  • 14.
  • 16. Bugs in Linux Device Driver
  • 17. Bugs in Linux Device Driver Device protocol violation examples: ✗ Issuing a command to uninitialized device ✗ Writing an invalid register value ✗ Incorrectly managing DMA descriptors
  • 18. Linux Device Driver Bug Portion
  • 19. Bugs in Linux Device Driver Mellanox Infinihost controller Driver if(cur_state==IB_RESET && new_state==IB_RESET){ return 0; }
  • 20. Linux Device Driver Bug Portion
  • 22. Further study about concurrency bugs • Markus Peloquin, Lena Olson, Andrew Coonce, University of Wisconsin–Madison, “Simultaneity Safari: A Study of Concurrency Bugs in Device Drivers" (2009) • Types of Device Driver Bugs
  • 23. Linux Device Driver Bug Portion
  • 25. IoT = I own Technologies, but... • You can only use the devices, services, rights, etc. without really owning them even if you buy the “products" in higher price. • Ecosystem is getting quite essential for applications.
  • 26. Deeply Embedded Devices • Power awareness; solid and limited applications • Multi-tasking or cooperative scheduling is still required • IoT (Internet of Things) is the specialized derivative with networking facility • Communication capability is built-in for some products • Example: AIRO wristband (health tracker) http://www.weweartech.com/amazing-new-uses-smart-watches/
  • 27. Work at AcoMo: Physiological Inspection • Analyze signals from various bio sensors and apply efficient algorithms to examine the healthy condition
  • 29. AcoMo built in-house OS for products and releases the basic part as an open source effort (invisible) Medical devices make sense in our life. :: home-care :: advance warning :: security
  • 30. Booting Process Power On PC Embedded BIOS Power On X-Loader Get Bootloader Get Bootloader GRUB U-Boot Get Kernel Kernel Embedded hardware: TI OMAP3730 SoC Get Kernel Kernel
  • 31. Embedded vs. PC • Hardware specification is not the major difference! – The functionality is. • PCs are a highly modular platform. Most components are in sockets or slots that permits easy replacement. • Embedded Systems tend to solder their components directly to the PCB as they don’t need to be replaced.
  • 34. Embedded vs. PC D i ff e r e n t P C I - E s t a n d a r d s V1.0/v2.0/v3.0 D i ff e r e n t l a n e c o u n t s x1/x2/x4/x8/x16 Also Legacy PCI support
  • 35. Embedded vs. PC USB 2.0 USB 3.0 Intel PCH Gigabit Ethernet 7.1 Audio Codec S-ATA 3 & 6Gbps IDE & Floppy
  • 36. Embedded vs. PC TI OMAP 3730 Processor 512MB DDR@200MHz PowerVR SGX530 Graphics All soldered directly to the board. Not intended for replacements.
  • 37. Booting Process ROM Code U-Boot IPL Startup Kernel X-Loader U-Boot Linux Kernel • On-Chip boot ROM code generally causes the CPU to perform minimal initialization of peripheral such as NAND Flash and instructs it to begin reading code from there into memory and executing it. • This code can be a standard embedded bootloader such as U-Boot, or it can be an IPL. • U-Boot loads the “IPL” image into memory, and begins executing it. • The “IPL” is an “Initial Program Loader” which is responsible for initializing basic hardware and passing control to “Startup” code, and subsequently the Kernel. Embedded hardware: TI OMAP3730 SoC
  • 38. IPL • • • • Begin in assembly, performs initialization for HLL Initialize CPU/(some) Peripheral Clocks Initialize basic I/O (serial) Minimal pin multiplexing for required peripherals (i.e. SDHC hardware) • Read in and decompresse “IFS” image (ramdisk + kernel) • Include basic (FAT) fi lesystem drivers for SDHC reading • Passes control to “Startup” • Can start “minidrivers” for device interaction before OS/Kernel even begins booting
  • 39. Startup • Startup begin in C language, initialize most peripherals, and sets up important kernel structures • Kernel expects a “syspage” structure to exist at a pre-defi ned location in memory. This structures provides important information about the host system. • Enable CPU SMP operation (multiple-cores) • Often re-do initialization done by IPL (such as serial I/O) to enable more advanced functionality • Inform minidrivers of new environment before passing control to kernel.
  • 40. System Information • Indicate CPU type (e.g. ARM) and vital information (e.g. number of cores), and other supported features such as NEON extensions. • Provide access to hardware-specifi c function callouts made available to the system before the Kernel was running • Provide information about the memory environment in which the kernel is running • Information about bus devices, IRQs • Information about connected peripherals and device trees for /dev population
  • 41. Cheap ARM Boards check "Introduction to Raspberry Pi" by Computer Science Club, University of Cyprus Student Clubs
  • 42. Development flow using Open Source Technologies
  • 43. Baking Pi – Operating System Development • Operating Systems Development! Course by Alex Chadwick. Version 1.0c (July 2013). http://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/ • Divided into several basic “blocks".
  • 44. JTAG • Initially devised for testing printed circuit boards with its boundary scanning functionality JTAG is now used extensively for debugging, programming CPLDS and initialising flash memory. • Can be useful to recover bricked devices or write new firmware to NAND on restricted devices. But the IGEP is un-brickable • Tools like OpenOCD and GDB ARM have successfully been used on OMAP530 devices like Beagleboard.
  • 45. Conclusion • BYOD (Build Your Own Device) and BYOD (Build Your Own Operating System) are feasible and getting easier with open source technologies • Domain specific applications always expect innovations from various sources including the customized kernel and userland • System trial with very low cost
  • 46. Reference • “Dingo: Taming Device Drivers”, Leonid Ryzhyk, Peter Chubb, Ihor Kuz, Gernot Heiser, UNSW/NICTA/Open Kernel Labs (2009) • "Hardware and Device Drivers", Björn Döbel, TU Dresden (2012) • "Configuration Coverage in the Analysis of Large-Scale System Software", Reinhard Tartler, Daniel Lohmann, Christian Dietrich, Christoph Egger, Julio Sincero, Friedrich-Alexander University (2011) • “AIRAC: A Static Analyzer for Detecting All Buffer Overrun Errors in C Programs", Kwangkeun Yi, Seoul National University (2005) • “CCured: Taming C Pointers”, George Necula, Scott McPeak, Wes Weimer, Berkeley (2002)