Booting Linux Fast & Fancy. Embedded Linux Conference Europe Cambridge, Robert Schwebel

Similar documents
Embedded Linux Conference Europe Sascha Hauer

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

ECE 471 Embedded Systems Lecture 12

ARM Powered SoCs OpenEmbedded: a framework for toolcha. generation and rootfs management

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

How I survived to a SoC with a terrible Linux BSP

How I survived to a SoC with a terrible Linux BSP

OP-TEE Using TrustZone to Protect Our Own Secrets

U-Boot Falcon Mode. Minimizing boot times using U-Boot "Falcon" mode. Stefano Babic / Wolfgang Denk. July 2012

ECE 471 Embedded Systems Lecture 16

TQ2440 Development Platform Manual

MYD-IMX28X Development Board

OP-TEE Using TrustZone to Protect Our Own Secrets

Linux as primary Operating System

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

ECE 471 Embedded Systems Lecture 16

DTK2410 Specification

D1Y - Embedded Linux with Yocto

Update on boot time reduction techniques

EM210 Burn Linux Image Manual. Catalogue

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

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.

ECE 471 Embedded Systems Lecture 15

The Early System Start-Up Process. Group Presentation by: Tianyuan Liu, Caiwei He, Krishna Parasuram Srinivasan, Wenbin Xu

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

Department of Computer Science and Engineering, Sri Jayachamarajendra College of Engineering, Mysore, Karnataka


LAVA FOR BISECTING KERNEL BUGS LAVA MEETS GIT BISECT RUN

January 28 29, 2014San Jose. Engineering Workshop

About Voipac i.mx53 Development kit. Packing List Connector Locations Connecting the components and cables. First Step

EMBEDDED LINUX ON ARM9 Weekend Workshop

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

RakunLS1, Qseven SBC module with LS1021A

Use U-Boot. U-Boot Main Commands. U-Boot script capability

3.3 WinCE System Installation

User s Manual for the Boundary Devices Nitrogen R board

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

ARM Device Tree status report

Lab 1. OMAP5912 Starter Kit (OSK5912)

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

Micetek International Inc. Professional Supplier for PowerPC Development Tools

UEFI Secure Boot and DRI. Kalyan Kumar N

Flash filesystem benchmarks

ECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017

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

PL-I Assignment Broup B-Ass 5 BIOS & UEFI

Chapter 6. Boot time configuration. Chapter 6 Boot time configuration

Embedded Linux system development training 5-day session

MYD-IMX28X Development Board

Product Technical Brief S3C2412 Rev 2.2, Apr. 2006

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

Android System Development Training 4-day session

Micetek International Inc. Professional Supplier for PowerPC Development Tools

EMBEDDED SYSTEM FOR VIDEO AND SIGNAL PROCESSING

Leverage Vybrid's asymmetrical multicore architecture for real-time applications by Stefan Agner

D1S - Embedded Linux with Ac6 System Workbench

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

NAND/MTD support under Linux

Building a reference IoT product with Zephyr. Ricardo Salveti Michael Scott Tyler Baker

Arch Linux Grub You Need To Load The Kernel First

GenIVI for Auto Infotainment Solutions on i.mx

Ottimizzare i tempi di boot di Linux. Andrea Righi -

Developing Environment for Intel Mainstone Board

Building CircuitPython

MCAM335x Linux User's Guide

Copyright 2016 Xilinx

i.mx31 3-Stack Platform Linux SDK Standard Release Package User s Guide

Porting U-Boot and Linux on new ARM boards: a step-by-step guide

Raspberry Pi Network Boot

Porting Linux to a new SoC

LS9200 User Guide LinkSprite Technologies, Inc.

Developing i.mx Multimedia Applications Processors with Windows Embedded CE 6.0 WinCE 6.0 on the i.mx25 and i.mx35 PDK s

Yocto Project and OpenEmbedded training 3-day session

Operating System. Hanyang University. Hyunmin Yoon Operating System Hanyang University

Embedded Linux Architecture

Product Technical Brief S3C2413 Rev 2.2, Apr. 2006

IJREAT International Journal of Research in Engineering & Advanced Technology, Volume 1, Issue 5, Oct-Nov, 2013 ISSN:

Oxalis Getting Started

LPI EXAM LPI Level 1 Exam 101, Junior Level Linux Certification, Part 1 of 2. Buy Full Product.

MV 4412 Android 4.0 Compilation

About Voipac i.mx51 Development kit. Packing List Connector Locations Connecting the components and cables. First Step

COSC 243. Input / Output. Lecture 13 Input/Output. COSC 243 (Computer Architecture)

Operating systems fundamentals - B02

Advanced Embedded Systems

EAN-ARM-Application-Development

64 bit Bare Metal Programming on RPI-3. Tristan Gingold

RedBoot for Freescale i.mx27

Human Machine Interface Platform

Achieve Fastest System Startup Sequences.

Rootfs made easy with Buildroot

CS 410/510. Mark P Jones Portland State University

