Track Two Building an Internet Radio with the TI Sitara AM3517 using LinuxLink

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

Track Three Building a Rich UI Based Dual Display Video Player with the Freescale i.mx53 using LinuxLink

Track Two Building an Internet Radio with the TI Sitara AM3517 using LinuxLink

Track Three Building a Rich UI Based Dual Display Video Player with the Freescale i.mx53 using LinuxLink

Track Three Building a Rich UI Based Dual Display Video Player with the Freescale i.mx53 using LinuxLink

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

using the Texas Instruments Zoom

The Right Approach to Minimal Boot Times

Optimizing Linux Boot Time

Timesys University. Learn Embedded Linux by Building a Video Surveillance Device

Hands-on with the Sitara Linux SDK

Update on boot time reduction techniques

Zoom OMAP-L138 experimenter Kit Lab Manual

In this video, I will be covering DM385 IPNC RDK out of box demo-- Here, I'll be showing flashing the uboot using prebuilt binaries available in RDK--

Embedded Linux system development training 5-day session

Boot time Optimization of Automotive Grade Linux. Shilu SL & Renjith G 14-Jul-2016

ID 730L: Getting Started with Multimedia Programming on Linux on SH7724

User s Manual for the Boundary Devices Nitrogen R board

400AP Application Note Uploading Firmware Images to 400AP NAND Flash Models

A pragmatic guide to boot-time optimization

Getting Started with BeagleBoard xm

IPL+UBI: Flexible and Reliable with Linux as the Bootloader

Pengwyn Documentation

LTIB for i.mx28, a step-by-step guide

Group 15 Arian Caraballo, CpE Daniela Zicavo, CpE Felipe Bernal, CpE Isabel Virag, CpE

Linux. For BCT RE2G2. User Guide. Document Reference: BCTRE2G2 Linux User Guide. Document Issue: Associated SDK release: 1.

Embest SOC8200 Single Board Computer

NI Linux Real-Time. Fanie Coetzer. Field Sales Engineer SA North. ni.com

Hi-Res 8 Wi-Fi Digital Picture Frame with MP3 player Table of Contents

TQ2440 Development Platform Manual

Jade IdeaBoxx. Product Manual

Linux. For BCT TM1 / HB5. User Guide. Document Reference: BCTTM1HB5 Linux User Guide. Document Issue: 1.2. Associated SDK release: 1.

Getting Started with TargetOS on the ZedBoard 1 Introduction

phycore -XScale/PXA270 Development Kit (KPCM-027) Loading a Linux Image (demo.img)

Getting Started. With Windows CE and the Topaz i.mx25 Development Kit

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

Linux FastBoot. Reducing Embedded Linux Boot Times. Embedded World Conference 2012

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

Labs instructions for Enabling BeagleBone with TI SDK 5.x

Display Modules (DL-DM) Application Developer's Guide

Oxalis Getting Started

D1S - Embedded Linux with Ac6 System Workbench

AT91SAM9G45-EVK Linux. User Manual

Group 15 Arian Caraballo, CpE Daniela Zicavo, CpE Felipe Bernal, CpE Isabel Virag, CpE

How I survived to a SoC with a terrible Linux BSP


Introduction to the TenByTen6410

D1Y - Embedded Linux with Yocto

SBC8140 Single Board Computer

Release Notes Zebra VC80x NN-00-A Release for AOSP. Introduction. Introduction. Description. Zebra Value Adds Feature List

QLIK VIRTUAL EVENT. qlik.com

RakunLS1, Qseven SBC module with LS1021A

Release Notes Zebra VC80x Android N Update 003 based on NG-00-A (GMS)

Cisco UCS Diagnostics User Guide for B-Series Servers, Release 1.0

Introduction to Linux Init Scripts

Lab 1. OMAP5912 Starter Kit (OSK5912)

U-Boot and Linux Kernel Debug using CCSv5

OMAP3530 has 256MB NAND flash in PoP (PoP: Package-On-Package implementation for Memory Stacking) configuration.

EMBEDDED LINUX ON ARM9 Weekend Workshop

MCAM335x Linux User's Guide

UFCETW-20-2 Examination Answer all questions in Section A (60 marks) and 2 questions from Section B (40 marks)

ADS U-boot User's Manual. Applied Data Systems Old Columbia Road Columbia MD, USA

Firmware Update 3.0 MSA G1 SCBA

Parallella Linux - quickstart guide. Antmicro Ltd

Linux in Automotive Environment

SAM A5 ARM Cortex - A5 MPUs

Introducing the Haiku Operating System

Embedded Design without an OS. By Peter de Ruiter D&E September 21 st, Transfer BV

Release Notes Zebra MC33x NN- 00-A Release for Non-GMS

Using memory cards (not supplied)

