Linux Bootup Time Reduction for Digital Still Camera Chan Ju, Park SW Laboratories Samsung Electronics.

Slides:



Advertisements
Similar presentations
PIKA Technologies Inc. PADS for the PIKA WARP Appliance March 2009.
Advertisements

Genesis: from raw hardware to processes System booting sequence: how does a machine come into life.
U-Boot and Linux Kernel Debug using CCSv5
Operating Systems Input/Output Devices (Ch , 12.7; , 13.7)
Handheld TFTP Server with USB Andrew Pangborn Michael Nusinov RIT Computer Engineering – CE Design 03/20/2008.
PC To GT Program Load Shachar Rosenberg Alex Normatov Technion - Digital Lab.
29 April 2005 Part B Final Presentation Peripheral Devices For ML310 Board Project name : Spring Semester 2005 Final Presentation Presenting : Erez Cohen.
Chapter 7 Interupts DMA Channels Context Switching.
Using PDG with e2studio: Example
Introduction Operating Systems’ Concepts and Structure Lecture 1 ~ Spring, 2008 ~ Spring, 2008TUCN. Operating Systems. Lecture 1.
Operating Systems Input/Output Devices (Ch 5: )
Software Development and Software Loading in Embedded Systems.
3-1 System peripherals & Bus Structure Memory map of the LPC2300 device is one contiguous 32-bit address range. However, the device itself is made up of.
© 2004 Cisco Systems, Inc. All rights reserved. Managing Your Network Environment Managing Router Startup and Configuration INTRO v2.0—9-1.
COMPUTER SYSTEM LABORATORY Lab4 - Bootloader. Lab 4 Experimental Goal Learn how to build U-Boot bootloader for PXA /10/8/ 142.
NET+OS 6.1 Training. BSP NET+OS 6.1 BSP Initialization Memory map New features Debugging Porting Issues.
Synology Technology Alex Wang May 1, 2008.
hardware and operating systems basics.
AT91SAM9261-EK WinCE 6.0 DEMO ATMEL AT91 Application & Support Group
張耀元 許博凱 Computer Science, National Chung Cheng University, 2014 Introduction A variation of the suspend-resume technique eliminates.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Operating Systems Overview: Using Hardware.
UNIX System Administration OS Kernal Copyright 2002, Dr. Ken Hoganson All rights reserved. OS Kernel Concept Kernel or MicroKernel Concept: An OS architecture-design.
Embedded Linux Systems Presented By: Kitrek Riese.
AT91RM9200 Boot strategies This training module describes the boot strategies on the AT91RM9200 including the internal Boot ROM and the U-Boot program.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 8: Main Memory.
02/2008 MATRIX VISION GmbH 1 Presentation The intelligent camera and Image processing sensor.
DOS  In the 1980s or early 1990s, the operating system that shipped with most PCs was a version of the Disk Operating System (DOS) created by Microsoft:
AT91SAM9261-EK WinCE 5.0 DEMO ATMEL AT91 Application & Support Group Version 1.O February 2007.
Porting Android to Beagleboard
From UEFI Shell to Linux - UEFI Linux BootLoader Zhang Rui Software Engineer Sep 28 th 2011.
Beagle Board Fast Boot Hui Chen Keji Ren Dec 10 th, 2009 EE382N-4 Project.
Porting Operating Systems Phan Duy Hùng (PhD) ES Lecturer – Hanoi FPT University.
Power Management of iPAQ Sukjae Cho
January 25th, CE Linux Forum Technical Conference1 Bootup Time Working Group Discussion Tim Bird, Chair.
Unit - VI. Linux and Real Time: Real Time Tasks Hard and Soft Real Time Tasks Linux Scheduling Latency Kernel Preemption Challenges in Kernel Preemption.
RL78 Code & Dataflash.
2006/JAN/20JapanTechnicalJamboree61 Improvement of bootup time using Power Management - Project Update - Hiroki Kaminaga Sony Corporation
Genesis: From Raw Hardware to Processes Andy Wang Operating Systems COP 4610 / CGS 5765.
Copyright © 2007 Heathkit Company, Inc. All Rights Reserved PC Fundamentals Presentation 29 – The ROM/BIOS.
Implementation of Embedded OS
Linux Boot Process on the Raspberry Pi 2 1 David Ferry, Chris Gill CSE 522S - Advanced Operating Systems Washington University in St. Louis St. Louis,
졸업 프로젝트 발표 1/74 Trinity Snapshot Boot 날 짜: 팀 명: Trinity
XIP – eXecute In Place Jiyong Park. 2 Contents Flash Memory How to Use Flash Memory Flash Translation Layers (Traditional) JFFS JFFS2 eXecute.
Embedded Software Design Week II Linux Intro Linux Kernel.
The World Leader in High Performance Signal Processing Solutions Das U-Boot: Blackfin Guts.
Chap. 4 ARM Boot Loader Internals. 2 S3C2500 ARM940T Core module ARM9TDMI CoreIC.
Matthew Locke November 2007 A Linux Power Management Architecture.
Overview A) Power on or reset B) 1st stage boot loader C) 2nd stage boot loader D) Operate system.
1 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com Free Electrons Introduction.
IMAGE COMPRESSION AND DECOMPRESSION USING ARM9 SYSTEM Under the guidance of Mrs. B. SATYA SRI DEVI,M.Tech, Assistant Professor By V. KUSUMA KUMARI Roll.
1 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com Embedded Linux system development.
Introduction to Operating Systems Concepts
By Ganesan Alagu Ganesh Feb 26, 2008
CCNA 2 v3.1 Module 2 Introduction to Routers
Implementation of Embedded OS
Ottawa Linux Symposium 2007
Lab 1: Using NIOS II processor for code execution on FPGA
Computer System Laboratory
USB The topics covered, in order, are USB background
By Ganesan Alagu Ganesh Feb 21, 2008
EMBEDDED LINUX #2.
Power Management Discussion
Improvement of startup time using Software Suspend - Project Update -
Programming Microcontroller
AT91RM9200 Boot strategies This training module describes the boot strategies on the AT91RM9200 including the internal Boot ROM and the U-Boot program.
Chapter 8: Memory management
Outline Module 1 and 2 dealt with processes, scheduling and synchronization Next two modules will deal with memory and storage Processes require data to.
Chapter 9 Bootloader.
Computer System Laboratory
Instructor Materials Chapter 5: Windows Installation
Presentation transcript:

