Linux, Yocto and Fpgas

Total Page:16

File Type:pdf, Size:1020Kb

Linux, Yocto and Fpgas Embedded Open Source Experts Linux, Yocto and FPGAs Integrating Linux and Yocto builds into different SoCs From a Linux software perspective: ➤ Increased demand for Linux on FPGAs ➤ Many things to mange, both technical and practical ➤ FPGAs with integrated CPU cores – very similar many other SoCs Here are some experiences and observations... © Codiax 2019 ● Page 2 Why use Linux? ➤ De-facto standard ➤ Huge HW support ➤ FOSS ➤ Flexible ➤ Adaptable ➤ Stable ➤ Scalable ➤ Royalty free ➤ Vendor independent ➤ Large community ➤ Long lifetime Why not Linux? ➤ Too big ➤ Real-time requirements ➤ Certification ➤ Boot time ➤ Licensing ➤ Too open? Desktop Shells: Desktop Display server: Display BrailleDisplay Touch-Screen Mouse & Keyboard Wayland Compositor Wayland + development tools = a lot code!of source Linux system example weston, clayton,mutter,KWin evdev libinput GNOME Shell D radeon nouveau lima etna_viv freedreno tegra-re lima nouveau radeon freedreno etna_viv e libwayland-server libwayland-server s Cinnamon k t o kms p Linux kernel, Linux kernel, Plasma 2 w i (Kernel Mode Setting) Mode (Kernel d g Cairo-Dock e t s drm (Direct Rendering Manager) Rendering (Direct drm cache coherent L2-Caches L2-Caches cache coherent CPU &GPU Enlight. DR19 System libraries: System oflibraries): form (in the Toolkits Interface User µClibc Pango glibc glibc main memory possibly adaptations to Wayland/Mir libwayland / COGL libwayland Cairo Cairo (Xr) GTK+ Clutter 2D Application 2D GModule GThread GThread GLib GObject Glib GIO ATK devicedrivers other& modules System daemons: System systemd libwayland-client Hardware (contains udev) Qt Qt ALSA: emu20k1, ctxfi, hda... emu20k1, ALSA: D-Bus-Daemon ? ? kdbus ? udisks possibly adaptations to Wayland/Mir Media Media Application avahi-daemon libwayland-client EFL Source: https://en.wikipedia.org/wiki/File:Free_and_open-source-software_display_servers_and_UI_toolkits.svg Source: packagekitd kmod-fs-ext4 PulseAudio-d kmod-ltq-atm-vr9 unetwork libwayland-client G-sensor GPS-receiver UMTS/CDMA/LTE NetworkManager SDL Alternative display servers: Alternative X-Server X-Server libxserver X-Win32 Xfree86 possibly adaptations to Wayland/Mir X11.app X.Org 3D Application 3D netfilter manager manager window metacity mutter Compiz KWin ath9k wxWidgets libwayland-client GNUstep Bluetooth 802.11-(abc) Ethernet libX/libXCB FLTK FLTK ... AppArmor libmir-serv TOMOYO TOMOYO SELinux Smack mir mir manager manager window Ubuntu Compiz (Android-forked) Linux kernel binder wakelocks Unity and Plasma libhybris Unity Widgets for Widgets © Codiax 2019 ● Page SurfaceFlinger ashmem SF logger Android libbionic manager manager window pmem AWM ... 5 Linux system open source code ● Linux kernel ~ 20 MLOC + Bootloader + Libraries + System services + FOSS applications + Development tools How to select, integrate, build and maintain? © Codiax 2019 ● Page 6 OpenEmbedded / Yocto - A build system for embedded Linux ● What does such a build system do? – Automates the process of building a target system – Downloads, patches, configures, compiles/cross- compiles ● The Linux kernel ● Applications for a Linux root filesystem – Packages applications – Keeps track of application dependencies – Deploys generated images – Provides an SDK – Provides tools © Codiax 2019 ● Page 7 What is OpenEmbedded? ● OE is the basis for many build systems, including Poky (and e.g. Ångström) ● Is the origin of Bitbake and OpenEmbedded- Core, that are now also part of Yocto Project ● Provides meta data, recipes and layers, for thousands of open source applications (not part of OpenEmbedded-Core) – http://layers.openembedded.org © Codiax 2019 ● Page 8 Build system overview Source: Yocto Project Quick Start manual © Codiax 2019 ● Page 9 OpenEmbedded / Yocto ● Builds all – long build times ● Build caches ● Depends on external archives – Rebuilding old builds? – Local source code storage? – Local meta data mirrors ● FOSS Compliance © Codiax 2019 ● Page 10 FOSS ± Free and Open Source Software FOSS licenses (typically) ensure and regulate ➤ The four basic freedoms – Freedom to use – Freedom to study – Freedom to redistribute – Freedom to modify ➤ Handling of derived works ➤ Proper attribution to copyright owners ➤ And more... The Open Source Definition – http://opensource.org/docs/osd The Free Software Definition – https://www.gnu.org/philosophy/free-sw.html HW oriented adaptations Applications Boot loader Kernel Init Services FS ➤ HW specific BOOT ➤ Device tree (DTS) for boot loader and kernel ➤ Boot loader and kernel drivers ➤ Boot loader and kernel configuration ➤ Mapping of memory areas from kernel to user space process ➤ Real-time configuration + potential RT patches Trends ● Linux and real-time - again ● Virtualization ● Security © Codiax 2019 ● Page 13 ? ? ? ? ? ? Questions? [email protected] www.codiax.se © Codiax 2019 ● Page 14 .
Recommended publications
  • Tizen IVI “From Scratch” Customizing, Building and Testing
    Tizen IVI “from scratch” Customizing, building and testing Stéphane Desneux Senior Software Engineer Eurogiciel <[email protected]> Eurogiciel ● Open source development and integration: ● Maintainers in multiple domains on tizen.org ● Embedded systems for real-time multimedia: ▪ Widi/Miracast stack ▪ Wayland/Weston ▪ Webkit2 browser with HW acceleration ● Applications: HTML5/CSS3, jquery, jqmobi, Cordova ● Location : Vannes (Brittany), France 14 2 FOSDEM' Automotive devroom – Tizen “from scratch” : customize, build, test ! Agenda ● Tizen & Tizen:IVI : short introduction ● From source code to target devices ● Customize ● Build ● Flash, Run, Test ! 14 3 FOSDEM' Automotive devroom – Tizen “from scratch” : customize, build, test ! Tizen: a short introduction Definition ● Open source project ● Hosted at the Linux Foundation ● Innovative Web-based platform for multiple devices ● Sponsored by worldwide companies ● Samsung & Intel are two big contributors ● Built on industry standards: ● GNU/Linux kernel, GNU libc ● POSIX ● W3C ● Many upstream Open Source projects 14 5 FOSDEM' Automotive devroom – Tizen “from scratch” : customize, build, test ! Tizen Profiles ● Multiple vertical profiles (derived from Tizen:Generic) ● IVI ● Mobile ● Future: other devices (TV, ...) ● Each profile adds its own enhancements ● Tizen packaging format: RPM 14 6 FOSDEM' Automotive devroom – Tizen “from scratch” : customize, build, test ! From source code … … to target devices 1: Source code GIT Repositories Remote Local Clone source repo Developers
    [Show full text]
  • Working with System Frameworks in Python and Objective-C
    Working with System Frameworks in Python and Objective-C by James Barclay Feedback :) j.mp/psumac2015-62 2 Dude, Where’s My Source Code? CODE https://github.com/futureimperfect/psu-pyobjc-demo https://github.com/futureimperfect/PSUDemo SLIDES https://github.com/futureimperfect/slides 3 Dude, Where’s My Source Code? CODE https://github.com/futureimperfect/psu-pyobjc-demo https://github.com/futureimperfect/PSUDemo SLIDES https://github.com/futureimperfect/slides 3 Dude, Where’s My Source Code? CODE https://github.com/futureimperfect/psu-pyobjc-demo https://github.com/futureimperfect/PSUDemo SLIDES https://github.com/futureimperfect/slides 3 Agenda 1. What are system frameworks, and why should you care? 2. Brief overview of the frameworks, classes, and APIs that will be demonstrated. 3. Demo 1: PyObjC 4. Demo 2: Objective-C 5. Wrap up and questions. 4 What’s a System Framework? …and why should you care? (OS X) system frameworks provide interfaces you need to write software for the Mac. Many of these are useful for Mac admins creating: • scripts • GUI applications • command-line tools Learning about system frameworks will teach you more about OS X, which will probably make you a better admin. 5 Frameworks, Classes, and APIs oh my! Cocoa CoreFoundation • Foundation • CFPreferences - NSFileManager CoreGraphics - NSTask • Quartz - NSURLSession - NSUserDefaults • AppKit - NSApplication 6 CoreFoundation CoreFoundation is a C framework that knows about Objective-C objects. Some parts of CoreFoundation are written in Objective-C. • Other parts are written in C. CoreFoundation uses the CF class prefix, and it provides CFString, CFDictionary, CFPreferences, and the like. Some Objective-C objects are really CF types behind the scenes.
    [Show full text]
  • Storage Administration Guide Storage Administration Guide SUSE Linux Enterprise Server 12 SP4
    SUSE Linux Enterprise Server 12 SP4 Storage Administration Guide Storage Administration Guide SUSE Linux Enterprise Server 12 SP4 Provides information about how to manage storage devices on a SUSE Linux Enterprise Server. Publication Date: September 24, 2021 SUSE LLC 1800 South Novell Place Provo, UT 84606 USA https://documentation.suse.com Copyright © 2006– 2021 SUSE LLC and contributors. All rights reserved. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or (at your option) version 1.3; with the Invariant Section being this copyright notice and license. A copy of the license version 1.2 is included in the section entitled “GNU Free Documentation License”. For SUSE trademarks, see https://www.suse.com/company/legal/ . All other third-party trademarks are the property of their respective owners. Trademark symbols (®, ™ etc.) denote trademarks of SUSE and its aliates. Asterisks (*) denote third-party trademarks. All information found in this book has been compiled with utmost attention to detail. However, this does not guarantee complete accuracy. Neither SUSE LLC, its aliates, the authors nor the translators shall be held liable for possible errors or the consequences thereof. Contents About This Guide xii 1 Available Documentation xii 2 Giving Feedback xiv 3 Documentation Conventions xiv 4 Product Life Cycle and Support xvi Support Statement for SUSE Linux Enterprise Server xvii • Technology Previews xviii I FILE SYSTEMS AND MOUNTING 1 1 Overview
    [Show full text]
  • Reverse Engineering Power Management on NVIDIA Gpus - Anatomy of an Autonomic-Ready System Martin Peres
    Reverse Engineering Power Management on NVIDIA GPUs - Anatomy of an Autonomic-ready System Martin Peres To cite this version: Martin Peres. Reverse Engineering Power Management on NVIDIA GPUs - Anatomy of an Autonomic-ready System. ECRTS, Operating Systems Platforms for Embedded Real-Time appli- cations 2013, Jul 2013, Paris, France. hal-00853849 HAL Id: hal-00853849 https://hal.archives-ouvertes.fr/hal-00853849 Submitted on 23 Aug 2013 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Reverse engineering power management on NVIDIA GPUs - Anatomy of an autonomic-ready system Martin Peres Ph.D. student at LaBRI University of Bordeaux Hobbyist Linux/Nouveau Developer Email: [email protected] Abstract—Research in power management is currently limited supported nor documented by NVIDIA. As GPUs are leading by the fact that companies do not release enough documentation the market in terms of performance-per-Watt [3], they are or interfaces to fully exploit the potential found in modern a good candidate for a reverse engineering effort of their processors. This problem is even more present in GPUs despite power management features. The choice of reverse engineering having the highest performance-per-Watt ratio found in today’s NVIDIA’s power management features makes sense as they processors.
    [Show full text]
  • Setting up Opengl, GLM, and FLTK
    Comp 175 - Graphics In Class Lab 0 Setting Up OpenGL, GLM, and FLTK Description: In this lab, your task is to set up your development environment for future labs and assignments that use OpenGL, the GLM library, and FLTK. OpenGL is the standard (3D) graphics library. Although there are other graphics libraries out there (e.g. Vulcan, DirectX or Direct3D by Microsoft, Metal by Apple, and Mantle by AMD), OpenGL remains the most common and most popular API for implementing 3D graphics applications. For convenience, we will be using the GLM library (GLM stands for OpenGL Mathematics) to do all of our linear algebra. The library will help keep the code readable when manipulating matrices, vectors, points, and such. Finally, we will be using FLTK (version 1.3.4) in conjunction with OpenGL. FLTK is a cross-platform, lightweight graphical user interface (GUI) library that supports OpenGL canvas. Since FLTK is cross-platform, you should be able to use your own favorite operating system and windows environment. What a cross-platform toolkit means is that you will write your GUI code once, and you can compile the code in Windows, Mac, and whatever operating system that FLTK supports. The resulting compiled program will be native to the operating system (whereas Java is also a cross-platform language, but Java applications are run in a virtual machine). Personally, I use a Windows machine at home and at work. I have therefore written the initial support code and demo applications in Windows (using Visual Studio 2017 Enterprise edition). For this class, we will support Windows and Mac development environments.
    [Show full text]
  • Security Assurance Requirements for Linux Application Container Deployments
    NISTIR 8176 Security Assurance Requirements for Linux Application Container Deployments Ramaswamy Chandramouli This publication is available free of charge from: https://doi.org/10.6028/NIST.IR.8176 NISTIR 8176 Security Assurance Requirements for Linux Application Container Deployments Ramaswamy Chandramouli Computer Security Division Information Technology Laboratory This publication is available free of charge from: https://doi.org/10.6028/NIST.IR.8176 October 2017 U.S. Department of Commerce Wilbur L. Ross, Jr., Secretary National Institute of Standards and Technology Walter Copan, NIST Director and Under Secretary of Commerce for Standards and Technology NISTIR 8176 SECURITY ASSURANCE FOR LINUX CONTAINERS National Institute of Standards and Technology Internal Report 8176 37 pages (October 2017) This publication is available free of charge from: https://doi.org/10.6028/NIST.IR.8176 Certain commercial entities, equipment, or materials may be identified in this document in order to describe an experimental procedure or concept adequately. Such identification is not intended to imply recommendation or endorsement by NIST, nor is it intended to imply that the entities, materials, or equipment are necessarily the best available for the purpose. This p There may be references in this publication to other publications currently under development by NIST in accordance with its assigned statutory responsibilities. The information in this publication, including concepts and methodologies, may be used by federal agencies even before the completion of such companion publications. Thus, until each ublication is available free of charge from: http publication is completed, current requirements, guidelines, and procedures, where they exist, remain operative. For planning and transition purposes, federal agencies may wish to closely follow the development of these new publications by NIST.
    [Show full text]
  • Porting a Window Manager from Xlib to XCB
    Porting a Window Manager from Xlib to XCB Arnaud Fontaine (08090091) 16 May 2008 Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version pub- lished by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". Contents List of figures i List of listings ii Introduction 1 1 Backgrounds and Motivations 2 2 X Window System (X11) 6 2.1 Introduction . .6 2.2 History . .6 2.3 X Window Protocol . .7 2.3.1 Introduction . .7 2.3.2 Protocol overview . .8 2.3.3 Identifiers of resources . 10 2.3.4 Atoms . 10 2.3.5 Windows . 12 2.3.6 Pixmaps . 14 2.3.7 Events . 14 2.3.8 Keyboard and pointer . 15 2.3.9 Extensions . 17 2.4 X protocol client libraries . 18 2.4.1 Xlib . 18 2.4.1.1 Introduction . 18 2.4.1.2 Data types and functions . 18 2.4.1.3 Pros . 19 2.4.1.4 Cons . 19 2.4.1.5 Example . 20 2.4.2 XCB . 20 2.4.2.1 Introduction . 20 2.4.2.2 Data types and functions . 21 2.4.2.3 xcb-util library . 22 2.4.2.4 Pros . 22 2.4.2.5 Cons . 23 2.4.2.6 Example . 23 2.4.3 Xlib/XCB round-trip performance comparison .
    [Show full text]
  • High Speed Visualization in the Jetos Aviation Operating System Using Hardware Acceleration*
    High Speed Visualization in the JetOS Aviation Operating System Using Hardware Acceleration* Boris Barladian[0000-0002-2391-2067], Nikolay Deryabin[0000-0003-1248-6047], Alexey Voloboy[0000-0003-1252-8294], Vladimir Galaktionov[0000-0001-6460-7539], and Lev Shapiro[0000-0002-6350-851X] The Keldysh Institute of the Applied Mathematics of RAS, Moscow, Russia [email protected],{voloboy, vlgal, pls}@gin.keldysh.ru Abstract. The paper discusses details of the pilot display visualization that uses the hardware acceleration capabilities of the Vivante graphics processor in the JetOS aviation operating system. Previously the OpenGL Safety Critical library was implemented without hardware acceleration. This was done in such a way because software library is easier to certify in accordance with the avionics re- quirements. But usage of the software OpenGL does not provide acceptable visualization speed for modern Flight Display and 3D relief applications. So more complex visualization approach utilized the GPU acceleration capabilities was elaborated. Although the OpenGL library was implemented for a specific GPU and took into account its specificity, the described approach to adapt the MESA open source library can be used for other GPUs. An effective algorithm for multi-window visualization using the implemented library with hardware acceleration is present. The described approach allows you to achieve the visu- alization speed acceptable for the pilot display of the aircraft. Keywords: Pilot Display, Embedded Systems, Real-time Operating System, OpenGL Safety Critical, Multi-windowing. 1 Introduction In [1] requirements were formulated for a real-time operating system (RTOS) de- signed to work with integrated modular avionics. In particular, the RTOS should comply with the ARINC 653 standard [2].
    [Show full text]
  • Course Outline & Schedule
    Course Outline & Schedule Call US 408-759-5074 or UK +44 20 7620 0033 Suse Linux Advanced System Administration Curriculum Linux Course Code SLASA Duration 5 Day Course Price $2,425 Course Description This instructor led SUSE Linux Advanced System Administration training course is designed to teach the advanced administration, security, networking and performance tasks required on a SUSE Linux Enterprise system. Targeted to closely follow the official LPI curriculum (generic Linux), this course together with the SUSE Linux System Administration course will enable the delegate to work towards achieving the LPIC-2 qualification. Exercises and examples are used throughout the course to give practical hands-on experience with the techniques covered. Objectives The delegate will learn and acquire skills as follows: Perform administrative tasks with supplied tools such as YaST Advanced network configuration Network troubleshooting and analysing packets Creating Apache virtual hosts and hosting user web content Sharing Windows and Linux resources with SAMBA Configuring a DNS server and configuring DNS logging Configuring a DHCP server and client Sharing Linux network resources with NFS Creating Unit Files Configuring AutoFS direct and indirect maps Configuring a secure FTP server Configuring a SQUID proxy server Creating Btrfs subvolumes and snapshots Backing-up and restoring XFS filesystems Configuring LVM and managing Logical Volumes Managing software RAID Centralised storage with iSCSI Monitoring disk status and reliability with SMART Perpetual
    [Show full text]
  • Wxshapeframework: an Easy Way for Diagrams Manipulation in C++ Applications
    WSEAS TRANSACTIONS on COMPUTERS Michal Bliznak, Tomas Dulik, Vladimir Vasek WXSHAPEFRAMEWORK: AN EASY WAY FOR DIAGRAMS MANIPULATION IN C++ APPLICATIONS MICHAL BLIŽŇÁK1, TOMÁŠ DULÍK2, VLADIMÍR VAŠEK3 Department of Informatics and Artificial Inteligence1, 2, Department of Automation and Control Engineering3 Faculty of Applied Informatics, Tomas Bata University Nad Stráněmi 4511, 760 05, Zlín CZECH REPUBLIC [email protected], [email protected], [email protected] Abstract: wxShapeFramework is new cross-platform software library written in C++ programming language which is suitable for creation of software applications manipulating diagrams, images and other graphical objects. Thanks to the underlying technologies such as wxWidgets toolkit and its XML-based persistent data container add-on called wxXmlSerializer it is an ideal solution for rapid and easy cross-platform visualisation software development. The paper reveals how the wxSF allows user to easily create applications able to interactively handle various scenes consisting of pre-defined or user-defined graphic objects (both vector- and bitmap-based) or GUI controls, store them to XML files, export them to bitmap images, print them etc. Moreover, thanks to applied software licence the library can be used for both open-source and commercial projects on all main target platforms including MS Windows, MacOS and Linux. Keywords: Diagram, vector, bitmap, GUI, wxWidgets, wxXmlSerializer, wxShapeFramework, wxSF, C++ 1 Introduction called shapes (including basic rectangular and elliptic shapes, line and curve shapes, polygonal shapes, static Modern software applications often need the ability to and in-place editable text, bitmap images, etc.). graphically represent various data or logical structures, information flows, processes and similar The wxSF allows to define relationship between abstract information types in the form of diagrams.
    [Show full text]
  • OS Linux Desktop Effects
    OS Linux Desktop Effects Tomáš Dlouhý Y04A1L Presentation Content • Basics • Composite Managers • Compiz Fusion • Basic Effects • Advanced Effects • Small scratch Y04A1L Presentation Basics I • Linux Kernel • X Server • Window Manager • Composite Manager Y04A1L Presentation Basics II • How does compositing works? Y04A1L Presentation Composite Managers I • Compiz • Compiz Quinnstorm known as Beryl • Kwin from KDE4 platform • Compiz Fusion (in next chapter) Y04A1L Presentation Composite Managers II • Compiz – Released by Novell in january 2006 – Include effects as Cube, rain, wobbly... – Supports newest NVIDIA / ATI cards only – Most stable – Supports KDE and GNOME Y04A1L Presentation Composite Managers III • Beryl – Fork of compiz – Extended effects from Compiz – Adding: Show, Animations, Emerald (window borders),... – Works with all graphics cards which supports 3d acceleration (requires driver with support 3d) – Supports KDE and GNOME Y04A1L Presentation Composite Managers IV • Kwin 4 – Relativly newest, many effects still under development – Few effects as: mouse position highlight, show all desktop, animations,... – Many effects dont require 3d acceleration (using X Server DRI) Y04A1L Presentation Compiz Fusion • After reunion Compiz and Beryl (renamed to Compiz Extras) • First release in summer 2007 • Adding all advatages from both projects • Come with more effects as Expo, Paint,... • CompizConfig Settings Manager Y04A1L Presentation Basic effects I • Cube – Most popular effect – Can have more then 4 desktops – Change background
    [Show full text]
  • How-To Gnome-Look Guide
    HHOOWW--TTOO Written by David D Lowe GGNNOOMMEE--LLOOOOKK GGUUIIDDEE hen I first joined the harddisk, say, ~/Pictures/Wallpapers. right-clicking on your desktop Ubuntu community, I and selecting the appropriate You may have noticed that gnome- button (you know which one!). Wwas extremely look.org separates wallpapers into impressed with the amount of different categories, according to the customization Ubuntu had to size of the wallpaper in pixels. For Don't let acronyms intimidate offer. People posted impressive the best quality, you want this to you; you don't have to know screenshots, and mentioned the match your screen resolution. If you what the letters stand for to themes they were using. They don't know what your screen know what it is. Basically, GTK is soon led me to gnome-look.org, resolution is, click System > the system GNOME uses to the number one place for GNOME Preferences > Screen Resolution. display things like buttons and visual customization. The However, Ubuntu stretches controls. GNOME is Ubuntu's screenshots there looked just as wallpapers quite nicely if you picked default desktop environment. I impressive, but I was very the wrong size, so you needn't fret will only be dealing with GNOME confused as to what the headings about it. on the sidebar meant, and I had customization here--sorry no idea how to use the files I SVG is a special image format that Kubuntu and Xubuntu folks! downloaded. Hopefully, this guide doesn't use pixels; it uses shapes Gnome-look.org distinguishes will help you learn what I found called vectors, which means you can between two versions of GTK: out the slow way.
    [Show full text]