S3C6410-TFAUbuntu Easy Guide

Manual Install Ubuntu Server From Usb Drive

Mainline on form-factor devices / Improving AOSP

MV V210 Android 4.0 Compilation

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

Linux+ Guide to Linux Certification, Third Edition. Chapter 2 Linux Installation and Usage

EE 354 Fall 2015 Lecture 1 Architecture and Introduction

Hello, and welcome to this presentation of the STM32F7 System Configuration Controller.

Release Notes for QNX Neutrino BSP for Renesas SH7785 SDK 1.0.0#

Transcription:

Booting Linux Fast & Fancy Embedded Linux Conference Europe Cambridge, 2010-10-28 Robert Schwebel <r.schwebel@pengutronix.de> Slide 1 - http://www.pengutronix.de - 01/11/2010

Motivation: Booting Linux Fast & Fancy I User experience becomes more important: Slide 2 - http://www.pengutronix.de - 01/11/2010

Motivation: Booting Linux Fast & Fancy II Industrial devices don't look like computers And the shouldn't boot slowly like computers... Slide 3 - http://www.pengutronix.de - 01/11/2010

Motivation: Booting Linux Fast & Fancy III Automotive devices have fast-boot requirements Example from a project: Anwering CAN messages in < 200 ms after power-on! Slide 4 - http://www.pengutronix.de - 01/11/2010

Motivation: Booting Linux Fast & Fancy IV Video: Start sequence on Vortex DX (800 MHz x86) Slide 5 - http://www.pengutronix.de - 01/11/2010

What can we do to avoid this? Slide 6 - http://www.pengutronix.de - 01/11/2010

Barebox: Project History 2007 / u-boot-v2-rc1: Forked from U-Boot, as a technology study under the U-Boot-v2 name 2009 / barebox-2009.12.0: Renamed to barebox, with it's own infrastructure 2010 / barebox-2010.10.0 20 releases up to now Timed releases: about once per month Maintenance releases: on demand Slide 7 - http://www.pengutronix.de - 01/11/2010

Barebox: Development Resources Website: http://www.barebox.org GIT Server: http://git.pengutronix.de/?p=barebox.git next branch: accumulates new features master branch: next is merged into master after release Mailing List: http://lists.infradead.org/mailman/listinfo/barebox/ Slide 8 - http://www.pengutronix.de - 01/11/2010

Barebox: Development Speed Commit History: 2008 2009 2010 364 583 648 (until now) Slide 9 - http://www.pengutronix.de - 01/11/2010

Barebox: CPU Architectures Supported Hardware: arm blackfin m68k ppc sandbox x86 at91, ep93, i.mx, netx, nomadik, omap, s3c24xx, stm mcfv4e mpc5xxx linux bios based Slide 10 - http://www.pengutronix.de - 01/11/2010

Barebox - All Features on One Slide Build system: Boot media: Data Transport: Graphics: Filesystem: Tools: User interaction: Drivers: Modules: Memory: Network: Kconfig, Kbuild linux16, nand, ubi, sd DFU, Kermit, X,/Y/Z-Modem, tftp Framebuffer, splash screen cd, ls, cp, saveenv/loadenv, mount, partitions crc, edit, gpio, unlzo login, menu i2c, mfd, flash, serial, spi, usb host+device insmod, lsmod meminfo, memtest, md, mw ipv4, dhcp, netconsole, tftp, rarp, ping, nfs, dns Slide 11 - http://www.pengutronix.de - 01/11/2010

Booting Linux Fast Power-controller releases reset line ROM bootloader starts running Fetch boot block from NAND / SD card Execute first boot code Initialize hardware Fetch Linux kernel from NAND / SD card Execute Linux Extract compressed image Kernel boots, initializes hardware /sbin/init Slide 12 - http://www.pengutronix.de - 01/11/2010 Optimize Hardware (Electronics)

Booting Linux Fast Power-controller releases reset line ROM bootloader starts running Fetch boot block from NAND / SD card Execute first boot code Initialize hardware Fetch Linux kernel from NAND / SD card Execute Linux Extract compressed image Kernel boots, initializes hardware /sbin/init Slide 13 - http://www.pengutronix.de - 01/11/2010 Select CPUs optimized for fastboot (i.e. MX25)

Booting Linux Fast Power-controller releases reset line ROM bootloader starts running Fetch boot block from NAND / SD card Execute first boot code Initialize hardware Fetch Linux kernel from NAND / SD card Execute Linux Extract compressed image Kernel boots, initializes hardware /sbin/init Slide 14 - http://www.pengutronix.de - 01/11/2010 Done by firmware, cannot be tuned, usually.

Booting Linux Fast Power-controller releases reset line ROM bootloader starts running Fetch boot block from NAND / SD card Execute first boot code Initialize hardware Fetch Linux kernel from NAND / SD card Execute Linux Extract compressed image Kernel boots, initializes hardware /sbin/init Slide 15 - http://www.pengutronix.de - 01/11/2010 First place we can do something in software