OK335x Products Guide. Contents

SHWETANK KUMAR GUPTA Only For Education Purpose

Please read this manual carefully before you use the unit and save it for future reference.

SAM9-L9261 User Manual. All boards produced by Olimex are ROHS compliant. Rev.C, September 2009 Copyright(c) 2009, OLIMEX Ltd, All rights reserved

Computer System Management - File Systems

Contents 1. PREFACE INTRODUCTION PRODUCT FEATURES STARTING TO USE HEADPHONE Package Contents 4.

Wind River Pulsar Linux Quick Start For Avnet Zynq Version 7.0

SparkGate7 Quick startup guide

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

W90N745 BSP Quick Start Guide

DaVinci System Optimization

Release Notes Zebra VC80x AndroidN Update005 based on NG-00-A Release for GMS

Embedded Linux Conference Europe Sascha Hauer

Mars ZX3 Android manual. Antmicro

Human Machine Interface Platform

ConnectCore 6 Android/Yocto. Getting Started Guide

1-Port Industrial Ethernet to Serial Embedded Computer. SE5901 (SDK) Series FEATURED HIGHLIGHTS PRODUCT DESCRIPTION

Lessons learnt in boot time reduction

Chapter 2. Operating-System Structures

S3C6410-TFAUbuntu Easy Guide

DSH-G300 Smart Hub. Manual

No Crash Dump? No Problem! Light-weight remote kernel crash reporting for settop boxes

LS9200 User Guide LinkSprite Technologies, Inc.

Overview. 1/13/ Preliminary Product Brief

Introduction p. 1 Why Linux? p. 2 Embedded Linux Today p. 3 Open Source and the GPL p. 3 Free Versus Freedom p. 4 Standards and Relevant Bodies p.

Developing on DragonBoard

i.mx Product Family and Freescale codec offering to meet Automotive and Industrial Requirements

Overview. 3//5/ Preliminary Product Brief

Getting Started Select Wireless Manager. Wireless Manager Window. To enable or disable a wireless connection, tap the specific button.

Overview 1. Foreword 2. Warnings

Transcription:

Track Two Building an Internet Radio with the TI Sitara AM3517 using LinuxLink Session 4 How to optimize, test and integrate the solution for fast booth and quick deployment Audio streaming is available for this event. Turn on your speakers to listen.

2 Tools You Can Use Q&A and/or Chat Click on Q&A panel or chat panel icon in the bottom, right corner Type in your question in the space provided Click on Submit

3 Tools You Can Use Polling The poll will appear on your screen Select your answer for each question Click on Submit

4 Session Information You can download the slides for today s session at http:///embedded-linux/training/timesysuniversity/ti_am3517 You can view a recording of today s session at http:///embedded-linux/training/timesysuniversity/ti_am3517 Today s speaker: Maciej Halasz Director, Product Management Timesys

5 Building an Internet Radio with the TI Sitara AM3517 Session 1 Recording Available How to assemble and deploy an initial BSP and setup development environment with the matching SDK http:///embedded-linux/training/timesys-university/ti_am3517 Session 2 Recording Available How to build a modern User Interface to launch Internet Radio playback using Qt Embedded for Linux Session 3 Recording Available How to decode a media stream and integrate Bluetooth functionality for a remote speaker Session 4 Today How to optimize, test and integrate the solution for fast boot and quick deployment

6 Today s Agenda Recap of what we have done so far Measure the boot time in our dev environment Integrate all developed software pieces Overlay concept Fast boot optimizations Boot process overview Bootloader optimizations Kernel level optimizations Filesystem optimizations Other options Deployment SD card preparations

7 Past Sessions Recap

8 What We Have Accomplished So Far Learned about TI AM3517 LinuxLink needed for all exercises Built a custom BSP with LinuxLink Web Edition Reflected application requirements Setup a Qt based IDE development environment Developed a UI with Qt widgets Tested locally Added and configured Bluetooth Established BT connections using A2DP profile Added code to playback live streams Deployed the system on the target via NFS for future development

9 Project Requirements (TI AM3517EVM) Serial port communication Graphics Touchscreen Applications Screen calibration Playback control UI USB Storage (USB stick) Extensions Ethernet Secure Connection Transfer (FTP/SCP) Console (Telnet/SSH) Audio Alsa Mixer Sound playback SD/MMC Card - Filesystem - Booting Linux NAND Flash Boot from Additional storage WiFi (optional) Streaming audio Bluetooth Sensor connections

10 Internet Radio (Blueprint) COMPLETED! Internet Radio User Interface, Buttons, Stream sel, etc RSS feeds Playback sound Bluetooth Speaker Wireless Streaming Middleware LCD calibration Qt Embedded setup scripts MPlayer Codecs A2DP dbus openssh networking shell WebKit alsa, live555 bluez Wireless tools Linux kernel Driver Driver Driver Driver Driver Driver Driver U-Boot bootloader Driver Driver Touch AM3517EVM LCD Audio USB Bluetooth Screen WiFi Ethernet Serial NAND SDIO

