#FOSDEM Februari 4, 2017 brabo

Slides:



Advertisements
Similar presentations
Real Time Versions of Linux Operating System Present by Tr n Duy Th nh Quách Phát Tài 1.
Advertisements

User-Mode Linux Ken C.K. Lee
Contiki A Lightweight and Flexible Operating System for Tiny Networked Sensors Presented by: Jeremy Schiff.
INTRODUCTION OS/2 was initially designed to extend the capabilities of DOS by IBM and Microsoft Corporations. To create a single industry-standard operating.
Embedded Real-time Systems The Linux kernel. The Operating System Kernel Resident in memory, privileged mode System calls offer general purpose services.
Chapter 13 Embedded Systems
OS Spring’03 Introduction Operating Systems Spring 2003.
Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access memory.
Embedded Linux Sandeep Sirpatil Graduate Student University of North Carolina Charlotte Feb 7, 2005.
Senior Design May AbstractDesign Alex Frisvold Alex Meyer Nazmus Sakib Eric Van Buren Our project is to develop a working emulator for an Android.
Introduction to The Linaro Toolchain Embedded Processors Training Multicore Software Applications Literature Number: SPRPXXX 1.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
Chapter 3 Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access.
Chapter 3.1:Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access.
1 uClinux course. 2 Author: D L Johnson Overview u Day 1 +Survey of embedded operating systems - why uclinux? +The uclinux environment - the directory.
UNIX System Administration OS Kernal Copyright 2002, Dr. Ken Hoganson All rights reserved. OS Kernel Concept Kernel or MicroKernel Concept: An OS architecture-design.
Section 3.1: Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random.
Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker.
Xenomai’s Porting on processor NIOS II Professor : P. Kadionik Authors : Bassi Vincent Louati Azza Mirault Raphael Polette Simon.
Processes and Threads CS550 Operating Systems. Processes and Threads These exist only at execution time They have fast state changes -> in memory and.
Windows 2000 Course Summary Computing Department, Lancaster University, UK.
Unit - VI. Linux and Real Time: Real Time Tasks Hard and Soft Real Time Tasks Linux Scheduling Latency Kernel Preemption Challenges in Kernel Preemption.
Processes Introduction to Operating Systems: Module 3.
4300 Lines Added 1800 Lines Removed 1500 Lines Modified PER DAY DURING SUSE Lab.
The Performance of Micro-Kernel- Based Systems H. Haertig, M. Hohmuth, J. Liedtke, S. Schoenberg, J. Wolter Presentation by: Tim Hamilton.
ChibiOS/RT Demo A free embedded RTOS
Implementation of Embedded OS Lab3 Porting μC/OS-II.
MINIX Presented by: Clinton Morse, Joseph Paetz, Theresa Sullivan, and Angela Volk.
Implementation of Embedded OS
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
WAVECOM©2005. All rights reserved 1 PROTECTIONS Embedded Software Architecture AT commands Parser Customer Application written in Standard ANSI C Wavecom.
1 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com Embedded Linux system development.
Introduction to Operating Systems Concepts
Introduction to threads
Software and Communication Driver, for Multimedia analyzing tools on the CEVA-X Platform. June 2007 Arik Caspi Eyal Gabay.
Introduction to the ARM mbed Platform– A Hands-on Course
Containers as a Service with Docker to Extend an Open Platform
Ottawa Linux Symposium 2007
REAL-TIME OPERATING SYSTEMS
OPERATING SYSTEM CONCEPT AND PRACTISE
Muen Policy & Toolchain
Current Generation Hypervisor Type 1 Type 2.
USB The topics covered, in order, are USB background
Credits: 3 CIE: 50 Marks SEE:100 Marks Lab: Embedded and IOT Lab
Introduction to the CVM and the Timesys RI
Implementation of Embedded OS
CASE STUDY 1: Linux and Android
Exploring LynxOS By How-Shen Chang.
Computer System Laboratory
Performance Tuning Team Chia-heng Tu June 30, 2009
KERNEL ARCHITECTURE.
Real Time Operating System
CIT 480: Securing Computer Systems
Introduction to the Kernel and Device Drivers
Chapter 3: Windows7 Part 1.
An Introduction to Device Drivers
Chapter 2: The Linux System Part 1
HW & Systems: Operating Systems IS 101Y/CMSC 101 Computational Thinking and Design Tuesday, October 22, 2013 Carolyn Seaman University of Maryland, Baltimore.
Chapter 8: Memory management
Outline Module 1 and 2 dealt with processes, scheduling and synchronization Next two modules will deal with memory and storage Processes require data to.
Today’s agenda Hardware architecture and runtime system
Lecture Topics: 11/1 General Operating System Concepts Processes
Chapter 5: I/O Systems.
Windows Virtual PC / Hyper-V
Linux Architecture Overview.
Introduction to Computer Systems
System Calls System calls are the user API to the OS
OPERATING SYSTEMS MEMORY MANAGEMENT BY DR.V.R.ELANGOVAN.
Overview of System Development for Windows CE.NET
Chapter 13: I/O Systems “The two main jobs of a computer are I/O and [CPU] processing. In many cases, the main job is I/O, and the [CPU] processing is.
Presentation transcript:

