OpenEmbedded for Product Development Matthew Locke Embedded Linux Conference April 2008

Similar documents
Developing Embedded Linux Devices Using the Yocto Project

Developing Embedded Linux Devices Using the Yocto Project

MontaVista Linux 6. Streamlining the Embedded Linux Development Process

Yocto Project Eclipse plug-in and Developer Tools Hands-on Lab

OpenEmbedded for medical devices

Track One Building a connected home automation device with the Digi ConnectCore Wi-i.MX51 using LinuxLink

Creating a Custom Embedded Linux* OS for Any Embedded Device using the Yocto Project*

Create a Custom Embedded Linux Distribu3on for Any Embedded Device Using the Yocto Project

Embedded Linux development training 4 days session

Create a Custom Embedded Linux Distribu3on for Any Embedded Device Using the Yocto Project

Embedded Linux development with Buildroot training 3-day session

Embedded Linux Platform Developer

Building Embedded Systems

Overview. Open source toolchains. Buildroot features. Development process

Survey of Filesystems for Embedded Linux. Presented by Gene Sally CELF

Using Buildroot for real projects

Università Degli Studi di Parma. Distributed Systems Group. Android Development. Lecture 1 Android SDK & Development Environment. Marco Picone

Five standard procedures for building the android system. Figure1. Procedures for building android embedded systems

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

Advanced Customizations

Yocto Project ADT, Eclipse plug-in and Developer Tools

Version 1.0. File System. Network Settings

Developing applications on Yocto. Lianhao Lu Intel Corporation Feb. 29th, 2012

The Yocto Project Eclipse plug-in: An Effective IDE Environment for Embedded Application and System Developers

Android Development. Lecture AD 0 Android SDK & Development Environment. Università degli Studi di Parma. Mobile Application Development

PROPOSAL: OCP COMMON LINUX SWITCH DISTRIBUTION. Rob Sherwood and Mansour Karam OCP November 2013

Reminders. Lab opens from today. Many students want to use the extra I/O pins on

Building an audio player using the Texas Instruments OMAP-L137

Stefan Schmidt. LinuxTag

Buildroot for Vortex86EX (2016/04/20)

HTTP-FUSE PS3 Linux: an internet boot framework with kboot

Android Basics. Xin Yang

Harmonizing policy management with Murphy in GENIVI, AGL and TIZEN IVI

ALERT installation setup

Customize Mobile Apps with MicroStrategy SDK: Custom Security, Plugins, and Extensions

#311 Engineer. Year of birth 1967 Specialities: Embedded Systems, Linux

Q N X S O F T W A R E D E V E L O P M E N T P L A T F O R M v Steps to Developing a QNX Program Quickstart Guide

opensuse.org Build Service

Application Note: AN00141 xcore-xa - Application Development

Specialized Android APP Development Program with Java (SAADPJ) Duration 2 months

Chapter 1. Introduction to ios Development. Objectives: Touch on the history of ios and the devices that support this operating system.

An Embedded Wireless Mini-Server with Database Support

SheevaPlug Development Kit README Rev. 1.2

Deploying a Virtual Machine (Instance) using a Template via CloudStack UI in v4.5.x (procedure valid until Oct 2015)

Lab 0 (Setting up your Development Environment) Week 1

APPLICATION NOTE. How to build pylon applications for ARM

MontaVista Linux 6. Technical brief. Table of Contents» MontaVista Linux 6: The New approach to Embedded

Update on filesystems for flash storage

Getting Started with Kinetis SDK (KSDK)

The "Eclipse Classic" version is recommended. Otherwise, a Java or RCP version of Eclipse is recommended.

VMware Server 2.0 Essentials. Virtualization Deployment and Management

The QlikView deployment framework

CSE 237A Final Project Final Report

Andreas Burghart 6 October 2014 v1.0

Getting Started Android + Linux. February 27 th, 2014

HOW TO BUILD A VMWARE APPLIANCE: A CASE STUDY

