Presentation is loading. Please wait.

Presentation is loading. Please wait.

It’s not an embedded Linux distribution – It creates a custom one for you. David Stewart Intel Corporation April 11, 2011 The Yocto Project and its Application.

Similar presentations

Presentation on theme: "It’s not an embedded Linux distribution – It creates a custom one for you. David Stewart Intel Corporation April 11, 2011 The Yocto Project and its Application."— Presentation transcript:

1 It’s not an embedded Linux distribution – It creates a custom one for you. David Stewart Intel Corporation April 11, 2011 The Yocto Project and its Application Development Toolkit (ADT) - “The Answer to Effective Embedded Application Development”

2 2/2/ Agenda ● Challenges Developing Today’s Embedded Software ● The Yocto Project Build System ● The Yocto Project Application Development Toolkit (ADT) ● The ADT Usage Model ● Example App Development using ADT ● Benefits of Using the Yocto Project and its ADT ● Q&A

3 3/3/ Challenges Developing Today's Embedded Software – The Context ● SoCs have brought fantastic capabilities to embedded products ● But... it means that rapidly developed application software is a key part of the solution ● Application developer is quite often a different role/skillset than the system developer ● Embedded products typically require a targeted application development effort - focused on rapid development for embedded devices Customized toolchain and development platform are essential for embedded software development

4 4/4/ Challenges Developing Today's Embedded Software Challenges: ● Support the app developer role with their own environment ● Quickly roll out new applications that utilize features in the silicon and meet time to market (TTM) demands is paramount ● Time and complexity to build up such a TTM accelerator

5 5/5/ The Yocto Project Build System Yocto Workflow

6 6/6/ Setting up the App Developer Environment Cross-toolchain Installation (eg: /opt/poky) Sysroot: (Bootable Linux filesystem with dev headers) System dev App dev Package Repository (networked or local)

7 7/7/ Sys Dev builds what the App Dev needs 1.Build the cross toolchain for a specific host system (e.g. x86_64) and target architecture (e.g arm): 1.Set SDKMACHINE=x86_64 in conf/local.conf 2.Run “ MACHINE=qemuarm bitbake meta-toolchain package-index ” 2.Build the matching target rootfs (e.g. poky-image-sato-sdk) that sysroot is based on: ● Run “ MACHINE=qemuarm bitbake poky-image-sato-sdk package- index ” (Sato is a gnome mobile environment and visual style that is designed specifically to work well with small high resolution screens and stylus input) For more simplicity, build them in a single step: ● Run “ MACHINE=qemuarm bitbake poky-image-sato-sdk meta- toolchain package-index ” With Yocto, one configuration, one command can generate both a toolchain and matching rootfs image

8 8/8/ ADT Notes ● Cross toolchain and image files generated by the Yocto build system based on the target device metadata configuration ● Setup target system development environment on the App Dev machine based on sysroot concept ● GNU cross-development toolchain of build, packaging, and debug ● Development headers and libraries ● Sysroot represents target device root filesystem ● Optimized for autotools-type projects ● For autotool enabled packages just pass host options to configure, e.g. ● configure --host=arm-poky-linux-gnueabi --with-libtool- sysroot=/home/davest/arm ● For other projects, ensure that the cross tools are used, e.g. CC=arm-poky-linux-gnueabi-gcc and LD=arm-poky-linux-gnueabi-ld in makefile

9 9/9/ ADT Notes (cont.) ● Either Qemu with GL pass-through or real hardware as development targets ● User mode NFS support ● Allow emulator and host access the file system at same time ● Use package management infrastructure to update packages on running systems and sysroot: RPM, Deb, OPKG ● ADT installer script provides customization to set up cross development environment

10 10/ IDE Support: Eclipse ● Eclipse plug-in and user space tool suite offerings further improve developer productivity

11 11/ The Yocto Project and ADT Usage Model

12 12/ Example Application Development Using ADT ● A case study to show how to customize a cross development environment via the Yocto ADT ● Original cross development setup ● A x86_64-arm cross toolchain installed under /opt/poky/1.0 ● Sysroot extracted from poky-image-sato-sdk rootfs under /home/davest/arm ● Add support for clutter-based applications on the new device: ● Step 1. target metadata needs to be extended to add clutter library support, e.g. and ● Step 2. Run “bitbake clutter-1.4” to build clutter library packages, using opkg

13 13/ Example Application Development Using ADT (cont.) ● Step 3. Use a package manager (e.g. opkg) to add clutter packages to sysroot: – opkg-cl f ~davest/opkg/opkg.conf -o ~davest/arm update – opkg-cl f ~davest/opkg/opkg.conf -o ~davest/arm --force-overwrite install libclutter-glx-1.4-0 – opkg-cl f ~davest/opkg/opkg.conf -o ~davest/arm --force-overwrite install libclutter-glx-1.4-dbg – opkg-cl f ~davest/opkg/opkg.conf -o ~davest/arm --force-overwrite install libclutter-glx-1.4-dev ● Step 4. Build clutter autotool based application with – configure –with-libtool-sysroot=/home/davest/arm --host=arm-poky- linux-gnueabi – make will use cross tools e.g. arm-poky-linux-gnueabi-gcc --sysroot=/home/davest/arm ● Step 5. Boot up qemu in the unfs mode to test, debug new clutter app on target emulator – poky-qemu /home/davest/qemu-kernel/zImage-qemuarm.bin /home/davest/arm – The shared and updated sysroot as rootfs allows immediate cross debug and run in the target emulator with no need to recreate a target image