#FOSDEM Februari 4, 2017 brabo Insane Adding Machines presents: frosted #FOSDEM Februari 4, 2017 brabo

Free Operating System for tiny embedded devices frosted Free Operating System for tiny embedded devices License: GPL Developed by: Insane adding machines Non-profit development team Research on Free Software for IoT Management platform: github Decentralized Copyleft

Target ARM® Cortex-M® CPU

Target ARM® Cortex-M® CPU

Cortex-M features 32-bit architecture Low power Physical addressing (no MMU) Integrated network Bus: I2C/SPI/UART/USB-OTG Multimedia (DSP) (M4/M7) Accelerated Floating point processing (M4/M7)

Cortex-M software state of the art Baremetal programming Single-threaded Event-loop + IRQ handling “Real-Time” OS Basic support for threads (no process handling) “centralized” IRQ handling No advanced OS features (filesystems, terminals) No multiplexing drivers Cryptic, unique, non portable API No application safety in any case

Embedded Linux Not feasible: Linux is no longer designed for the embedded world Even Non-MMU Linux (uCLinux) has too high resource requirements

Goals POSIX API Allows to port existing *NIX applications and libraries Fast learning process for linux developers Hard Kernel/userspace separation Physical memory segmentation Safe process environment Isolated from kernel Isolated from other processes System and drivers functions exposed via standard syscalls Real Time Ultra Low Power TCP/IP connectivity Free kernel-space code All kernel code is GPL

POSIX Embedded conformance

Components

Flash Kernel code area size is fixed Base applications and shell scripts are compiled as flat binaries and stored into XipFS XipFS gets mounted under /bin at startup

Application code Goal: port ANY *nix executable with no modifications Reality: possibly something is missing Some less-popular calls not yet implemented in libC s/fork/vfork

Application executables In bFLT format (to allow relocation/XiP) Use arm-frosted-eabi-gcc toolchain Compile with: -fPIC -mlong-calls -fno-common -msingle-pic-base -mno-pic-data-is-text- relative Link with: -fPIC -mlong-calls -fno-common -Wl,-elf2flt -lgloss See Userland repository

Context separation Processes execute in their own context No access to supervisor code No access to kernel memory No access to other tasks’ stack Separate stack pointer

System Interrupts

Scheduler Double list (idling, running) Round-robin policy Multiple priority levels Timeslice calculation based on priority Special Real-time priority Voluntary pre-emption (task_suspend) Locks: processes sleep while waiting for semaphore/mutex Real time: task_resume in RT tasks forces immediate scheduling after IRQ events Latency for RT tasks is predictable

Scheduler

Repositories Frosted kernel Kernelspace code Makefile environment to build full system GCC-based Toolchain arm-frosted-eabi Required to compile applications and libraries Common headers System specific API definition (ioctl values, syscall mapping) Frosted-userland Example applications and libraries Unicore-mx Hardware abstraction layer

Repositories and interdependencies (via git-submodules)

Toolchain Build time from sources: 25-50 minutes Periodic binary releases for x86_64 on github Nightly builds available at: http://archive.trexotech.com Why? Built-in libraries to compile applications Automatically resolve system include paths Able to produce “flat” binaries Nice side effect: The toolchain can compile the kernel too No other toolchain is required to build the full system

Kernel configuration If your board has a pre-defined config, use make defconfig TARGET=boardname Run make menuconfig to customize kernel features and supported drivers

Userland configuration Selection of components based on menuconfig Selected apps are archived in a XipFS that will be mounted at startup on /bin When the system starts, /bin/init is executed If /bin/init.sh is present, it will be parsed using the default shell (/bin/fresh)

Compilation Now that frosted is configured, type make to build

Linking and image creation The binaries produced by the build are: kernel.elf: kernel executable in ELF format kernel.img: image version of the kernel Padded up to selected kernel size to be placed at the beginning of the flash apps.img: XipFS image containing the userland programs, generated by frosted-userland image.bin: concatenation of kernel.img and apps.img to facilitate flashing/running

Running on qemu Qemu can emulate a M3 target, based on TI stellaris LM3S, with UART and Ethernet Unfortunately, with only 256KB Flash and 64KB RAM, allowing only basic system We provide a modified qemu with a “tuned” LM3S, closer to nowadays real HW: 1MB Flash 256KB RAM To run on qemu: Compile for LM3S Run “make qemunet”

Continuous integration Code is verified at every commit by Jenkins Build Non-regression tests on real and synthetic (qemu) targets Non-regression tests running on four different boards http://jenkins.trexotech.com

Flashing to target Depending on the target type, one of the following mechanisms must be used to flash the system: If the target supports st-link Run st-flash as indicated If the target has an MBED bootloader: Copy image.bin directly to the USB storage If the target supports DFU format: Image.bin must be converted to .dfu with dfu-utils before transferring it

Thank you! Questions? Comments? http://www.github.com/insane-adding-machines irc.freenode.net / #frosted