Building Debian-Based Products: Experiences in Collaboration

Similar documents
Deby - Reproducible and Maintainable Embedded Linux Environment with Poky

Isar. Build Debian-Based Products with BitBake. Baurzhan Ismagulov. Embedded Linux Conference Europe Oct 11-13, 2016 Berlin, Germany

Debian & Yocto: State of the Art

Yocto Overview. Dexuan Cui Intel Corporation

Dandified way to package management in Yocto Project

CE Workgroup Shared Embedded Linux Distribution Project

Poky Linux & OpenEmbedded based environment

Introduction to the Yocto Project. Developer s perspective

Yocto Project components

Industrial-grade Open Source Base Layer. Yoshitake Kobayashi, Toshiba Corporation Embedded Linux Conference North America, March 12-14, 2018

OpenEmbedded in the Real World

Building RT image with Yocto

Meeting the Yocto Project

Managing build infrastructure of a Debian derivative

Industrial-grade Open Source Base Layer Development

e2 factory the emlix Embedded Build Framework

Customizing with Yocto. Dexuan Cui Intel Corporation

How we added software updates to AGL

Industrial-grade Open Source Base Layer Development

Yocto Project and OpenEmbedded training 3-day session

NFV in the Embedded World: Yocto Project and OpenStack

Using the Yocto Autobuilder for Build and Release Management. Jate Sujjavanich Syntech Systems, Inc <jatedev -at- gmail.com> February 22, 2016

The Yocto Project. Chris Young S/W Specialist SILICA Europe. Harmonising Software Development across multiple Embedded ARM SOC targets

Zephyr Kernel Installation & Setup Manual

Tool installation for PMC-MC-X2/X4 with P2020 series processor

Yocto Project: A Vehicle for Embedded Qt Development

Using Openembedded with Snapdragon Flight

Yocto Project internal tools

KHEM RAJ YOCTO PROJECT/OPEN EMBEDDED

Install Eclipse Mosquitto MQTT on a Raspberry Pi 3B Running Raspbian Stretch

The ultimate guide to software updates on embedded Linux devices

Customizing the Yocto-Based Linux Distribution for Production

YumaPro Yocto Linux Quickstart Guide

Oxalis Getting Started

IOTIVITY AND EMBEDDED LINUX SUPPORT. Kishen Maloor Intel Open Source Technology Center

D1Y - Embedded Linux with Yocto

Prototyping IoT with. Pierre Ficheux 02/2017. Prototyping IoT with Yocto

Introduction to the Yocto Project

An Operating System Tailored for Containers and Built for the Embedded World

LotOS Framework. Getting Started Guide for Banana Pi. Copyright (C) 2015 ilbers GmbH Revision 1.1,

Delivering Predictability: The Yocto Project Autobuilder, Automated Sanity Testing, License Collection, and Build Statistics Tracking

Moving Your Application on the Raspberry Pi to the UC-8100-LX Computer. 1 Background Requirement Overview System Environment...

Intel Do-It-Yourself Challenge Compile C/C++ for Galileo Nicolas Vailliet

D1 - Embedded Linux. Building and installing an embedded and real-time Linux platform. Objectives. Course environment.

IoT usecase for Yocto Project

Embedded Linux. A Tour inside ARM's Kernel

RZ/G Verified Linux Package V2.1.0-RT

DEVELOPMENT GUIDE VAB-630. Linux BSP v

Are you Really Helped by Upstream Kernel Code?

January 28 29, 2014San Jose. Engineering Workshop

Zedboard Documentation

Lab2 - Bootloader. Conventions. Department of Computer Science and Information Engineering National Taiwan University

EMBEDDED LINUX ON ARM9 Weekend Workshop

It s not an embedded Linux distribution It creates a custom one for you. David Stewart Intel Corporation April 11, 2011

meta-raspberrypi Documentation

Travis Cardwell Technical Meeting

Cross platform enablement for the yocto project with containers. ELC 2017 Randy Witt Intel Open Source Technology Center

Tizen.IoTivity.Init. Tizen IoTivity 를시작하기위한환경설정. Geunsun Lee

Session Overview. Background Integration Mender libostree (aktualizr) SWUpdate resin.io

Surviving in the wilderness integrity protection and system update. Patrick Ohly, Intel Open Source Technology Center Preliminary version

DEVELOPMENT GUIDE AMOS-820. Linux BSP v

Crosstoolchains in Debian

Building CircuitPython

Embedded Systems Programming

Build Debian/Ubuntu packages to make it easy for users to install your software

