Developing Embedded Linux Devices Using the Yocto Project



Similar documents
Developing Embedded Linux Devices Using the Yocto Project

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

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

Linux Foundation Automotive Summit - Yokohama, Japan

Yocto Project ADT, Eclipse plug-in and Developer Tools

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

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

MontaVista Linux 6. Streamlining the Embedded Linux Development Process

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

Building Embedded Systems

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

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

Advanced Customizations

Yocto Project Experience: Continuous Integration

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

opensuse.org Build Service

Andreas Burghart 6 October 2014 v1.0

Embedded Linux development with Buildroot training 3-day session

Embedded Linux development training 4 days session

Using Intel C++ Compiler in Eclipse* for Embedded Linux* targets

WIND RIVER LINUX 6 TABLE OF CONTENTS INNOVATORS START HERE.

OpenEmbedded for medical devices

How To Develop Android On Your Computer Or Tablet Or Phone

Running a Program on an AVD

EXPLORING LINUX KERNEL: THE EASY WAY!

Site Configuration SETUP GUIDE. Windows Hosts Single Workstation Installation. May08. May 08

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

Android: How To. Thanks. Aman Nijhawan

ESX 4 Patch Management Guide ESX 4.0

Embedded Linux Platform Developer

Software Tools Bootcamp

What else can you do with Android? Inside Android. Chris Simmonds. Embedded Linux Conference Europe Copyright 2010, 2net Limited.

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

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

Linux Distributions. What they are, how they work, which one to choose Avi Alkalay

A Smart Way to Manage Packages in Yocto Project

Kerrighed / XtreemOS cluster flavour

Stacey D. Son Consultant/SRI International. BSDCan Developer s Summit 15-May-2013

Using Toaster in a Production Environment

Lab 0 (Setting up your Development Environment) Week 1

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

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

Introduction to Android Development. Jeff Avery CS349, Mar 2013

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

Eddy Integrated Development Environment, LemonIDE for Embedded Software System Development

Software Development for Embedded GNU Radio Applications

RISC-V Software Ecosystem. Andrew Waterman UC Berkeley

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

1. Overview of Nios II Embedded Development

Easing embedded Linux software development for SBCs

The Bazaar Version Control System. Michael Hudson, Canonical Ltd

How to Run the MQX RTOS on Various RAM Memories for i.mx 6SoloX

"EZHACK" POPULAR SMART TV DONGLE REMOTE CODE EXECUTION

Baseline Integration Team Intro 22/10/2016 Planners and Engineers

Android Development: a System Perspective. Javier Orensanz

Developing tests for the KVM autotest framework

How To Manage Source Code With Git

Using Buildroot for real projects

Version Control. Version Control

ADT Plugin for Eclipse

Michele Jr De Candia Curriculum Vitae

Continuous Integration. CSC 440: Software Engineering Slide #1

Using Chroot to Bring Linux Applications to Android

Getting Started with Android Development

1. Overview of Nios II Embedded Development

Version Control with. Ben Morgan

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

Building, testing and deploying mobile apps with Jenkins & friends

Software configuration management

Efficient embedded software development using QEMU

Windows Template Creation Guide. How to build your own Windows VM templates for deployment in Cloudturk.

<Insert Picture Here> Introducing Hudson. Winston Prakash. Click to edit Master subtitle style

ALERT installation setup

Mobile Development with Git, Gerrit & Jenkins

Citrix XenServer 5.6 OpenSource Xen 2.6 on RHEL 5 OpenSource Xen 3.2 on Debian 5.0(Lenny)

Open Network Install Environment (ONIE) LinuxCon North America 2015

Developing an Application for the i.mx Devices on the Linux Platform

Chapter 3: Operating-System Structures. Common System Components

Content. Development Tools 2(63)

Example of Standard API

Using Red Hat Network Satellite Server to Manage Dell PowerEdge Servers

The Benefits of Verio Virtual Private Servers (VPS) Verio Virtual Private Server (VPS) CONTENTS

Using Git for Project Management with µvision

Building graphic-rich and better performing native applications. Pro. Android C++ with the NDK. Onur Cinar

Git Basics. Christopher Simpkins Chris Simpkins (Georgia Tech) CS 2340 Objects and Design CS / 22