Linux Bootup Time Reduction for Digital Still Camera Chan Ju, Park SW Laboratories Samsung Electronics

Introduction DSC Bootup Procedure Bootup time reduction methods – –Boot loader – –Kernel – –Root File system – –Application Optimization – –Suspend/resume Results Further works Conclusion Agenda

terms DSC –Digital still camera Bootup time –The time from platform power on to preview state Preview state –The DSC state for ready-to-shot 3A –Auto focus, auto white balance, auto expose Suspend/resume –Suspend to dram RFS –Root file system for Linux Kernel Robust FS –Linux file system for OneNAND flash Normal boot, suspend/resume boot

introduction About this project –In samsung, Embedded Linux ported for many CE devices DTV, DMB, Mobile phone, DVR, other set top boxes, etc –But not DSC area –DSC use many RTOSes ( vxworks, pSos, uITRON, Nucleus, etc) –Project stated for evaluation of embedded linux Why Linux in DSC –Technical Convergence in CE Devices –Plentiful of Application –Open S/W Platform –Cost?

Embedded Linux on DSC –There exist only few cases which was published –E.g. Ricoh Company made prototype Linux DSC DSC & bootup time –Long bootup time diminish customer satisfaction –Bootup Time is more important in DSC

Linux Bootup Time –PC : 1 min or more –Embedded System : 2~10 sec –Depends on system, Applications, Policy Image loading, H/W peripherals, application init applied Bootup methods for DSC –Normal Boot bootloader ~ preview application running –Suspend/Resume using suspend-to-ram Goals –Normal boot : 2 sec –Suspend/resume : 1 sec