Contributing to Automotive Grade Linux and GENIVI Development Platform

QPKG Debian6 V (Beta)

Firmware Test Suite (fwts) Alex Hung BIOS Engineer, Hardware Enablement

Yocto or Debian for Embedded Systems. White Paper

SPDX with Yocto Project

A Smart Way to Manage Packages in Yocto Project

Cross-compilation with Buildroot

Digi Embedded Yocto 1.6. First Steps Guide

DePloying an embedded ERLANG System

Embedded M2M Software Testing

Android System Development Training 4-day session

Intel Do-It-Yourself Challenge Rebuild (with) Yocto Nicolas Vailliet

SDK. About the Cisco SDK. Installing the SDK. Procedure. This chapter contains the following sections:

Improving the Yocto Project Developer Experience. How New Tools Will Enable a Better Workflow October 2016 Henry Bruce

diskimage-builder: Building Linux Images for Cloud / Virtualization / Container

Adding hardware support to Buildroot

di-netboot-assistant: Install Debian in your LAN

BeagleLogic Documentation

Platform Specific Guides. Release

Configuring Linux pppd for a Skywire Global LTE CAT-M1 NL-SW-LTE-QBG96

dh-virtualenv Documentation

Lab 6: OS Security for the Internet of Things

Mesos on ARM. Feng Li( 李枫 ),

SPDX and the Yocto Project Embedded Linux Conference Europe Edinburgh International Conference Centre Oct 25, 2013

Part A: Setup your kernel development environment

Lab 6: OS Security for the Internet of Things

User Guide Yocto Linux. Board Support Package For Intel Quark

AN APPROACH TO DELIVER HARDWARE - DEPENDENT PACKAGES IN ORDER TO REDUCE EFFORT OF UPDATING AGL DISTRIBUTION IMAGES

The distcc Utility for Remote Compiling

New Contributor Tutorial and Best Practices

UEFI Secure Boot and DRI. Kalyan Kumar N

Building Container Images with OpenEmbedded and the Yocto Project. Scott Murray

Arch Linux Grub You Need To Load The Kernel First

Building a Remote Control Robot with Automotive Grade Linux

Keeping up with LTS Linux Kernel Functional Testing on Devices

Transcription:

Building Debian-Based Products: Experiences in Collaboration Kazuhiro Hayashi, Toshiba Corporation (Baurzhan Ismagulov, ilbers GmbH) Jun 23, 2017

Motivation Deby and Isar : Both use Debian Have common goals Seek working with community Benefits Avoid effort duplication Achieve more 2

Contents What is Deby What is Isar Comparison What we do Summary 3

What is Deby? A reference Linux distribution for embedded system Shared Embedded Linux Distribution project One of the activities of CELP (Core Embedded Linux Project) https://www.linuxfoundation.jp/projects/core-embedded-linux Goals Create an industry-supported embedded Linux distribution Provide supports for long term Based on the two projects Debian GNU/Linux Cross-built from Debian source packages Yocto Project Cross-built with Poky build system and metadata for Debian source packages (meta-debian) Origin of the name Debian + Poky Debian-like 4

Deby: Purposes Providing features required in embedded systems, including civil infrastructure Stability Well-tested software set Long-term support 10+ years, especially for security fixes Customizability Changing configure options, compiler optimizations, etc. Wider hardware support Contribution and collaboration with other communities Debian, Debian-LTS Yocto Project Similar Debian-based projects like Isar 5

Deby: How it works Debian source packages A B C poky (Recipes) Fetch Extra sources hello meta-x (Custom layer) meta-debian C.bbappend A.bb B.bb C.bb debian-package.bbclass hello.bb X.bb defines how to build Debian source package X Common function for Debian sources meta (OE-Core).conf.bbclass.bb Cross build (bitbake) sysroots (Shared binaries) apt repository A.deb B.deb C.deb hello.deb Same buildflow as poky s apt-get install (bitbake) rootfs SDK kernel 6

Deby: How to use Repository https://github.com/meta-debian/meta-debian Quick start https://github.com/meta-debian/meta-debian/blob/morty/readme.md Example: Build the minimal images and run on QEMU $ git clone -b morty git://git.yoctoproject.org/poky.git $ cd poky $ git clone b morty https://github.com/meta-debian/meta-debian.git $ cd.. $ export TEMPLATECONF=meta-debian/conf $ source./poky/oe-init-build-env $ bitbake core-image-minimal $ runqemu qemux86 nographic 7