Booting Linux Fast Power-controller releases reset line ROM bootloader starts running Fetch boot block from NAND / SD card Execute first boot code Initialize hardware Fetch Linux kernel from NAND / SD card Execute Linux Extract compressed image Kernel boots, initializes hardware /sbin/init Slide 16 - http://www.pengutronix.de - 01/11/2010 Do only what's absolutely necessary. Tune clocks & timings.

Booting Linux Fast Power-controller releases reset line ROM bootloader starts running Fetch boot block from NAND / SD card Execute first boot code Initialize hardware Fetch Linux kernel from NAND / SD card Execute Linux Extract compressed image Kernel boots, initializes hardware /sbin/init Slide 17 - http://www.pengutronix.de - 01/11/2010 Async read and decompression tricks

Booting Linux Fast Power-controller releases reset line ROM bootloader starts running Fetch boot block from NAND / SD card Execute first boot code Initialize hardware Fetch Linux kernel from NAND / SD card Execute Linux Extract compressed image Kernel boots, initializes hardware /sbin/init Slide 18 - http://www.pengutronix.de - 01/11/2010 Depending on CPU, use uncompressed Image or zimage

Booting Linux Fast Power-controller releases reset line ROM bootloader starts running Fetch boot block from NAND / SD card Execute first boot code Initialize hardware Fetch Linux kernel from NAND / SD card Execute Linux Extract compressed image Kernel boots, initializes hardware /sbin/init Slide 19 - http://www.pengutronix.de - 01/11/2010 Minimized kernel, all the tricks from elinux.org wiki

Booting Linux Fast Power-controller releases reset line ROM bootloader starts running Fetch boot block from NAND / SD card Execute first boot code Initialize hardware Fetch Linux kernel from NAND / SD card Execute Linux Extract compressed image Kernel boots, initializes hardware /sbin/init Slide 20 - http://www.pengutronix.de - 01/11/2010 Depending on use case, use initramfs or real rootfs (slower)

Booting Linux Fast Reset released First Bootloader Instruction Bootloader starts kernel /sbin/init running 336 ms Example: Freescale i.mx35, ARM1136EJ-S, 532 MHz Slide 21 - http://www.pengutronix.de - 01/11/2010

Booting Linux Fancy Power-controller releases reset line ROM bootloader starts running Fetch boot block from NAND / SD card Execute first boot code Initialize hardware Fetch Linux kernel from NAND / SD card Execute Linux Extract compressed image Kernel boots, initializes hardware /sbin/init Slide 22 - http://www.pengutronix.de - 01/11/2010 Backlight off Load splash Show splash Backlight on

Booting Linux Fancy Power-controller releases reset line ROM bootloader starts running Fetch boot block from NAND / SD card Execute first boot code Initialize hardware Fetch Linux kernel from NAND / SD card Execute Linux Extract compressed image Kernel boots, initializes hardware /sbin/init Slide 23 - http://www.pengutronix.de - 01/11/2010 Make sure Framebuffer has fixed address between bootloader and kernel. No re-init!

Booting Linux Fancy Power-controller releases reset line ROM bootloader starts running Fetch boot block from NAND / SD card Execute first boot code Initialize hardware Fetch Linux kernel from NAND / SD card Execute Linux Extract compressed image Kernel boots, initializes hardware /sbin/init Slide 24 - http://www.pengutronix.de - 01/11/2010 Cross fading with overlay

Booting Linux Fancy Video: Start sequence on phycore-i.mx27 http://www.youtube.com/watch?v=f5cbu1so4d8 Video: Start sequence on NESO (MX27, ARM926, 400 MHz) http://www.youtube.com/watch?v=2fzl_7u9nbe Demo: Start sequence on CUPID (MX35, ARM1136, 532 MHz) Slide 25 - http://www.pengutronix.de - 01/11/2010

If fast is not fast enough... We do not reach the 200 ms limit of the automotive guys BTCS: Boot Time Critical Services (originally inspired by Freescale, now implemented with mainline focus) Idea: Set aside some memory Register a poller in Barebox Make sure memory is handed over to Linux Poller ends up as a normal interrupt service routine in Linux We estimate to have CAN ready after about < 100 ms No numbers yet, measurement hardware is still under construction... Downside: bare metal stack Slide 26 - http://www.pengutronix.de - 01/11/2010

Thanks for Listening - Questions? Slide 27 - http://www.pengutronix.de - 01/11/2010

Do we need a Bootloader at all? Alternative: use Linux to boot Linux (less code duplication) (See John's talk yesterday) Booting from NAND: we need at least a pre-loader dealing with Bad Blocks / UBI ROM access routines to NAND and SD are unoptimized Barebox offers a (to kernel developers) well-known structure, where to put code in if it is necessary. Minimal porting effort, no parallel running code Even if we have linux-only booting in the future, Barebox can be scaled down to the minimum, for the first stage Slide 28 - http://www.pengutronix.de - 01/11/2010