14 14/ Example Application Development Using ADT (cont.) ● To finish up the device project: ● Create a recipe for your app and include it in the system build ● User specified sysroot supports multiple build profiles cross development environment setup for same target architecture ● e.g. Yocto provides, – minimal, minimal-dev, – lsb, lsb-dev, lsb-sdk, – sato, sato-dev, sato-sdk ● Application development can progress in parallel with system development

15 15/ Benefits of Using the Yocto Project and its ADT ● Easily build an embedded product focused cross-toolchain ● Using sysroot, quickly setup a customized cross-development environment ● Same build configuration to build the target-specific distribution image and the cross-toolchain ● Enhanced developer productivity through ADT Eclipse plug-in, Qemu emulator and user-space tool suite offerings

16 16/ Benefits of Using the Yocto Project and its ADT (cont.) ● An embedded board vendor can provide a product-focused toolchain, tools and development platform in the bundle with Board Support Package (BSP)s. ● Enable immediate software development against the new product that best showcases its unique features ● Do software and hardware development in parallel, which leads to great TTM for both software and hardware readiness at product launch

17 17/ Questions?

18 18/ Backup

19 19/ The Yocto Project Tools ● The ADT Application user space tools suite contains the following essential tools that provide target analytical capabilities: ● PowerTop ● LatencyTop ● Oprofile ● Perf ● Lttng-ust ● SystemTap ● Yocto 1.0 will also provide the following tools: ● SystemProf ● Trace-cmd/kernelshark ● blktrace

20 20/ The Yocto Project ADT Standalone ● No IDE required - command line arguments ● Script files provided: ● Environment setup script for cross development environment ● Running Poky Qemu images ● Use package tools, user mode NFS to provision applications to target devices

21 21/ The Yocto Project ADT Eclipse Plug-in ● Built on top via extensions of the available feature rich Eclipse plug-ins ● CDT, Linux Tools Project, TCF/RSE ● Integrates Yocto ADT cross toolchain into CDT ● Via CDT to interact with tools to achieve cross platform “build, deploy, test, debug” ● Intended to be used for GNU autotools projects ● Leverage TCF and its remote agent mechanism to achieve remote tools interaction without leaving IDE

22 22/ Code extract of and ● ● require ● PR = "r0" ● PACKAGES =+ "${PN}-examples" ● FILES_${PN}-examples = "${bindir}/test-* ${pkgdatadir}/redhand.png" ● SRC_URI = "${PV}.tar.bz2 \ ●... ● ● DESCRIPTION = "Clutter graphics library" ● HOMEPAGE = "" ● LICENSE = "LGPL" ● COMPATIBLE_MACHINE = "(zylonite|mx31litekit|omap-3430ldp|omap-3430sdp|mx31ads|qemuarm|qemux86|ipodtouch|atom-pc|menlow)" ● STDDEPENDS = "virtual/libx11 gtk-doc-native pango glib-2.0 libxfixes gtk+ libxi" ● BASE_CONF = "--disable-gtk-doc ${@get_clutter_fpu_setting(bb, d)}" ● DEPENDS = "${STDDEPENDS} virtual/libgl gettext" ● EXTRA_OECONF = "${BASE_CONF} --with-flavour=glx" ● DEPENDS_zylonite = "${STDDEPENDS} libgles-zylonite tslib" ● EXTRA_OECONF_zylonite = "${BASE_CONF} --with-flavour=eglnative" ● PACKAGE_ARCH_zylonite = "${MACHINE_ARCH}" ● LDFLAGS_append_zylonite = " -lnws -lstdc++ "

23 23/ Resources ●

24 24/ Legal Information INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL® PRODUCTS. EXCEPT AS PROVIDED IN INTEL'S TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL ASSUMES NO LIABILITY WHATSOEVER, AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY RELATING TO SALE AND/OR USE OF INTEL PRODUCTS, INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT, OR OTHER INTELLECTUAL PROPERTY RIGHT. Intel may make changes to specifications, product descriptions, and plans at any time, without notice. All dates provided are subject to change without notice. Intel is a trademark of Intel Corporation in the U.S. and other countries. *Other names and brands may be claimed as the property of others. Copyright © 2009, Intel Corporation. All rights are protected.

25 25/

Download ppt "It’s not an embedded Linux distribution – It creates a custom one for you. David Stewart Intel Corporation April 11, 2011 The Yocto Project and its Application."

Similar presentations

Ads by Google