11 Last Week s Homework Share Your Experience 1. Setup a generic Bluetooth network 2. Pair your system with a Bluetooth device of choice 3. Look at available Bluetooth profiles 4. Use your Bluetooth device from within your application Did you setup your Bluetooth network? What Bluetooth device(s) did you pair with? Did you run into any challenges?

12 Giveaway!!! If you attend at least 3 2 out of 4 sessions in this Timesys University track, we will automatically enter you into a drawing for a chance to win a Logic PD Zoom AM3517 EVM Development Kit

13 Software Integration

14 Developed Components U-Boot Linux Kernel Bluetooth, USB drivers, <1s 75s Boot Time Filesystem BlueZ, Mplayer, live555, Qt for Embedded, etc. Internet Radio Application Setup scripts Bluetooth, DBus, Application startup

15 Overlay A way to integrate custom Linux components with the underlying Linux system Structured development Simplified maintenance Create a custom SXX startup script in /etc/init.d/ Export QWS and TSLIB variables Start the internetradio application Create an overlay Create a set of subfolders Copy custom content to appropriate places Define appropriate entries using Factory s Desktop interface Using Desktop Factory Interface navigate to: Target Configuration->Build RFS->RFS Content Tarball file:///<fully qualified path to overlay s tar file>

16 Boot time Measurement

17 Measuring the boot time Each embedded design is different Instrumentation is available Helps measure boot time at all stages Most are open source based Can be easily removed when you are done The trick behind boot time optimization is to know where your system is spending time. You may end up loosing a lot of time with little results!!!

18 Available Instrumentation Bootloader Logic analyzer (using GPIO pins) Kernel Measurement Printk Compile kernel with: CONFIG_PRINTK_TIMES=y Switch on dynamically: echo Y >/sys/module/printk/parameters/time initcall_debug On boot command line, use: initcall_debug=1 User space measurement Bootchart (www.bootchart.org) Strace Run strace ct 2>/tmp/strace.log bluetoothd Linux Trace Toolkit System uptime Add (echo -n "uptime:" ; cat /proc/uptime) to an RC script

19 Fast boot Optimizations

TIME 20 Boot Process Overview Boot Process Sequence U-Boot Reset, copy U-Boot to SDRAM and jump to start address Basic System Init. (IMPORTANT) Copy the Linux kernel Image to SDRAM from SD Decompress the kernel if needed Jump to upload address and start the kernel Kernel Run Kernel Init code Init kernel subsystems (device drivers) Init SD card Mount SD card partition with RFS Execute init script Application Depends on your specific requirements Power On Flash init U-boot Hardware Init U-boot Copies kernel to memory/uncompress Kernel Boot Hardware/Subsystems initialization RFS Fetch/Mount/Boot into User Application

21 Bootloader Optimizations Low hanging fruit Set the bootdelay variable to 0 (time savings 4s) Preset the bootcmd; do not use setenv (time savings 0.5s) Disable console (time savings 2s) CFG_CONSOLE_INFO_QUIET CONFIG_SILENT_CONSOLE In our case- silent=yes Disable other tests (time savings 2-6s) <1s 75s Boot Time Additional modification/enhancements If possible, use uncompressed Linux kernel Optimize the NAND read operation, to shorten image copy time Rewrite/disable CRC32 checksum code Load the image directly to Entry point Set CONFIG_LOADADDR If NOR Flash is used, leverage XIP For large kernel image, use different compression algorithms

22 Linux Kernel Optimizations Low hanging fruit (time savings: 2-15+s) Use uncompressed kernel Uncompressing takes time Remove unused kernel options Not used networking i.e. IPV6, multiple file systems Debug features and symbols (for final deployment) <1s 75s Boot Time Build not initially used device drivers as Loadable Kernel Modules Keep the features needed at boot time built into the kernel Remaining drivers built as LKMs will make kernel smaller Consider various approaches for your RFS deployment JFFS2 with appended journal summary (skip flash scan) CRAMFS, UBIFS Suppress the console output Use quiet with your kernel command line

23 Making Linux Kernel Small and Fast Linux kernel options we will look at today Kernel Option CONFIG_EMBEDDED CONFIG_IKCONFIG CONFIG_KALLSYMS CONFIG_BUG CONFIG_HOTPLUG CONFIG_DNOTIFY CONFIG_EXT2 CONFIG_PRINTK CONFIG_PRINTK_TIME CONFIG_CC_OPTIMIZE_FOR_SIZE Comment Disables or tweaks a number of kernel options and settings. Think uclinux Saves complete kernel configuration in the kernel Prints our symbolic crash information and backtraces Disables BUG and WARN functions Can be disabled if no external devices will be attached and if you use static device files File change notification to user space Disable if using jffs2 file system Makes kernel silent when disabled A way to track where time is spent at boot time Will select Os instead of O2 resulting in a smaller kernel