Deby: Current development status Debian version Yocto Project version Kernel BSP init manager Package manager 8 jessie (the latest stable) 2.2 morty (stable) 2.3 pyro (development) 4.4 LTS / 4.4 CIP QEMU: x86 (32bit, 64bit), ARM, PowerPC, MIPS BeagleBoard, PandaBoard, MinnowBoard BeagleBone Black, Raspberry Pi 1/2, Intel Edison busybox, systemd dpkg / apt Supported packages Approx. 600 8

What is Isar? Image generation for embedded systems Installs Debian binary packages as a base system Builds and installs product s software packages Creates ready-to-use firmware images Just a build system, not a distribution Origin Predecessor system at Siemens Developed by ilbers GmbH Sponsored by Siemens Uses: BitBake: Recipes for building and installing packages Yocto: Structure, layering, workflow (doesn t rely on poky code base) Debian: Binary packages (not included in Isar) Name Integration System for Automated Root filesystem generation A river in Munich 9

Isar: Goals Product build system One-command, on-demand building Reproducibly create ready-to-use firmware images Integrate product applications and customizations Multiple upstreams, multiple products, strong reuse Easy for beginners, familiar and powerful for advanced Customer requirements Low effort: Native builds, no massive changes to upstream packages Scale from small to big Security updates Maintenance: 10+ years Legal clearing 10

Isar: How it works Debian apt Create armhf build chroot buildchroot hello.git Build custom packages hello.deb Create armhf rootfs rootfs U-Boot kernel Install custom packages Create target image isar-image-base 11

Isar: How to use Repository https://github.com/ilbers/isar Quick start https://github.com/ilbers/isar/blob/master/doc/user_manual.md Example: Build a minimal image and run under QEMU $ su -c "apt-get install dosfstools git mtools multistrap parted python3 qemu qemu-user-static sudo" $ su -c "echo e $USER tall=nopasswd: ALL >>/etc/sudoers" $ git clone https://github.com/ilbers/isar $ cd isar $. isar-init-build-env../build $ bitbake isar-image-base $ start_armhf_vm # User: root, password: root 12

Isar: Current development status Debian versions Architectures Boards Boot Output Base system 8 Jessie, 9 Stretch i386, amd64, armhf QEMU: pc (i386, amd64), virt (armhf) Raspberry Pi, Siemens Nanobox U-Boot, grub, rpi boot loader, UEFI Disk image, filesystem image, Debian-based distro (not a part of Isar), e.g.: Debian: Init: sysvinit, busybox, systemd Package manager: dpkg, apt Source packages: 25432 (Stretch) Raspbian: 13

Comparison of Isar and Deby Base system Isar Debian binary packages (no rebuilding) Deby Binary packages cross-built from Debian source packages Build system bitbake poky (bitbake + OE-Core) Host tools Metadata (bitbake recipes) Debian: multistrap, dpkgbuildpackage, qemu Class and recipes for building product packages Recipes for image generation Debian packages not included poky Compilation Native Cross Benefits Common features Re-use Debian binaries and QA Fast (re-use, parallel builds) Lower development costs Common function to unpack Debian source packages (debian-package.bbclass) Full recipes for cross-building every Debian source package Affinity with Poky recipes Fully customizability No need to keep binary pkgs Based on Debian packages (stability, long-term maintenance) Build packages and images with bitbake recipes Generate images by installing binary packages Manage multiple products as a set of layers 14

Deby: Interaction points Debian Yocto Project ack-grep acpid... zip Deby bitbake oe-init-build-env runqemu zlib 15

Isar: Interaction points Isar bitbake wic isar-init-build-env Debian runqemu Yocto Project 0ad 0ad-data... zzz-to-char zzzeeksphinx bitbake wic oe-init-build-env runqemu 16

History of Debian-based projects Year debian-cross (cross) Emdebian Crush (cross) Grip (native) Debian (native) SLIND (cross) Isar (native) Deby (cross) Year 2006 1 st release 2006 2009 v1.0 v1.0 2009 2013 ML created v3.1 2013 2014 2015 2016 rebootstrap v0.1 published 2015 2016 v0.2 Contribution Contribution Share ideas, code Use debian/rules Cross-building 17

Ideas for collaboration As the first step Share the current benefits and issues of the both projects Find features that could be shared Create a proof of concept of the common features List up issues, then define the next iteration Main topics Both projects build Debian packages. Build time for subsequent builds can be improved by re-using previous build results Binary package caching Massive changes like cross-building is better done as a community Cross-building of packages Both projects require features to summarize license information in generated images Support license clearing 18