AWS Service Catalog. User Guide

STLinux Software development environment

Graduate presentation for CSCI By Janakiram Vantipalli ( Janakiram.vantipalli@colorado.edu )

Embedded Software development Process and Tools: Lesson-1

TECHNICAL DOCUMENTATION SPECOPS DEPLOY / APP 4.7 DOCUMENTATION

Sistemi ad agenti Principi di programmazione di sistema

Update on filesystems for flash storage

Xen Virtualization Software

Introduction to Android

Deployment Guide. How to prepare your environment for an OnApp Cloud deployment.

OpenWRT - embedded Linux for wireless routers

Linux Foundation Automotive Summit - Yokohama, Japan

Android on i.mx Applications Processors

The embedded Linux quick start guide lab notes

Running Debian on Inexpensive Network Attached Storage Device

Colligo Contributor File Manager 4.6. User Guide

Buildroot Workshop. Libre Software Meeting Thomas Petazzoni Free Electrons

Audit & Tune Deliverables

Utilizing MBARI s Software Infrastructure and Application for MOOS (SIAM) for NOAA s Real-time Environmental Coastal Observing Network (RECON)

Jukka Kokko SOFTWARE BUILD AND RELEASE MANAGEMENT FOR A WIRELESS PRODUCT WITH OPEN SOURCE TOOLS

Drupal CMS for marketing sites

Building Embedded Systems

New Features in XE8. Marco Cantù RAD Studio Product Manager

WIND RIVER LINUX 6 TABLE OF CONTENTS INNOVATORS START HERE.

NVIDIA CUDA GETTING STARTED GUIDE FOR MAC OS X

Overview of CS 282 & Android

Mobile Operating Systems. Week I

Android Development: a System Perspective. Javier Orensanz

IBM Endpoint Manager Version 9.2. Patch Management for SUSE Linux Enterprise User's Guide

Dynamic Web Programming BUILDING WEB APPLICATIONS USING ASP.NET, AJAX AND JAVASCRIPT

