Using Open Source Software to Build an Industrial Grade Embedded

Total Page:16

File Type:pdf, Size:1020Kb

Using Open Source Software to Build an Industrial Grade Embedded Open Source Summit Japan 2019 Using Open Source Software to Build an Industrial-grade Embedded Linux Platform from Scratch SZ Lin (林上智) Embedded Linux Development Center, Software R&D Engineer 07/19, 2019 About Me SZ LIN (林上智) Software Engineer at Moxa Cybersecurity Fundamentals Specialist ISA/ IEC 62443 Debian Developer Blog - https://szlin.me 2 Industrial Embedded Linux Platforms Application Smart Smart Smart Smart Smart Smart Rail Grid Oil Field Transportation Factory Marine Edge Connectivity Industrial Computing Network Infrastructure Industrial Serial I/O Video Embedded Computers Industrial Wireless Industrial Connectivity Connectivity Connectivity Ethernet LAN Routers Device 3 Before Using Open Source Software Something You Should Know 4 Copyright Patent Copyright is a legal right, that grants A patent gives its owner the right to the creator of an original work exclude others from making, using, exclusive rights to determine whether, selling, and importing an invention and under what conditions, this for a limited period of time, usually original work may be used by others twenty years. src: https://en.wikipedia.org/wiki/Copyright src: https://en.wikipedia.org/wiki/Patent 5 Copyright Patent Identify key recommended processes It is a shared defensive patent pool for effective open source management with the mission to protect Linux [2]. [1]. 6 Processes, Tooling and Support OpenChain SPDX [3] FOSSology [4] Trust between entities in the supply chain Trust for software packages Free scanning technology The OpenChain Project builds Software Package Data Exchange FOSSology is a open source trust in open source by making (SPDX) is a file format used to license compliance software open source license document information on the system and toolkit compliance simpler and more software licenses under which a consistent given piece of computer software is distributed. 7 Industrial/ Harsh Environments Including smart rail, smart grid, intelligent transportation, factory automation, oil & gas, marine, and more 8 Target Application Longevity + Stability + Security Resource Real-time Safety Performance Limited 9 Target Application Longevity + Stability + Security Hardware Software Resource Real-time Safety Performance Limited 10 Lifecycle of Industrial-grade Embedded Linux Platform Development Phase Maintenance Phase Regular Build and Testing Update 1 2 3 4 System Long-term Preparation Test 11 Development Phase Design and development according to application 12 Root filesystem User Applications User Space GNU/ Linux Init system GNU C library System call interface Kernel Kernel Space Bootloader Architecture-dependent firmware Toolchain Hardware and peripheral devices 13 Choose Proper Bootloader 14 Bootloader behavior (A case of ARM-based architecture) Linux Linux uImage Decompressor Loading Decompress U-boot Relocate U-boot 2nd Stage ROM Load MLO 1st Stage CPU DRAM 15 Supported Category License Supported Platforms Maintainer UEFI 68k, ARM, Blackfin, MicroBlaze, MIPS, Nios, DENX Das U-Boot GPL-2+ Y Software [5] SuperH, PPC, RISC-V, Engineering x86 (on top of Coreboot) IA-32, x86-64, ARMv7, Coreboot [6] GPL-2 ARMv8, MIPS, RISC-V, Y coreboot.org POWER8 IA-32, x86-64, IA-64, GRUB GPL-3 ARM, PowerPC, MIPS Y GNU Project and SPARC GNU GPLv3, Modified BSD License (original program), x86, x86-64, or Roderick W. rEFInd [9] Y additional ARM64 Smith components released under various licenses 16 Kernel Space 17 Choose Proper Kernel Based on the application requirement 18 Linux Kernel Comparison Table Latest Category Target Application Maintainer version • Performance Linux kernel 5.2 Kernel.org • Resource Limited [12] [13] • Real-time Real Time Linux Preempt RT kernel 5.2 • Functional safety collaborative project • Resource Limited *Real-time application [14][15] 19 SoC Board Support Package Kernel • Kernel version depends on SoC vendors – Well made but not well maintained • Contain lots of in-house patches – Errata patches – Specific feature patches – … • Different SoC might use different versions of kernel • The lifetime is unsure 20 LTS: Long Term Stable Kernel [16] Extend software uptime for stable kernel • Only accept bug fixes and security fixes img: https://www.kernel.org/category/releases.html 21 LTSI: Long Term Support Initiative [17] • Linux Foundation collaborative project – Based on LTS – Add another chance to include further patches on top of LTS – Auto Test framework – Same lifetime with LTS (yearly release and 2 years life time) 22 CIP (Civil Infrastructure Platform) [19] • Linux Foundation collaborative project – Support kernel and core package – Auto Test framework – Maintenance period • 10 years and more (10-20 years) 23 img: https://wiki.linuxfoundation.org/civilinfrastructureplatform/cipconferences 24 Linux Kernel Source Comparison Table Maintenance Supported Latest Version Period Features Realtime Maintainer Version (years) kernel SoC SoC vendor BSP ? Bug fixes ? N kernel team kernel LTS • Bug fixes 2 ~ ? 4.19 N Kernel.org kernel • Security fixes • Bug fixes LTSI • Security fixes 2 ~ ? 4.14 N LTSI kernel • Specific features • New features • Bug fixes CIP • Security fixes 10 + 4.19 Y CIP kernel • Specific features • New features 25 Longevity + Stability + Security Mutually Exclusive ? Resource Real-time Safety Performance Limited 26 Multiple Kernel In Single Platform To fulfill multiple user scenarios 27 FIT (Flattened Image Tree) (A case of ARM-based architecture) • Tree data structure • Handle multiple types of image – kernel : kernel image – fdt : dtb file – ramdisk : root file system • Image hashing – md5 – sha1 • Image signing • Each node in configurations has their image configuration in booting stage 28 More info.: http://git.denx.de/?p=u- boot.git;a=blob_plain;f=doc/uImage.FIT/source_file_format.txt;hb=HEAD 29 User Space 30 ELISA: Safety-Critical Systems [20] • Linux Foundation collaborative project – Build and certify Linux-based safety-critical applications – Define and maintain a common set of tools and processes • SIL2LinuxMP [21] project and the Linux Foundation’s Real-Time Linux project – IEC 61508 31 Choose Proper C Library and Toolchain 32 C Library and Toolchain Comparison Table Target Maintainer Category License Features Application User • Stable ABI • Backward compatibility • Fully symbol versioning • Performance glibc [25] LGPL 2.1 • Stack smashing GNU protection/ heap • Security corruption detection • Profiling • No-MMU architecture • Resource uClibc-ng LGPL 2.1 support uclibc-ng.org [26] • Tiny size Limited • Stable ABI • Backward compatibility • Resource Musl [28] MIT • Stack smashing Limited musl-libc.org protection/ heap • Security corruption detection Other option [93] * Be aware of year 2038 problem [29] 33 Year 2038 Problem [92] • The time_t datatype is a data type in the ISO C library and kernel structure defined for storing system time values. • 32-bit system can represent dates from Dec 13 1901 Jan 19th 2038 • It causes integer overflowing on 03:14:08 UTC 19 January 2038 34 Init System 35 Init System Comparison Table Category License C Library User Note uClinux-ng Resource- Glibc ProteanOS busybox GPL 2.0 limited musl PiBox application uClinux-ng sysvinit GPL 2.0+ glibc Devuan musl Arch, CentOS, CoreOS, Debian, Linux only systemd LGPL 2.1+ glibc Fedora, Mint, OpenSUSE, Redhat, Ubuntu musl Gentoo openrc 2-clause BSD glibc Alpine Linux upstart GPL 2.0 glibc Chromium OS Linux only 36 Choose proper RFS (Root filesystem) Stable root filesystem 37 Root filesystem Comparison Table Maintenance Number of Security Category Period C Library CI packages Tracker (years) 300 ~ 400 • uClibc Busybox ? ? ? applets • glibc Latest release the It depends on • glibc Yocto previous two Y Y meta-* • musl releases • glibc Buildroot 1 2000+ [42] • musl Y Y • uClibc-ng 3 + • glibc Debian 2 (i386, amd64, armel, 51000+ Y Y • musl armhf and arm64) 38 System Development Tools 39 System Development Tools Comparison Table System System Development Root filesystem Toolchain Development Tools Tools License Busybox Yocto OE-Core MIT Yocto Yocto OE-Core MIT Buildroot Buildroot Buildroot GPL 2.0+ Metadata: MIT ISAR Debian toolchain Others: GPL 2.0 ELBE Debian toolchain GPL 3.0+ Debian Yocto Deby (meta- OE-Core MIT debian) Live-build Debian toolchain GPL 3.0+ 40 Why We Choose Debian [49] Stability Scalability Good system security [50] unstable → testing → stable Server, Desktop, Everything is open Laptop, Embedded devices Usually, fixed packages are uploaded within a few days Long term support Multiple architectures Incredible amounts 5 more years by Debian-LTS project alpha, amd64, armel, armhf, of software (i386, amd64, armel, armhf and arm64) aarch64, hppa, i386, ia64, mips, Debian comes with over 51000 mipsel, powerpc, s390, and spar different pieces of software with free 41 Development Phase Regular Build and Testing Update 1 2 3 4 System Long-term Preparation Test More info: Building, Deploying and Testing an Industrial Linux Platform Open Source Summit Japan 2017 [51] 42 Merge Master CI/ CD Automatic Release Pipeline Develop Pull Request Feature .. N Pass Y Fork Maintainer Approval Patches Local Y N Branch Pass Internal/ External Developers Notification 43 CI/ CD Automatic Release Pipeline Continuous Integration Code Continuous Delivery Continuous Deployment Deploying Release 1 2 3 4 Building Testing 44 CI/ CD Automatic Release Pipeline Continuous Integration Code Deploying Release 1 2 3 4 Building Testing 45 Patches Local Static Program Branch Analysis Coding style Internal/ External OWASP [52] Infer [53] Slave
Recommended publications
  • Alpine Linux: Minimalistická Distribuce Nejen Na Server
    Alpine Linux: minimalistická distribuce nejen na server Petr Krčmář 5. března 2017 Uvedené dílo (s výjimkou obrázků) podléhá licenci Creative Commons Uveďte autora 3.0 Česko. Petr Krčmář (Root.cz, vpsFree.cz) Alpine Linux: minimalistická distribuce nejen na server 5. března 2017 1 / 19 Petr Krčmář (Root.cz, vpsFree.cz) Alpine Linux: minimalistická distribuce nejen na server 5. března 2017 2 / 19 Prezentace už teď na webu https://www.petrkrcmar.cz Petr Krčmář (Root.cz, vpsFree.cz) Alpine Linux: minimalistická distribuce nejen na server 5. března 2017 3 / 19 Historie Alpine první verze 2006 původně jako fork LEAF (Linux Embedded Appliance Framework) to je zase fork LRP (Linux Router Project) = disketové distribuce vývojáři ale chtěli jít za hranici disket zůstala jednoduchost a přehlednost umožnilo to nasazení mimo jednoduché firewally dnes plnohodnotná distribuce stále umí běžet z RAM nezávislá, nekomerční Petr Krčmář (Root.cz, vpsFree.cz) Alpine Linux: minimalistická distribuce nejen na server 5. března 2017 4 / 19 K čemu se hodí? velká plnohodnotná distribuce embedded zařízení (síťové prvky) firewally routery ústředny VoIP servery a kontejnery ale i na desktop (Xfce, Gnome) Petr Krčmář (Root.cz, vpsFree.cz) Alpine Linux: minimalistická distribuce nejen na server 5. března 2017 5 / 19 Motto Small. Simple. Secure. Petr Krčmář (Root.cz, vpsFree.cz) Alpine Linux: minimalistická distribuce nejen na server 5. března 2017 6 / 19 Small. instalace v kontejneru jen 8 MB, 260 souborů 16 balíčků, jen 6 z jiných projektů instalace do virtuálu 53 MB, 1222 souborů 26 balíčků plná instalace na železo 302 MB, 4686 souborů 27 balíčků hodně jaderných modulů Petr Krčmář (Root.cz, vpsFree.cz) Alpine Linux: minimalistická distribuce nejen na server 5.
    [Show full text]
  • Glibc and System Calls Documentation Release 1.0
    Glibc and System Calls Documentation Release 1.0 Rishi Agrawal <[email protected]> Dec 28, 2017 Contents 1 Introduction 1 1.1 Acknowledgements...........................................1 2 Basics of a Linux System 3 2.1 Introduction...............................................3 2.2 Programs and Compilation........................................3 2.3 Libraries.................................................7 2.4 System Calls...............................................7 2.5 Kernel.................................................. 10 2.6 Conclusion................................................ 10 2.7 References................................................ 11 3 Working with glibc 13 3.1 Introduction............................................... 13 3.2 Why this chapter............................................. 13 3.3 What is glibc .............................................. 13 3.4 Download and extract glibc ...................................... 14 3.5 Walkthrough glibc ........................................... 14 3.6 Reading some functions of glibc ................................... 17 3.7 Compiling and installing glibc .................................... 18 3.8 Using new glibc ............................................ 21 3.9 Conclusion................................................ 23 4 System Calls On x86_64 from User Space 25 4.1 Setting Up Arguements......................................... 25 4.2 Calling the System Call......................................... 27 4.3 Retrieving the Return Value......................................
    [Show full text]
  • Meeting Agenda 4:30 – 6:00 PM, Wednesday, Nov 2Nd, 2016 Lyons Town Hall
    Meeting Agenda 4:30 – 6:00 PM, Wednesday, Nov 2nd, 2016 Lyons Town Hall I. Roll Call, Agenda, Minutes • Amendments to Agenda • Approve Minutes from Oct 19th • UEB Officers and Member Lead Areas • Upcoming Meetings - Nov 12, 2016 9 AM or 1 PM - Lyons Boards and Commissions Training - Lyons ​ ​ ​ Nov 9. 8 AM - Northern Water Fall Water Users Meeting - Longmont, Best Western 1850 Industrial Cir. Dec 2nd - CAMU Fall Meeting - Fairfield & Woods in Denver, CO II. Audience Business III. Liaison Updates • Board of Trustees Update - MEAN meeting Report • Staff, Engineering Update - Honeywell Savings Gaurantee IV. Continued Business ● Town Utility Account tracking V. New Business ● Water/Wastewater Rate and CIP Study Presentation RG & Assoc. VI. Parking Lot • 2017 Utility FUnd Budget, Pipe Water rates for 2017 Budget, • Reserve/Rate Stabilization Funds • Wastewater Pretreatment Policy • LRAP INF 2.2.1 • Municipal Code Corrections UEB Meeting Minutes, 19 Oct 2016 Meeting Time and Location: Began at 4:30 at Town Hall. ​ Attendance:, Aaron Caplan, Lee Hall, Coco Gordon, John Cowdry, Chuck Keim, Dan Reitz, Jay Stott ​ Staff: Kyle Miller Liaisons: Guests: ​ ​ Amendments to Agenda: Welcomed Jay Stott as the newest member of the UEB. ​ Previous Minutes: . Reviewed and modified Oct 5th Minutes under Water Wastewater CIP to add “Areas ​ where there is no looping of the water mains need looping. It was emphasized to try and coordinate getting water, and wastewater done first in areas that need paving.” Aaron had not followed up with Parks and ​ Rec to find out if they were budgeting for water usage. He would do so. Then approved minutes.
    [Show full text]
  • Red Hat Enterprise Linux 6 Developer Guide
    Red Hat Enterprise Linux 6 Developer Guide An introduction to application development tools in Red Hat Enterprise Linux 6 Dave Brolley William Cohen Roland Grunberg Aldy Hernandez Karsten Hopp Jakub Jelinek Developer Guide Jeff Johnston Benjamin Kosnik Aleksander Kurtakov Chris Moller Phil Muldoon Andrew Overholt Charley Wang Kent Sebastian Red Hat Enterprise Linux 6 Developer Guide An introduction to application development tools in Red Hat Enterprise Linux 6 Edition 0 Author Dave Brolley [email protected] Author William Cohen [email protected] Author Roland Grunberg [email protected] Author Aldy Hernandez [email protected] Author Karsten Hopp [email protected] Author Jakub Jelinek [email protected] Author Jeff Johnston [email protected] Author Benjamin Kosnik [email protected] Author Aleksander Kurtakov [email protected] Author Chris Moller [email protected] Author Phil Muldoon [email protected] Author Andrew Overholt [email protected] Author Charley Wang [email protected] Author Kent Sebastian [email protected] Editor Don Domingo [email protected] Editor Jacquelynn East [email protected] Copyright © 2010 Red Hat, Inc. and others. The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version. Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
    [Show full text]
  • Embedded Linux Systems with the Yocto Project™
    OPEN SOURCE SOFTWARE DEVELOPMENT SERIES Embedded Linux Systems with the Yocto Project" FREE SAMPLE CHAPTER SHARE WITH OTHERS �f, � � � � Embedded Linux Systems with the Yocto ProjectTM This page intentionally left blank Embedded Linux Systems with the Yocto ProjectTM Rudolf J. Streif Boston • Columbus • Indianapolis • New York • San Francisco • Amsterdam • Cape Town Dubai • London • Madrid • Milan • Munich • Paris • Montreal • Toronto • Delhi • Mexico City São Paulo • Sidney • Hong Kong • Seoul • Singapore • Taipei • Tokyo Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals. The author and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein. For information about buying this title in bulk quantities, or for special sales opportunities (which may include electronic versions; custom cover designs; and content particular to your business, training goals, marketing focus, or branding interests), please contact our corporate sales depart- ment at [email protected] or (800) 382-3419. For government sales inquiries, please contact [email protected]. For questions about sales outside the U.S., please contact [email protected]. Visit us on the Web: informit.com Cataloging-in-Publication Data is on file with the Library of Congress.
    [Show full text]
  • Reference Architecture Specification
    Linux based 3G Multimedia Mobile-phone Reference Architecture Specification Draft 1.0 NEC Corporation Panasonic Mobile Communication Ltd. CE Linux Forum Technical Document Contents Preface......................................................................................................................................iii 1. Introduction.............................................................................................................................1 2. Scope .....................................................................................................................................1 3. Reference................................................................................................................................1 4. Definitions and abbreviations ....................................................................................................1 5. Architecture ............................................................................................................................3 5.1 A-CPU ..................................................................................................................................3 5.2 C-CPU..................................................................................................................................5 6. Description of functional entities ..............................................................................................5 6.1 Kernel....................................................................................................................................5
    [Show full text]
  • Cp 99, Other Filing/Pleading, 11/12/2014
    BINGHAM Catherine Wang Brett P. Ferenchak catherine. wang@ bingham. com [email protected] November 11, 2014 Via Overnight Courier and E-Mail Oregon Public Utility Commission Attn: Filing Center 550 Capitol Street, N.E. Suite 215 Salem, OR 97301-2551 [email protected] Re: Business Telecom, LLC d/b/a EarthLink Business I Notification of Conversion and Associated Name Change Dear Sir or Madam: Business Telecom, LLC d/b/a EarthLink Business I (formerly known as Business Telecom, Inc. d/b/a EarthLink Business III) (the "Company") hereby notifies the Commission (1) that the Company converted from a North Carolina corporation to a North Carolina limited liability company' and (2) of the associated name change to "Business Telecom, LLC d/b/a EarthLink Business 1." The Company requests that the Commission update its records, including the Company's Certificate,2 to reflect the conversion and associate name change and, to the extent necessary, approve these changes. Attached hereto are the Company's conversion documents and updated authorization to transact business in Oregon and trade name registration. Beijing Boston Frankfurt Hartford Hong Kong London los Angeles New York Orange County San Francisco Santa Monica Silicon Valley Tokyo Washington The conversion of the Company to a limited liability company was merely a change in its corporate form -the conversion was accomplished through the filing of Articles of Bingham McCutchen LLP Conversion in North Carolina and did not entail any merger or other transactions interrupting 2020 K Street NW Washington, DC the existence of the Company. 20006-1806 2 The Company is authorized to provide interexchange telecommunications services pursuant to Order No.
    [Show full text]
  • Smashing the Stack Protector for Fun and Profit
    Smashing the Stack Protector for Fun and Profit Bruno Bierbaumer1 ( ), Julian Kirsch1, Thomas Kittel1, Aurélien Francillon2, and Apostolis Zarras3 1 Technical University of Munich, Munich, Germany [email protected] 2 EURECOM, Sophia Antipolis, France 3 Maastricht University, Maastricht, Netherlands Abstract. Software exploitation has been proven to be a lucrative busi- ness for cybercriminals. Unfortunately, protecting software against attacks is a long-lasting endeavor that is still under active research. However, certain software-hardening schemes are already incorporated into current compilers and are actively used to make software exploitation a compli- cated procedure for the adversaries. Stack canaries are such a protection mechanism. Stack canaries aim to prevent control flow hijack by detecting corruption of a specific value on the program’s stack. Careful design and implementation of this conceptually straightforward mechanism is crucial to defeat stack-based control flow detours. In this paper, we examine 17 different stack canary implementations across multiple versions of the most popular Operating Systems running on various architectures. We systematically compare critical implementation details and introduce one new generic attack vector which allows bypassing stack canaries on current Linux systems running up-to-date multi-threaded software altogether. We release an open-source framework (CookieCrumbler) that identifies the characteristics of stack canaries on any platform it is compiled on and we propose mitigation techniques against stack-based attacks. Although stack canaries may appear obsolete, we show that when they are used correctly, they can prevent intrusions which even the more sophisticated solutions may potentially fail to block. 1 Introduction Buffer overflow vulnerabilities are as old as the Internet itself.
    [Show full text]
  • Operating Systems and Applications for Embedded Systems >>> Toolchains
    >>> Operating Systems And Applications For Embedded Systems >>> Toolchains Name: Mariusz Naumowicz Date: 31 sierpnia 2018 [~]$ _ [1/19] >>> Plan 1. Toolchain Toolchain Main component of GNU toolchain C library Finding a toolchain 2. crosstool-NG crosstool-NG Installing Anatomy of a toolchain Information about cross-compiler Configruation Most interesting features Sysroot Other tools POSIX functions AP [~]$ _ [2/19] >>> Toolchain A toolchain is the set of tools that compiles source code into executables that can run on your target device, and includes a compiler, a linker, and run-time libraries. [1. Toolchain]$ _ [3/19] >>> Main component of GNU toolchain * Binutils: A set of binary utilities including the assembler, and the linker, ld. It is available at http://www.gnu.org/software/binutils/. * GNU Compiler Collection (GCC): These are the compilers for C and other languages which, depending on the version of GCC, include C++, Objective-C, Objective-C++, Java, Fortran, Ada, and Go. They all use a common back-end which produces assembler code which is fed to the GNU assembler. It is available at http://gcc.gnu.org/. * C library: A standardized API based on the POSIX specification which is the principle interface to the operating system kernel from applications. There are several C libraries to consider, see the following section. [1. Toolchain]$ _ [4/19] >>> C library * glibc: Available at http://www.gnu.org/software/libc. It is the standard GNU C library. It is big and, until recently, not very configurable, but it is the most complete implementation of the POSIX API. * eglibc: Available at http://www.eglibc.org/home.
    [Show full text]
  • Introduction Use Runit with Traditional Init (Sysvinit)
    2021/07/26 19:10 (UTC) 1/12 Runit Runit Introduction runit is a UNIX init scheme with service supervision. It is a cross-platform Unix init scheme with service supervision, a replacement for sysvinit, and other init schemes and supervision that are used with the traditional init. runit is compatible with djb's daemontools. In Unix-based computer operating systems, init (short for initialization) is the first process started during booting of the computer system. Init is a daemon process that continues running until the system is shut down. Slackware comes with its own legacy init (/sbin/init) from the sysvinit package, that used to be included in almost all other major Linux distributions. The init daemon (or its replacement) is characterised by Process ID 1 (PID 1). To read on the benefits of runit, see here: http://smarden.org/runit/benefits.html * Unless otherwise stated, all commands in this article are to be run by root. Use runit with traditional init (sysvinit) runit is not provided by Slackware, but a SlackBuild is maintained on https://slackbuilds.org/. It does not have any dependencies. As we do not want yet to replace init with runit, run the slackbuild with CONFIG=no: CONFIG=no ./runit.SlackBuild Then install the resulting package and proceed as follows: mkdir /etc/runit/ /service/ cp -a /usr/doc/runit-*/etc/2 /etc/runit/ /sbin/runsvdir-start & Starting via rc.local For a typical Slackware-stlyle service, you can edit /etc/rc.d/rc.local file if [ -x /sbin/runsvdir-start ]; then /sbin/runsvdir-start & fi and then edit write /etc/rc.d/rc.local_shutdown #!/bin/sh SlackDocs - https://docs.slackware.com/ Last update: 2020/05/06 08:08 (UTC) howtos:slackware_admin:runit https://docs.slackware.com/howtos:slackware_admin:runit RUNIT=x$( /sbin/pidof runsvdir ) if [ "$RUNIT" != x ]; then kill $RUNIT fi Then give rc.local_shutdown executive permission: chmod +x /etc/rc.d/rc.local_shutdown and reboot Starting via inittab (supervised) Remove the entries in /etc/rc.d/rc.local and /etc/rc.d/rc.local_shutdown described above.
    [Show full text]
  • The Glib/GTK+ Development Platform
    The GLib/GTK+ Development Platform A Getting Started Guide Version 0.8 Sébastien Wilmet March 29, 2019 Contents 1 Introduction 3 1.1 License . 3 1.2 Financial Support . 3 1.3 Todo List for this Book and a Quick 2019 Update . 4 1.4 What is GLib and GTK+? . 4 1.5 The GNOME Desktop . 5 1.6 Prerequisites . 6 1.7 Why and When Using the C Language? . 7 1.7.1 Separate the Backend from the Frontend . 7 1.7.2 Other Aspects to Keep in Mind . 8 1.8 Learning Path . 9 1.9 The Development Environment . 10 1.10 Acknowledgments . 10 I GLib, the Core Library 11 2 GLib, the Core Library 12 2.1 Basics . 13 2.1.1 Type Definitions . 13 2.1.2 Frequently Used Macros . 13 2.1.3 Debugging Macros . 14 2.1.4 Memory . 16 2.1.5 String Handling . 18 2.2 Data Structures . 20 2.2.1 Lists . 20 2.2.2 Trees . 24 2.2.3 Hash Tables . 29 2.3 The Main Event Loop . 31 2.4 Other Features . 33 II Object-Oriented Programming in C 35 3 Semi-Object-Oriented Programming in C 37 3.1 Header Example . 37 3.1.1 Project Namespace . 37 3.1.2 Class Namespace . 39 3.1.3 Lowercase, Uppercase or CamelCase? . 39 3.1.4 Include Guard . 39 3.1.5 C++ Support . 39 1 3.1.6 #include . 39 3.1.7 Type Definition . 40 3.1.8 Object Constructor . 40 3.1.9 Object Destructor .
    [Show full text]
  • Porting Musl to the M3 Microkernel TU Dresden
    Porting Musl to the M3 microkernel TU Dresden Sherif Abdalazim, Nils Asmussen May 8, 2018 Contents 1 Abstract 2 2 Introduction 3 2.1 Background.............................. 3 2.2 M3................................... 4 3 Picking a C library 5 3.1 C libraries design factors . 5 3.2 Alternative C libraries . 5 4 Porting Musl 7 4.1 M3andMuslbuildsystems ..................... 7 4.1.1 Scons ............................. 7 4.1.2 GNUAutotools........................ 7 4.1.3 Integrating Autotools with Scons . 8 4.2 Repositoryconfiguration. 8 4.3 Compilation.............................. 8 4.4 Testing ................................ 9 4.4.1 Syscalls ............................ 9 5 Evaluation 10 5.1 PortingBusyboxcoreutils . 10 6 Conclusion 12 1 Chapter 1 Abstract Today’s processing workloads require the usage of heterogeneous multiproces- sors to utilize the benefits of specialized processors and accelerators. This has, in turn, motivated new Operating System (OS) designs to manage these het- erogeneous processors and accelerators systematically. M3 [9] is an OS following the microkernel approach. M3 uses a hardware/- software co-design to exploit the heterogeneous systems in a seamless and effi- cient form. It achieves that by abstracting the heterogeneity of the cores via a Data Transfer Unit (DTU). The DTU abstracts the heterogeneity of the cores and accelerators so that they can communicate systematically. I have been working to enhance the programming environment in M3 by porting a C library to M3. I have evaluated different C library implementations like the GNU C Library (glibc), Musl, and uClibc. I decided to port Musl as it has a relatively small code base with fewer configurations. It is simpler to port, and it started to gain more ground in embedded systems which are also a perfect match for M3 applications.
    [Show full text]