Test Environments Target Platform –Core ARM926EJS –Image processor Samsung S5C7380x –System clock 216Mhz Fclock,108Mhz Hclock –Memory 64MB DDR, 64MB One-NAND flash ( async mode ) –DSC Module & etc 6M CCD(CMOS) censor, AF/Zoom/Shutter/Iris motor, Digital LCD, JPEG/MPEG codec, etc. USB, ADC, SD/MMC Card, etc Kernel – – – –Non-compressed Image – –Size : about 1MB File System – –Root fs : Cramfs – –Robust FS for Flash filesystem in OneNAND

Bootup time reduction is Every little makes a mickle All kinds of techniques are needed –Firmware (boot loader) Minimal system init shortening image copy time Boot devices –Hardware initialization One time System initialization Remove H/W probing time Only initialize the device which was used when bootup E.g. Dsc motors, storage (HDD, Card, Flash), DSP, etc

–Image small sizing kernel, root fs (libraries), D/D Modules, etc Depends on the kernel configuration –Device driver initialization Remove H/W probing & Initialization Using hard coding Module loading policy –Using static module if needed –Other modules can load when needed –application optimization Resource loading Memory allocation App setup procedure –Suspend/resume

Boot LoaderSystem initialization Kernel image copy to RAM Kernel Initialization Init kernel Init device driver Mount root file system Application Initialization start RC script DSC Process creation DSC application initialization Preview Mode (ready-to-shot) DSC Booting Procedure

bootloader –reset ~ OneNAND boot loader(xloader) execute –xloader copied to SDRAM & execute at SDRAM –xloader copy u-boot to RAM –DSC motor init –u-boot execute & copy kernel Image to SDRAM kernel init –Kernel Init code execute –init kernel subsystem –init static module –mount cramfs –execute init script application init –execute basic DSC application module –setup preview mode sequence –display preview & OSD Image

Boot time measurements Using H/W devices –Expensive –Target code modification is needed –Exact Using serial outputs –ARM or MIPS has no counter register (x86:TSC reg.) –Using host serial in cross development environments –features Cheap No or few modification for the target code Can collect much data Comparatively small differences

Initial bootup time (before optimization) (ms) Just after kernel and D/D porting Using NAND flash, zImage System init (bootloader) Image copy zImage decompressing linux kernel start linux kernel initialize DSC Process creation & initialization Preview state

Applied methods Normal bootup –bootloader OneNAND booting (more faster than Nand flash, 2 times) –Kernel / device driver use Preset LJP (Loop Per Jiffies) module init optimization use non-compressed kernel image size optimization ( kernel, library ) remove kernel message –File system –application optimization Suspend/resume

Not using u-boot except development period Boot loader – –initializes a system – –loads the Kernel image into RAM Minimal initialization – –Memory, clock Boot device – –NAND Flash – –OneNAND Flash When power on, xloader (1KB bootloader of OneNAND flash) is executed automatically hardly influence to bootup time More fast than nand flash (2 times) Boot loader

Flash Partition Usage (OneNAND flash) bootloader paramters Linux Kernel Image CRAMFS (Code & Library files) ‘boot’ partition xloader Robust FS (System Config Files & User Data Files) 64MB OneNAND 0 128K 256K 2MB 20MB ‘param’ partition ‘kernel’ partition ‘root’ partition ‘Robust FS’ partition Reserved Area

Kernel & D/D Using uncompressed Image –Save decompressing time Preset loops_per_jiffy –Find out loops_per_jiffy values, and hard coding Disable Console Output –Just add ‘quiet’ option to command line when compile Remove root file system check routine Concurrent driver init –DSC Motor has long initialization time –Modification zoom motor init code More than 1sec Motor init can be parallelized –Initialize at start of the bootloader Remove the static device driver –It makes smaller kernel –Save the module init time at bootup –The modules which is not need at bootup time can be loaded after bootup.