24 Userspace Optimizations Filesystem modifications Optimize the RC Scripts (remove the ones you don t use) If possible replace RC scripts with a single init Pre-link Link applications statically Avoid udev create needed device nodes ahead of time Use static IP address Additional modifications/enhancements Staged booting Code level modifications Add a splash screen <1s 75s Boot Time

25 Fast Boot Offering from Timesys If your requirements include fast booting, Timesys can help you save time Implement added levels of optimizations with open source techniques Some of the deep-level optimizations techniques, described earlier Use non open source technologies available to Timesys to further speed up the boot-time Typically needed when many services have to be up and running asap This engineering experience is available as a service

26 Deployment: SD Card

27 SD Card Deployment Card Preparations Use a card of appropriate size Format the card as follows: Partition 1: VFAT size: 6MB Partition 2: ext2 size: 48MB+ Copy the images Partition 1: uimage kernel Partition 2: uncompress the file system created with the factory Desktop interface Insert the card in the target s SD Card slot Change the bootcmd variable to boot from SD Card setenv bootcmd mmc init 0; fatload mmc 0 0x80000000 uimage-am3517;bootm; setenv bootargs console=ttys2,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext2 rootwait Reset the system

28 What We Have Accomplished Created an overlay integrated custom code Learned about boot time optimizations Concepts Linux component specific Deployed Linux on SD Card Measured boot time

29 This is it!!! We hope you enjoyed this Timesys University Track

30 What We Have Accomplished

31 What We Have Accomplished Cross-compiled/Deployed/Debugged our Internet Radio application on the Target Learned about how to add Bluetooth support User Space Kernel Space Autoboot Added codecs/applications for media playback Modified Internet radio application Launch external application Handle Play/Stop actions Adding a new radio station from a browser

32 New Timesys Subscription Model Best price/performance No complex contracts or usage terms Every seat includes live, unmetered support LinuxLink LinuxLink + Pro Services Pro Services Only Starts @ $5495 Includes live, expert support, multiple seats discount Perfect for engineering teams : Looking to build embedded linux products and expertise in-house Reduce the time & uncertainty associated with open source development Want expert support when they get stuck Starts @ $7495; includes 16-hour block of pro services Includes live, expert support, additional bundles available Perfect for engineering teams Wanting to focus in-house teams on differentiated development Want to develop in-house linux expertise fast Want expert support when they get stuck Project based, discounts for larger projects Perfect for engineering teams : Having tight deadlines Needing proven linux expertise fast Looking to eliminate development risk

33 Glossary LinuxLink (Web Edition) Web-based version of LinuxLink LinuxLink (Desktop Edition) Local version with full customization and third-party tools integration Workorder Stores definition of your software filenames, versions Bootloader Runs first, initializes necessary hardware, loads Linux Linux kernel Operating system that manages hardware access and other features for higher level software Device Driver Code that s part of a Linux kernel, defines how software accesses specific hardware File System All files (libraries/utilities/scripts/etc.) combined on a single storage, e.g. NAND flash Middleware Complete frameworks including APIs, utilities that provide specific functionality, e.g. Qt API (library) Used by applications, provide functionality, abstract hardware access Toolchain (cross) The most important part of the development environment. Used to compile source code into binaries.

34 About Timesys Carnegie Mellon University spin-off in 1996 First real-time embedded Linux distribution First to register carrier grade Linux (CGL) First to market with an open source, commercialgrade embedded Linux development framework (LinuxLink) First to develop and deliver an award-winning, automated, intelligent, embedded Linux build system (LinuxLink 3.0) Real-time Linux Leadership First embedded Eclipse-based Tools Customized Linux Versions First to register carrier-grade Linux distribution Integrate Real-time with OS Community First to market open source, commercial-grade Linux product LinuxLink 1.0 LinuxLink 2.0 First to deliver an automated, intelligent build system LinuxLink 3.0 LinuxLink Enea Linux Factory Platform Builder adds 100 th Partnership supported board 2001 Manual Customized Builds 2002 2003 2004 2005 2007 2008 2009 2010 Automated Build/Test Hosted Build System Semis adapt Build system 100% Open Source Intelligent Build system 2011 Support for Multicore

35 More Info You can download the slides for today s session at http:///embedded-linux/training/timesysuniversity/ti_am3517 You can view a recording of today s session at http:///embedded-linux/training/timesysuniversity/ti_am3517 Stay Online for Q&A!