How To Backup In Cisco Uk Central And Cisco Cusd (Cisco) Cusm (Custodian) (Cusd) (Uk) (Usd).Com) (Ucs) (Cyse

Sitecore InDesign Connector 1.1

Chapter 1 Hardware and Software Introductions of pcduino

10 STEPS TO YOUR FIRST QNX PROGRAM. QUICKSTART GUIDE Second Edition

Application Development Kit for Android Installation Guide

EXPLORING LINUX KERNEL: THE EASY WAY!

Inside Android's UI Embedded Linux Conference Europe 2012 Karim

GETTING STARTED WITH ANDROID DEVELOPMENT FOR EMBEDDED SYSTEMS

A Smart Way to Manage Packages in Yocto Project

LOCKSS on LINUX. CentOS6 Installation Manual 08/22/2013

Using Chroot to Bring Linux Applications to Android

Oracle Solaris: Aktueller Stand und Ausblick

App Central: Developer's Guide. For APKG 2.0

Improved metrics collection and correlation for the CERN cloud storage test framework

Transcription:

Solutions for Intelligent Devices OpenEmbedded for Product Development Matthew Locke Embedded Linux Conference April 2008

Agenda Background Introduction to OE Example product description OE setup Create configurations Define tasks Root file system Application development Deployment images Summary

Background / History Started in the OpenZarus project to be able to easily build applications for the Zaurus PDAs Build system was redesigned and rewritten to be more generic breaking out the metadata and build tool into two separate projects The build tool, bitbake, is based on concepts in Gentoo/ portage Adopted by many open source projects that provide distributions for handhelds.org, Linksys routers, motorola phones, mythtv hardware and many more Latest project to use OpenEmbedded is OpenMoko a complete and open mobile phone software stack.

Introduction to OpenEmbedded (OE) A self contained cross build system for embedded devices Collection of recipes (metadata) that describe how to build: Thousands of packages including bootloaders, libraries, and applications For ~60 target machines including the a780, N770 and x86 Over 40 package/machine configurations (distributions) Does not include source code. Fetches source using instructions in metadata. Take any number of components, build, create images- Components can be any source type, SVN, tarball Output is individual packages and filesystem images (jffs2, ext3, etc).

OE behavior - build from scratch Builds self contained build environment from source Builds latest version of all components unless specificied Downloads source code from location specified in recipe file (typically from project server on internet) Most open source packages built from tarball+patches

OE Metadata and BitBake OE is powered by BitBake, which parses the OE metadata to build the system. parses recipes/confs Creates a database of how to fetch, configure, build, install and stage each package. Determines package dependencies and builds in correct order, parallel where possible Uses the IPK packaging format.

Digital Photo Frame (DPF) Digital Photo Frame (DPF) Typical current embedded Linux application Illustrates use of a varied set of FOSS components Requirements are clear and concise Many people are familiar with DPF device functionality

DPF platform Hardware assumptions ARM SoC DSP PCM audio playback LCD controller w/ 16-bit color support MMC/SD controller NAND controller 800x600 LCD Small number of navigation buttons MMC/SD slot NAND flash Speakers

OE Setup Decide on OE metadata version (snapshot or latest) Install bitbake Setup a pristine OE directory Keep changes in an overlay Download directory Internal mirror Changes necessary for commercial product development versus open source project development

OE setup - Overlays Bitbake parses all conf and recipes files found in the BBPATH environment variable Setup an overlay directory that will hold: specific conf files internal package metadata any overloads on pristine metadata for classes, bb files, conf files BBPATH should include the following directories: openembedded/ - pristine OE metadata <overlay>/ - custom metadata Overlay directory should look like conf/ - custom and overloaded config files packages/ - internal and overloaded package bb files

OE Configuration - Distro Configuration files define how the build environment is setup, package versions, information, global inheritance, target boards, final image configuration. Four types of configuration files Distro - highest level configuration which defines: Toolchain and package versions Package configuration - xserver can be built in several configurations. Distro defines which configuration is built. Sets Distro information variables High level settings such as use udev for device nodes and final image format.

OE Configuration - Distro # Make the most use of our build system PARALLEL_MAKE = "-j 6 DL_DIR = "${OEDIR}/sources" BBFILES := "${OEDIR}/openembedded/packages/*/*.bb ${OEDIR}/ea-oe/ packages/*/*.bb" IMAGE_FSTYPES = "jffs2 squashfs tar.bz2 # Use EABI ready toolchain PREFERRED_VERSION_gcc-cross = "4.1.2 PREFERRED_VERSION_glibc = "2.5" PREFERRED_VERSION_uclibc = "0.9.29" PREFERRED_PROVIDER_virtual/libc = "glibc"

OE Configuration - Machine Machine config files defines board specific versions and features Architecture Compiler options and other architecture tunables Kernel version and package provider Board specific i/o that require drivers and lib

OE Configuration - Machine TARGET_ARCH = "arm" PACKAGE_EXTRA_ARCHS = "armv4t require conf/machine/include/tune-arm920t.inc # With this kernel version, we can use a newer udev PREFERRED_VERSION_udev = "115" PREFERRED_PROVIDER_virtual/kernel = linux-dpfboard" PREFERRED_VERSION_linux--dpfboard = "2.6.23.14 DEVEL_FEATURES = "alsa host-usb gadget-usb mtd wifi"

DPF software stack

OE recipe (Overview) Bitbake recipe files (.bb) Contain the necessary environment variables, cmds and steps need to build a package Do_fetch, Do_stage(), do_configure(), do_compile(), do_install(), etc. Four types of bb files Classes - contains common steps for a class of packages. For example, all kernel builds have make, make install, make modules. Packages - inherits classes and adds or overrides package specific settings and steps. Defines version and fetcher used to retrieve source Tasks - defines the collection of packages to be built Images - creates filesystem images out of tasks

OE Tasks Divide packages into logical groups enables developers to work on building blocks and easier to manage Separate production and development Typical task definitions Base - the basic user space applications necessary to boot to a prompt. Used for initial debug of system. Glibc, busybox, initscripts, sshd Core core open source and/or custom applications necessary for the apps (middleware) Apps - Product applications UI User Interface specific components. Themes, fonts, menu.

OE Tasks - Base RDEPENDS = "\ " ${@base_contains("devel_features", "alsa", "${ALSA_PKGS}", "",d)} \ base-files base-passwd busybox-devel kernel kernel-modules \ initscripts sysvinit udev \ ${@base_contains("devel_features", "mtd", "mtd-utils", "", d)} \ ${@base_contains("devel_features", "wifi", "wireless-tools", "", d)} \ dropbear \

OE Tasks - Core RDEPENDS = "\ directfb \ hal \ dbus \ gstreamer \ vincent \ libjpeg \ "

OE Tasks - UI RDEPENDS = "\ dpf-ui \ dpf-themes \ dpf-menu \ "

OE Images The image file controls what goes into the root file system The image types are defined in the distro config file Flash file system for burning to flash Tarball for nfsroot, ramdisk or other development/debug uses Separate production and development image Root file system is created from packages Root file system class controls root file system creation Recipes have hooks for extra scripts Classes can be overridden

Setup OE for Commercial environment Cache copies of open source components as tarballs on a local server OE will wget from a URL Lockdown open source component versions in a Bill of Materials conf file that is used by the distro conf file PREFERRED_VERSION_<pkg name>=<version> Create internal component metadata to fetch from source control (svn, git, cvs, perforce) Setup variables to control building from tag, branch or head Compile, install, stage and package Speed up build Parallel make and multiple bitbake threads controlled by variables Create and distribute prebuilt build environment (SDK) Reuse ipk s across machines of the same architecture

Application Development Open source applications now building and in a root filesystem What about developing the DPF custom applications? App developer model Quickly rebuild source with local changes Rebuild source from source control Unit test in a development environment Integrate with rest of the system

Application Development Two options Use OE directly during application development Create bb recipe files for application Keep SCM updated with changes Build using bitbake <package name> Integrate by adding package into appropriate task file Export SDK from OE Setup OE to export toolchain and libraries to an OE independent environment Build applications from local or SCM sources Integrate into OE when ready

Application Development BB File DESCRIPTION = "The DPF Media Player" SECTION = dpf/applications" DEPENDS += "alsa-lib dbus-glib id3lib" PV = "0.0.1+svnr${SRCREV}" PR = "r1 SRC_URI := "${DPF_MIRROR}/src/${DPF_RELEASE}/${SUBDIR};module=$ {PN};proto=http" S = "${WORKDIR}/${PN}" FILES_${PN} += "${datadir}/icons"

Deployment Build output Build output directories cache conf build specific configuration files deploy image and packages staging intermediate install for libraries and headers work - build directory cross host tools for target rootfs - expanded root filesystem stamps

Deployment images and packages Deploy directory images/ - kernel, bootloader and rootfs images ipk/ - all components in a binary package format (ipk) Packages can be used to manage software updates or run time configuration changes

Test and Ship your DPF

OE Summary Very powerful metadata system Layered design allows easy customizations and additions Supports commercial software development use cases nicely Many, many packages already supported Can build anything from a complete mobile phone stack to a DVR to a wireless access point stack Maemo, Angstrom, OpenMoko, MythTV, unslung Metadata learning curve is high Fairly large open source community using it and maintaining it Finding a version of metadata that just works can be a challenge

Resources http://www.openembedded.org http://bitbake.berlios.de/manual/ - manual for the bitbake tool http://wiki.openmoko.org - great place to get familiar with how to build a complete software stack with OE

Solutions for Intelligent Devices Contact for more information Matthew Locke mlocke@embeddedalley.com