Saving memory allocation time for Image processing – –Using boot-time allocation methods – –Kernel doesn’t know about area – –Can save mem alloc time – –Can using the big area DMA memory Max : 12MB contiguous memory required (capture mode)

Issues of Root File System – –Save copy time at bootloader – –Save decompressing time when kernel initialized – –small size image Using busy box CRAMFS – –Read only nand file system – –Modifiable directory has to mount another R/W file system – –We use robust file system for OneNAND – –It include bad block management algorithms – –Partial uncompressed cramfs – –Save decompressing time – –Not tested at this time Root File system

Application init & loading Loading OSD data –When system bootup, load only need data DSC application –If preview mode, other process creation init & loading can delay Memory allocation, copy –Time spending –DSC processing much Image data Storage device Init & mount time –Sd/mmc card initialization –Initialization can be delayed Background processing –Card Device Init (device init, mount, etc) –storage information reading –Init DCF/Exif S/W module

Results Boot StageNAND flash Boot Loader Boot loader439 Kernel Image copy to RAM 730 Kernel Kernel basic setup 899 Application mount file system Application (preview) start 650 Total (ms) 2718 OneNAND flash

Results Booting OperationTime BootloaderInitialize CPU & RAM & Uboot50 Copy kernel image (from flash to ram)450 Kernel Initsetup_arch()50 trap_init()10 kmem_cache_init()10 mem_init()20 vfs_caches_init()20 page_cache_init()10 rest_init()do_basic_setup()190 prepare_namespace()20 console open20 Applicationready to use file system480 DSC process (preview mode)650 Total1980

Suspend / Resume suspend-to-ram During system suspend, the ram change to self-refresh mode issues –The cost of suspend/resume to Ram Power consumption –Self refresh mode of DRAM –power off all devices except but RAM –Boot flags registers If it locates at DSP, consume more power Using power management unit (PMU) –Other information will be stored at global variables in DRAM CPU register, stack, I/O register values

System suspend procedure CPU Register Save to RAM IO Register Contents save to RAM Set to self refresh mode of RAM Power off Button Push Save flag of fast boot to PMU Register Power off CPU & all devices except PMU & RAM

System resume procedure Reset vector DSC H/W init Disable Interrupt Check if suspended Clock, Memory Init Normal Kernel loading & jump Restore HW register values Execute DSC app Set interrupt for resume Restore variables & CPU register values DSC HW / App init & Check DSC Mode suspended Resume boot process Boot loader PMU power on Normal boot process Power on * PMU: Power Management Unit

Results of suspend/resume from reset to preview state –About 800 ms For power saving –It is possible to full shutdown when user does not operate during settled time

Excepted methods Kernel XIP –Executing code directly from flash –Reduce boot time and save cost, etc –Current platform has no proper devices (e.g Nor Flash) Parallelizing of services execution –applying techniques of parallelizing RC-scripts at system / user space start up –Effectiveness depends on the number of services –Embedded system such as DSC has not many services

Further works prelink (library execution optimization) Bootcache Suspend-to-disk Boot process analyzing with tools –Ex) Bootchart optimized block copy in OneNAND –OneNAND cached copy –synchronous mode

Conclusion There exist many methods for reducing the Linux Bootup time The Reduction methods are variant from the DSC H/W or scenario, So we have to choice the proper policy. Linux Bootup methods for DSC –normal boot –Suspend/resume Many reduction methods can be adopted but, –choice & evaluation is needed Embedded Linux can satisfy the requirements of DSC Bootup time

References Linux on a Digital Camera, Porting 2.4 Linux kernel to an existing digital camera, Alain Volmat, Ricoh Company Ltd. Methods to Improve Bootup Time in Linux Tim R. Bird, Sony Electronics IBM developer white paper, “Boot linux faster, parallelize Linux syste m services to improve boot speed”| gr-lnxw04BootFaster gr-lnxw04BootFaster