Binary package caching 1/2 Motivation Improve build time by re-using previous build results Common features After building a package: Save built packages for later use Before building a package: If a pre-built version exists, skip building During package installation: Install from the project s apt repo Approach Share functions to re-use built packages Goal: Implement a common layer providing binary package caching What we did Isar released the first implementation of binary package caching Deby implemented a proof of concept of binary package caching, referring to the results of Isar 19

Binary package caching 2/2 Lessons learned Deby Requires two architectures (not only target but also native) Poky always builds native binaries required for cross-building Need to adapt binary package caching to sysroots All built binaries are shared in sysroots for building others Isar: Very divergent code bases, much glue, little common code Next steps Deby Design ways how to support multiple architectures and adapt sysroots in binary package caching Or, consider changing the current sysroot based build flow to another one which has better affinity with Debian packages Isar: Propose a common layer 20

Isar: Scripts Debian Isar bitbake wic isar-init-build-env runqemu Yocto Project 0ad 0ad-data... zzz-to-char zzzeeksphinx bitbake wic oe-init-build-env runqemu 21

Cross-building of packages 1/3 Motivation Isar Experience in cross-building Debian packages Deby Developing and maintaining full recipes for cross-building Debian packages without debian/rules costs too much Planning to cross-build packages with debian/rules in recipes (.bb) Implement common functions to handle debian/rules Create patches for debian/rules to support cross-building Debian 10 (buster) A lot of efforts to support cross-building in debian/rules Discussed in https://lists.debian.org/debian-cross/ 22

Cross-building of packages 2/3 Common features debian/rules based package build (Deby: planning) Supporting cross-build in community makes big sense Approach Share existing resources for supporting cross-building Contribute to debian-cross Support cross-building not in-house but in Debian community What we did Isar provided examples of Common function (.bbclass) to cross-build Debian package Source packages with patches to support cross-building Deby Implemented proof-of-concept recipes which cross-build packages with debian/rules, referring to the example of Isar Identified 2191 of 3035 packages that don t support cross-building Added cross-building to libxinerama, reported #861073 23

Cross-building of packages 3/3 Lessons learned Deby debian/rules of several packages in Debian buster work with the Deby s cross toolchain without modification Issue: debian/rules depends on commands and data in native system ignoring sysroots Isar: Initially released native building under QEMU to avoid massive changes; re-adding cross-building due to performance ELBE reports issues with distcc, good experiences with icecc Next steps Deby Consider new design to adapt debian/rules to sysroots Keep creating patches for debian/rules to support cross-building Isar Merge cross-building Implement automatic cross-dependency installation in a Debian way 24

Deby: Interaction points (Current) Debian Yocto Project ack-grep acpid... zip Deby bitbake oe-init-build-env runqemu zlib 25

Deby: Interaction points (Future) Debian Yocto Project ack-grep acpid... zip Deby bitbake oe-init-build-env runqemu zlib 26

Support License Clearing 1/2 Motivation As general issues, examining and summarizing license information in generated images take time and require carefulness As long as using the same Debian source packages, such efforts should be shared in related projects Approach Share results of license examining and summarizing by using the common tools Improve the quality of the output Reduce costs for examining and summarizing Support machine readable license data in Debian package level DEP-5 formatted debian/copyright https://www.debian.org/doc/packaging-manuals/copyrightformat/1.0/ First, keep accurate license data in Debian community Contribute to Debian by posting patches for debian/copyright Second, effectively summarize license information according to debian/copyright by sharing common tools 27

Support License Clearing 2/2 What we did Setup tools for investigating and summarizing license information Scanning & Clearing: FOSSology Summarizing: sw360 Provided DEP-5 copyright for zlib, reported #862260 Initial output from FOSSology, manual editing Lessons learned Need to clear licenses and copyright holder name in debian directory even if no copyright holder name is detected by scanning tool Next steps Keep posting patches for debian/copyright to support DEP-5 with clarifying policies of contribution Share the tools and results of license investigation for Debian packages with related projects Work with sw360 and ELBE on BoM and release notes generation 28

Summary Common goals Package building, image generation and customization, licensing support Divergent goals Deby: Max customizability Isar: Min modifications Current and future work Converge towards debian/rules and cross-building Provide tools to support license clearing Cross-building: Provide patches to Debian Licensing: Move to DEP-5 and provide patches to Debian Lessons (re-)learned Provide an implementation Upstream your work Bigger changes require community work Providing a common layer for disparate code bases is a challenge Proper license clearing costs time Performance does matter 29