IBM Endpoint Manager Version 9.1. Patch Management for Red Hat Enterprise Linux User's Guide

An Embedded Wireless Mini-Server with Database Support

The Kali Linux Dojo - Rolling Your Own ISOs

QuickBooks Enterprise Solutions. Linux Database Server Manager Installation and Configuration Guide

Practicing Continuous Delivery using Hudson. Winston Prakash Oracle Corporation

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

Android Programming and Security

Buildroot for Vortex86EX (2016/04/20)

How To Run A Hello World On Android (Jdk) On A Microsoft Ds.Io (Windows) Or Android Or Android On A Pc Or Android 4 (

STLinux Software development environment

RAPID EMBEDDED LINUX* DEVELOPMENT

Overview. Open source toolchains. Buildroot features. Development process

Application-Level Debugging and Profiling: Gaps in the Tool Ecosystem. Dr Rosemary Francis, Ellexus

VM Application Debugging via JTAG: Android TRACE32 JTAG Debug Bridge ADB Architecture Stop-Mode implications for ADB JTAG Transport Outlook

Transcription:

It s not an embedded Linux distribu2on It creates a custom one for you. Developing Embedded Linux Devices Using the Yocto Project Mark Hatle mark.hatle@windriver.com Wind River Systems September, 2012

Agenda What is the Yocto Project (YP)? How does it work? How to get started with building OS, apps, and debugging What s Next? Q&A 2

What is the Yocto Project? A collection of embedded projects and tooling Open source project with a strong community Key project is the distribution build environment (Poky) Complete Linux OS with package metadata Releases every 6 months with latest (but stable) kernel (LTSI), toolchain, and package versions Place for Industry to publish BSPs App Dev Tools which allow development against the stack, including Eclipse plug-ins and emulators Full documentation representative of a consistent system It s not an embedded Linux distribution it creates a custom one for you 3

Why is the Yocto Project Valuable? Linux is becoming increasingly popular for Embedded Non-commercial and commercial embedded Linux has many distributions (too many distributions) Do It Yourself or Starting w/ a desktop/server OS: Long Term Maintenance is difficult Upstream changes are difficult to track Not embedded friendly Licensing issues No commercial Embedded support Developers spend lots of time porting or making build systems Leaves less time/money to develop interesting software features 4

Why is the Yocto Project Valuable? The industry needed a common build system and core technology Bitbake build system, OpenEmbedded base The benefit of doing so is: Designed for the long term Designed for embedded Transparent Upstream changes Vibrant Developer Community Less time spent on things which don t make money (build system, core Linux components) More time spent on things which do make money (application development, product development, ) 5

Who is the Yocto Project? Advisory Board and Technical Leadership: Organized under the Linux Foundation Individual Developers Embedded Hardware Companies Semiconductor Manufacturers Embedded Operating System Vendors OpenEmbedded / LTSI Community Cavium Freescale Tilera LSI Mindspeed NetLogic Microsystems 6

Why Should a Developer Care? Build a complete Linux system from source in about an hour (about 90 minutes with X). Start with a validated collection of software (toolchain, kernel, user space). Access to a great collection of app developer tools (performance, debug, power analysis, Eclipse). We distinguish app developers from system developers and we support both. Advanced kernel development tools. Supports all major embedded architectures (x86, x86-64, ARM, PPC, MIPS), just change a line in a config file and rebuild. Transitions easily to a commercial embedded Linux based on the Yocto Project. 7

How Does It Work? Quick Start 1. Go to http://yoctoproject.org, click documentation and consult the Quick Start guide 2. Set up your Linux system with the right packages (and firewall access, if needed) 3. Click Download and download the latest stable release (or check out denzil from the git repo) 4. Source oe-init-build-env script 5. Edit conf/local.conf and set MACHINE, BB_NUMBER_THREADS and PARALLEL_MAKE 6. Run $ bitbake core-image-sato 7. Run $ runqemu qemux86 (if MACHINE=qemux86) Note: File or command names in this presentation are subject to change, several are different now in master. 8

Yocto Project = Poky + Upstream + Tools Poky Bitbake Upstream Software Projects OpenEmbedded-Core Yocto Documentation Meta-Yocto Reference BSP Metadata (one per arch) ADT Tools (Eclipse Plugin) Pseudo Reference Images Prebuilt Build State Software Releases ADT Components Build system upstream components Poky Yocto Project components Yocto Project Swabber Yocto Project Output Embedded Kernel Tools Yocto Project provides best of upstream for a stable base 9

Why not just use OpenEmbedded? OpenEmbedded is an Open Source project focused on enabling cross-compiled systems. It contains the build system, and meta data that describe many components of a system. Yocto Project is focused on enabling commerical developers. It does this by helping to improve the quality of OpenEmbedded. Leveraging the build system and core components of OpenEmbedded, and extending the support to key COTS boards. Yocto Project includes autobuilder sessions QA testings Eclipse Plugins etc 10

Yocto Project* Workflow Upstream Project Releases Local Projects Source Materials SCMs (optional) OpenEmbedded Architecture Workflow Upstream Source Metadata/Inputs Build system Output s Process steps (tasks) Output Image Data User Metadata (.bb + patches) Machine BSP Policy Source Fetching Patch Application Config / Compile / Autoconf as needed Output Analysis for Splitting plus relationships.deb.rpm.ipk QA Tests Image Generation Images Feeds SDK Generation Application Development SDK 11

Upstream Project Releases Local Projects Source Materials SCMs (optional) OpenEmbedded Architecture Workflow Upstream Source Metadata/Inputs Build system Output s Process steps (tasks) Output Image Data User Metadata (.bb + patches) Machine BSP Policy Source Fetching Patch Application Config / Compile / Autoconf as needed Output Analysis for Splitting plus relationships.deb.rpm.ipk QA Tests Image Generation Images Feeds SDK Generation Application Development SDK 12

User Metadata (.bb + patches) Machine BSP Policy (*.conf) global definition of variables build/conf/local.conf (local user-defined variables) meta-yocto/conf/distro/poky.conf (Yocto policy config variables) meta/machine/include/tune-mips32.inc (processor specific configuration) meta-yocto/machine/routerstationpro.conf (machinespecific variables) 13

User User Metadata (.bb + patches) Machine BSP Policy User configuration: conf/local.conf some things to set: Set BB_NUMBER_THREADS and PARALLEL_MAKE Set MACHINE= foo for the CPU architecture EXTRA_IMAGE_FEATURES adds features (groups of packages) INCOMPATIBLE_LICENSE = GPLv3 eliminates packages using GPLv3 and LGPLv3 14

Metadata User Metadata (.bb + patches) Machine BSP Policy Metadata and patches: Recipes for building packages Eg, meta/recipes-core/coreutils/ coreutils_6.9.bb builds the core utilities (version 6.9) and installs them meta/recipes-core/coreutils/coreutils-6.9/ includes patches, also could include extra files to install Can be extended and enhanced via layers Compatible with OpenEmbedded 15

Yocto Project Layer Requirements Layers contain extensions and customizations to base system Can include image customizations, additional recipes, modifying recipes, adding extra configuration Really just another directory to look for recipes or recipe extensions Added to the BBLAYERS variable in build/conf/bblayers.conf Best Practice: Layers are grouped by functional components Common Examples of Layers: Custom Toolchains (compilers, debuggers, profiling tools, etc) Distribution specifications and customizations Functional areas (selinux, networking, etc) OSV components Project level changes BSP/Machine specific components 16

Layers 17

BSPs BSPs and Machine configurations: User Metadata (.bb + patches) Machine BSP Policy files to describe a machine Processor/SOC tuning files Formfactor configurations May include Linux kernel enhancements Includes board specific kernel configuration Eg, meta-yocto/machine/routerstationpro.conf describes the Routerstation Pro features, kernel filenames, etc. Machine specific package modifications Should be implemented via layers Compatible with OpenEmbedded 18

Kernel Development We try to develop upstream wherever possible Two major advances in the Yocto Project: Branching tools: Per-BSP git branches contain machine-specific kernel sources. Tools collect up the relevant tree of branches Kernel features: patches and configuration fragments managed as a functional block Results: Can turn on a collection of features for a given BSP Less code duplication Easier to choose a config fragment and patches 19

Board Support Layers BSP Layer - Best Practices: Machine settings and recipes specific to the BSPs only Based on the Yocto Project kernel versions Uses the Yocto Project kernel tooling Machine settings are specified in a layer's conf/machine/xxx.conf file(s) Examples: Sandy Bridge + Cougar Point: meta-intel/conf/meta-sugarbay/machine/sugarbay.conf Routerstation Pro (MIPS) yocto/meta/conf/machine/routerstationpro.conf 20

Linux Kernel Details Kernel Tooling Kernel class meta/classes/kernel.bbclass Linux-Yocto recipe meta/recipes-kernel/linux/linux-yocto*bb Linux-Yocto git repository http://git.pokylinux.org/cgit/cgit.cgi/linux-yocto-* Kernel Versions linux-yocto (YP 1.2): 2.6.37, 3.0, 3.2 linux-yocto (in dev): 3.4 linux-yocto-dev: 3.5-rc4 (latest) 21

How Does It Work? More Depth Upstream Project Releases Local Projects Source Materials SCMs (optional) OpenEmbedded Architecture Workflow Upstream Source Metadata/Inputs Build system Output s Process steps (tasks) Output Image Data User Metadata (.bb + patches) Machine BSP Source Fetching Patch Application Output Analysis for Splitting plus relationships.deb.rpm QA Tests Image Generation Feeds SDK Generation Policy Config / Compile / Autoconf as needed.ipk Images Application Development SDK 22

Source Fetching Upstream Project Releases Local Projects Source Materials SCMs (optional) Source Fetching Recipes call out location of all sources, whether on the internet or local (Look for SRC_URI in *.bb files) Bitbake can get sources from git, svn, bzr, from tarballs, and many, many more* Versions of packages can be fixed or updated automatically (Add SRCREV_pn- PN = "${AUTOREV} to local.conf) Yocto Project sources mirror available as a fallback (source reliability) * Complete list includes: http, ftp, https, git, svn, perforce, mercurial, bzr, cvs, osc, repo, ssh, and svk and the unpacker can cope with tarballs, zip, rar, xz, gz, bz2, and so on. 23

Patching Upstream Project Releases Local Projects Source Materials SCMs (optional) OpenEmbedded Architecture Workflow Upstream Source Metadata/Inputs Build system Output s Process steps (tasks) Output Image Data User Metadata (.bb + patches) Machine BSP Source Fetching Patch Application Output Analysis for Splitting plus relationships.deb.rpm QA Tests Image Generation Feeds SDK Generation Policy Config / Compile / Autoconf as needed.ipk Images Application Development SDK 24

Patching User Metadata (.bb + patches) Machine BSP Patch Application Policy Once sources are obtained, the patches are applied This is a good place to patch the software yourself However, we encourage you to contribute development upstream whenever possible (we try to) 25

Config / Compile Upstream Project Releases Local Projects Source Materials SCMs (optional) OpenEmbedded Architecture Workflow Upstream Source Metadata/Inputs Build system Output s Process steps (tasks) Output Image Data User Metadata (.bb + patches) Machine BSP Source Fetching Patch Application Output Analysis for Splitting plus relationships.deb.rpm QA Tests Image Generation Feeds SDK Generation Policy Config / Compile / Autoconf as needed.ipk Images Application Development SDK 26

Configure/Compile / Compile /Autoconf as needed Autoconf can be triggered automatically to ensure latest libtool is used DESCRIPTION = "GNU Helloworld application SECTION = "examples" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://copying;md5=751419260aa954499f7abaabaa882bbe" PR = "r0" SRC_URI = "${GNU_MIRROR}/hello/hello-${PV}.tar.gz" inherit autotools gettext 27

Configure/Compile / Compile /Autoconf as needed Set standard environment flags (i.e. CFLAGS) CFLAGS_prepend = "-I ${S}/include Install task to set modes, permissions, target directories, done by pseudo do_install () { oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} 28

Packaging Upstream Project Releases Local Projects Source Materials SCMs (optional) OpenEmbedded Architecture Workflow Upstream Source Metadata/Inputs Build system Output s Process steps (tasks) Output Image Data User Metadata (.bb + patches) Machine BSP Source Fetching Patch Application Output Analysis for Splitting plus relationships.deb.rpm QA Tests Image Generation Feeds SDK Generation Policy Config / Compile / Autoconf as needed.ipk Images Application Development SDK 29

Packaging Output Analysis for Splitting plus relationships.deb.rpm.ipk Once configure/compile/install is completed, packaging commences The most popular package formats are supported: RPM, Debian, and ipk Set PACKAGE_CLASSES in conf/local.conf 30

Packaging Output Analysis for Splitting plus relationships.deb.rpm.ipk Once configure/compile/install is completed, packaging commences You can split into multiple packages using PACKAGES and FILES in a *.bb file: PACKAGES =+ "sxpm cxpm" FILES_cxpm = "${bindir}/cxpm" FILES_sxpm = "${bindir}/sxpm" Automatic splitting into debug, documentation, development and locale data. 31

Image Generation Upstream Project Releases Local Projects Source Materials SCMs (optional) OpenEmbedded Architecture Workflow Upstream Source Metadata/Inputs Build system Output s Process steps (tasks) Output Image Data User Metadata (.bb + patches) Machine BSP Source Fetching Patch Application Output Analysis for Splitting plus relationships.deb.rpm QA Tests Image Generation Feeds SDK Generation Policy Config / Compile / Autoconf as needed.ipk Images Application Development SDK 32

Image Generation Images are constructed using the packages built earlier in the process Decision of what to install on the image is based on a defined set of required components and automaticly resolved dependent components Uses for these images: Feeds Image Generation Images Live Image to boot a device Root filesystem for QEMU emulator Sysroot for App development The Yocto Project allows you customize your embedded Linux OS 33

ADT Generation Upstream Project Releases Local Projects Source Materials SCMs (optional) OpenEmbedded Architecture Workflow Upstream Source Metadata/Inputs Build system Output s Process steps (tasks) Output Image Data User Metadata (.bb + patches) Machine BSP Source Fetching Patch Application Output Analysis for Splitting plus relationships.deb.rpm QA Tests Image Generation Feeds SDK Generation Policy Config / Compile / Autoconf as needed.ipk Images Application Development SDK 34

ADT Generation Feeds Cross toolchain and installation script generated. This can be used to set up an application developer s cross development environment to create apps QEMU built for target architecture emulation SDK Generation Application Development SDK 35

Setting up the App Developer Feeds Image Generation SDK Generation System Developer Images App Developer Sysroot (Bootable Linux filesystem tree with development headers) Application Development SDK Yocto plug-ins Cross toolchain installation (such as: /opt/poky) Yocto Project helps set up the embedded app developer Repository (networked or local) 36

Use NFS/Local Disk, Pkg Manager Feeds System Developer Image Generation Images SDK Generation Application Development SDK Repository App Developer QEMU Device emulator Sysroot Device under development 37

Use NFS/Local Disk, Pkg Manager Repository System Developer App Developer QEMU Device emulator Sysroot NFS Manager Device under development Both Device and App Development Models Supported 38

Hob v1 39

Hob v1 40

How to Get Started Download the software today (http://www.yoctoproject.org/download) Be sure you read the Quick Start to set up your system to use the Yocto Project Build, test on QEMU or real hardware, develop apps Join the community to get help #yocto on freenode IRC Mailing lists yocto@yoctoproject.org http://lists.yoctoproject.org/listinfo/yocto Getting started with the Yocto Project is easy 41

Get Involved The Yocto Project is a collaboration of individuals, non-profits, and corporations under the Linux Foundation We urge you or your organization to join yoctoproject.org/documentation/getting-started has a number of ways to learn and contribute Contribute code, documentation, fix bugs, provide BSPs Use YP for your embedded projects Work with the community to make YP better Make an impact collaboration in its purest sense 42

It s Time to Take Action It s not an embedded Linux distribution it creates a custom one for you The Yocto Project lets you customize your embedded Linux OS It helps set up the embedded app developer Both device and app development models supported Getting started is easy Make an impact collaboration in its purest sense 43

Q & A Thank You! 44

Enter to Win! Leave a business card or fill out a form to enter to win an Amazon Kindle Fire ($199 value)!

46

Additional Resources Yocto Project: http://www.yoctoproject.org OpenEmbedded: http://www.openembedded.org Eclipse YouTube presentation: http://www.youtube.com/watch?v=3zlou-glsh0 Dirk Hohndel LinuxCon 2011: http://www.youtube.com/watch?v=bcxcnrcxctk 47