Introduction to OpenBricks: an Embedded Linux Framework


Published on

Published in: Lifestyle
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Introduction to OpenBricks: an Embedded Linux Framework

  1. 1. Introduction to OpenBricks: an Embedded Linux Framework Benjamin Zores 6th February 2011 FOSDEM, Brussels
  2. 2. What is OpenBricks ? Enterprise-grade embedded Linux framework and build system. For easy and custom Linux distribution bring-up. Runs on a wide variety of hardware. For rapid prototyping or full-blown product development.• “Hum, seems like I’ve already heard about that ... So how is it different from … ?” B. Zores – FOSDEM 2011
  3. 3. State of the Art 2011 Embedded Linux build systems:• OpenEmbedded (Angström, Poky, Yocto, ...)• Buildroot• OpenWRT• T2 SDE• Linux Target Image Builder (LTIB)• “Professional”: Windriver, Montavista, Mentor Graphics …• And now OpenBricks ??• More details in a further talk, but in the mean time: B. Zores – FOSDEM 2011
  4. 4. So why yet another build system in 2011 ? Because Google’s Android is not the perfect embedded OS. History:• OpenBricks “brand” in itself was founded in Oct. 2010.• But came as an extension to the GeeXboX project - © 2002.• Inherited toolchain and philosophy, but designed to be more versatile.• Now used as custom build framework for GeeXboX OS. Each build system has pros and cons, but projects all have very different philosophies.• So it’s not exactly new … B. Zores – FOSDEM 2011
  5. 5. The 5 minutes Overview Embedded Linux build framework for individuals and/or enterprises for either easy prototyping or full-blown products development. Replaces traditional BSPs with a fine-grained package tuning ability (through kconfig interface). Support for x86, ARM, PowerPC and MIPS architectures with reference boards optimizations. Brings up low-level system and features major applicative frameworks (Qt, EFL, GTK, SDL) for developers to only focus on end-user applications. Multimedia-oriented but with general purpose:• Currently sustains the GeeXboX STB OS project.• But allow you to build your unique one too … B. Zores – FOSDEM 2011
  6. 6. Supported Architectures x86 (32/64 bits): from generic builds to custom ATOM/ION optimized ones. PowerPC (32/64 bits) MIPS (32 bits) ARM:• ARM9 (e.g. Marvell Kirkwood …)• ARM11 (e.g. Broadcom BCM11107 Persona family …)• Cortex A8 / A9 (e.g. TI OMAP3, TI OMAP4, nVidia Tegra250 …) With known reference boards optimizations: Beagleboard, IGEPv2, Touchbook, Pandaboard … Much more to be expected: Freescale i.MX, Qualcomm SnapDragon, Marvell Armada, Intel CE4xxx … B. Zores – FOSDEM 2011
  7. 7. Applicative Features Supported Languages:• Shell, C, C++, Python, Perl, Lua, Vala Supported Frameworks:• Nokia Qt 4.7.1 with support for:• Webkit• QtMobility• QtDeclarative / QML• Enlightenment EFL 1.0• GTK+ 2.22• SDL Simple DirectMedia Layer 1.2 B. Zores – FOSDEM 2011
  8. 8. Multimedia Features - Graphics Native framebuffer interface. Accelerated DirectFB engine. Accelerated X11 Infrastructure. Support for Khronos group standards:• EGL Native Platform Graphics Interface• Desktop OpenGL 3.0• Embedded OpenGL|ES 2.1• Embedded OpenVG 1.0• Provided either by Mesa or by manufacturer’s binary blobs. B. Zores – FOSDEM 2011
  9. 9. Multimedia Features - Audio/Video Audio Frameworks:• ALSA, PulseAudio Software Video Frameworks:• SMP-optimized FFmpeg decoders. Hardware Video Frameworks:• Khronos OpenMAX (OMAP3, OMAP4, Tegra2).• nVidia VDPAU (x86 with nVidia GeForce GPU).• Freedesktop VA-API (x86 with Intel or ATI GPUs).• Broadcom CrystalHD (BCM 70012/70015 chips).• Other native SoC acceleration (OMAP3, OMAP4). B. Zores – FOSDEM 2011
  10. 10. Multimedia Features - Applications Frameworks and Players:• MPlayer, Xine, GStreamer, VLC• libplayer Audio/Video abstraction framework Media Center frontends:• XBMC• Video Disk Recorder (VDR)• Enna• HTS Showtime• Nokia QtMediaHub• MythTV B. Zores – FOSDEM 2011
  11. 11. Build System Overview Fully POSIX shell scripts based:• Easy understanding, hacking and maintenance ...• … at least much more than obfuscated Makefiles or Python stuff ;-) Does not require any externals tools or environment.• Required host build tools and packages are built along the way.• Cross-Compilation Safety and Robustness• Triggers GCC internal errors on -I/usr/include and -L/usr/lib Fully customizable:• Supports customized distribution flavours pre-generated configurations.• Complete standalone package/feature selection through Kconfig interface.• Per-package fine-tuning through use flags (similar to Gentoo). Features per-package metadata rules for abstracted in/out. With more than 550 supported packages. B. Zores – FOSDEM 2011
  12. 12. Toolchain Overview Support for multiple GCC-based cross-compilers:• OpenBricks multi-architectures native one.• Linaro for ARM.• CodeSourcery for ARM.• Support for multiple C libraries:• GNU libc (glibc)• Embedded GLIBC (eGlibc). This is default one !• uClibc• klibc (for early ramdisk bits). Do your own mix ! B. Zores – FOSDEM 2011
  13. 13. Configuration Overview (1/2) Up to 3-levels of hardware configuration tuning:• Architecture (e.g. ARM, x86 …)• Platform (e.g generic, OMAP3, OMAP4 …)• Machine (e.g. generic, Beagleboard, IGEPv2 …)• The deeper, the more optimized (footprint, selected packages …), but the less portable … -> it’s up to you to choose depending on your needs ! Automatic package inter-dependencies selection and build process. Support for per arch/platform/machine package overlay. B. Zores – FOSDEM 2011
  14. 14. Configuration Overview (2/2) Features fine-tuning through “use flags” (similar to Gentoo):• Conditionally build specific features.• Enable flags per-package or system-wide.• You can also have package-specific flags.• Infinite number of them … Pre-determined packages subset, a.k.a. build flavours:• Minimalist base bootable system.• GeeXboX MediaCenter-oriented distribution.• Add your own distro here ! B. Zores – FOSDEM 2011
  15. 15. Key Build Framework Features Bleeding-edge packages: latest stable package version policy. Support for arch/platform/machine specific package overlay (sources, patches …). Modern user-space: systemd, udev, D-Bus, connman … Stuff gets packaged into low-resources OPKG packages. Multiple OPK build residue: runtime, devel, debug. Multiple target system delivery forms:• Flashable disk images: JFFS2, UBIFS, EXT 2/3/4.• x86 LiveCD (ISO) and network (PXE) bootable images.• Flat root filesystem• Virtual machines images: QEMU, VMware B. Zores – FOSDEM 2011
  16. 16. Package Description Template Files Structure:• build: cross-build rules• install: installation rules for target (optional)• installdev: installation rules for host toolchain (optional)• meta: metadata, use flags and package description.• unit (optional)• package.service: systemd service.• patches (optional)• 01_fix.diff• 02_feature.diff• series (optional) B. Zores – FOSDEM 2011
  17. 17. “Simple” package example: syslink (1/4)● Metadata description: PKG_NAME=syslink PKG_VERSION= PKG_URL="$DISTRO_SRCS/tisyslink-${PKG_VERSION}.tar.bz2" PKG_REV=1 PKG_DEPENDS="$TARGET_LIBC tiler" PKG_BUILD_DEPENDS="toolchain" PKG_PRIORITY=optional PKG_SECTION=libs PKG_SHORTDESC="TI OMAP4 SysLink DSP interface" PKG_LONGDESC="SysLink is the next generation IPC driverdeveloped for OMAP4 and beyond. SysLink is an evolution ofboth the previous-generation IPC drivers - DSPBridge andDSPLink." B. Zores – FOSDEM 2011
  18. 18. “Simple” package example: syslink (2/4) Build Rules:#!/bin/sh. config/optionscd $BUILD/$1*do_configure --disable-debug makemake_install B. Zores – FOSDEM 2011
  19. 19. “Simple” package example: syslink (3/4) Toolchain installation files rules (dev opk file):do_installdev usr/includedo_installdev usr/lib Runtime target installation files rules (runtime + dbg opk file):do_install usr/bin/syslink_daemon.outdo_install usr/lib/*do_install usr/lib/*do_install usr/lib/*do_install usr/lib/*do_install usr/lib/*do_install usr/lib/*do_install usr/lib/* B. Zores – FOSDEM 2011
  20. 20. “Simple” package example: syslink (4/4) SystemD Service:[Unit]Description=Ducati Syslink daemonConditionPathExists=/etc/[Service]EnvironmentFile=/etc/syslink.confType=forkingExecStart=/usr/bin/syslink_daemon.out $SYSM3_IMAGE $APPM3_IMAGERestart=always[Install] B. Zores – FOSDEM 2011
  21. 21. “Average” package example: libplayer (1/2) Metadata description:PKG_NAME=libplayerPKG_VERSION=2.0.1PKG_URL="$PKG_VERSION.tar.bz2"PKG_REV=1PKG_BUILD_DEPENDS="toolchain"PKG_RUN_DEPENDS="$TARGET_LIBC"PKG_USE="gstreamer xorg vdpau"# gstreamerPKG_USE_DESC_gstreamer="Enable GStreamer backend"PKG_USE_HELP_gstreamer="Enables the GStreamer backend."PKG_DEPENDS_gstreamer="gstreamer gst-plugins-base"# xorgPKG_DEPENDS_xorg="libX11"PKG_DEPENDS_vdpau="libvdpau" B. Zores – FOSDEM 2011
  22. 22. “Average” package example: libplayer (2/2) Build Rules:#!/bin/sh. config/optionsXORG_CONFIG="--disable-x11"pkg_uses $1 xorg && XORG_CONFIG="--enable-x11 --enable-xlib-hack"GST_CONFIG="--disable-gstreamer"pkg_uses $1 gstreamer && GST_CONFIG="--enable-gstreamer"cd $BUILD/$1*do_configure $GST_CONFIG $XORG_CONFIG --cross-compile --disable-docmake && make_install B. Zores – FOSDEM 2011
  23. 23. How you can one help (or get helped) ? Get some help or information:• Website provides a complete documentation on build system internals.• On our mailing list: Join the development team:• Add new packages, hence features.• Add support for new/more hardware (yours ?).• Increase flavours support by adding your custom distribution subset. Sponsor us with a couple of reference boards.• Only way for the team to really support your architecture …• We’re still interested in Intel / Freescale / Qualcomm / Marvell boards. Donations• The usual way: helps us buy new toys to be supported ... B. Zores – FOSDEM 2011
  24. 24. Thanks ... THANKS !! B. Zores – FOSDEM 2011