EMBEDDED LINUX #2.

Slides:



Advertisements
Similar presentations
Managing Cisco IOS Software. Overview The router boot sequence Locating IOS software The configuration register Recovering Passwords Backing Up the Cisco.
Advertisements

PC bootup Presented by: Rahul Garg (2003CS10183) Rajat Sahni (2003CS10184) Varun Gulshan(2003CS10191)
Net+OS Initialization Initialization Sequence Initialization Routine Roles ROM Image Compression/Decompression.
Genesis: from raw hardware to processes System booting sequence: how does a machine come into life.
CS4315A. Berrached:CMS:UHD1 Operating Systems and Computer Organization Chapter 4.
Computer System Overview
Startup. Major phases  BIOS  MBR program  Boot loader (Partition boot program )  OS’s kernel Loader  CPU always starts running at x’FFFF0’=1,048,560.
Chapter 6 Limited Direct Execution
68HC11 Polling and Interrupts
EET 450 Chapter 2 – How hardware and Software Work Together.
CS2422 Assembly Language & System Programming November 2, 2006.
Introduction to Kernel
System initialisation
Computer System Structures memory memory controller disk controller disk controller printer controller printer controller tape-drive controller tape-drive.
Software Development and Software Loading in Embedded Systems.
NET+OS 6.1 Training. BSP NET+OS 6.1 BSP Initialization Memory map New features Debugging Porting Issues.
Lecture 5. AT91 - Memory Map, Timers, and AIC -
Linux Booting Procedure
AT91RM9200 Boot strategies This training module describes the boot strategies on the AT91RM9200 including the internal Boot ROM and the U-Boot program.
Chap 5 Startup and Setup Andres, Wen-Yuan Liao Department of Computer Science and Engineering De Lin Institute of Technology
From UEFI Shell to Linux - UEFI Linux BootLoader Zhang Rui Software Engineer Sep 28 th 2011.
Page 1 D&C EBV Seminar June 2003 Motor Demo C868 Chevillot/Jansen June 2003 N e v e r s t o p t h i n k i n g. Infineon C868 Hands On Training CAPCOM6.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Laface Operating System Design Booting a PC to run a kernel from Low memory VGA display.
Porting Operating Systems Phan Duy Hùng (PhD) ES Lecturer – Hanoi FPT University.
SAM9260-EK WinCE DEMO AT91 SAM9 Product Group. Version 1.0 October 2006.
SAM9260-EK WinCE DEMO AT91 SAM9 Product Group. Version 1.0 October 2006.
We will focus on operating system concepts What does it do? How is it implemented? Apply to Windows, Linux, Unix, Solaris, Mac OS X. Will discuss differences.
1.4 Hardware Review. CPU  Fetch-decode-execute cycle 1. Fetch 2. Bump PC 3. Decode 4. Determine operand addr (if necessary) 5. Fetch operand from memory.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose:  This course provides an overview of the Direct Memory.
Introduction to Routers
AT91 C-startup. 2 For reasons of modularity and portability most application code for an embedded application is written in C The application entry point.
Genesis: From Raw Hardware to Processes Andy Wang Operating Systems COP 4610 / CGS 5765.
Sem 2v2 Chapter 5 Router Startup and Setup. A router initializes by loading the bootstrap, the operating system, and a configuration file. If the router.
Lecture 5 Rootkits Hoglund/Butler (Chapters 1-3).
January 8, 2001 SPC Tutorial 1 Washington WASHINGTON UNIVERSITY IN ST LOUIS Agenda 9:00 SPC Hardware -- John DeHart 9:45 SPC Software -- John DeHart 10:30.
안양대학교 전기전자공학과 서 삼 준 Kernel Fusing (Boot Loader & tftp 활용 )
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,
Using Linux with ARM Tutorial #3.
1 Setup and Compile Linux Kernel Speaker: Yi-Ji Jheng Date:
U-boot 실행 Sequence 망고 100 보드로 놀아보자 -8
Introduction to Exceptions 1 Introduction to Exceptions ARM Advanced RISC Machines.
DATE S. S.. Sandstone The sandstone carries out the following tasks: 1. Set up target platform environment, 2. Load a bootable image into memory, 3. Relinquish.
Chapter 6 Limited Direct Execution Chien-Chung Shen CIS/UD
Chap. 4 ARM Boot Loader Internals. 2 S3C2500 ARM940T Core module ARM9TDMI CoreIC.
Overview A) Power on or reset B) 1st stage boot loader C) 2nd stage boot loader D) Operate system.
Introduction to Kernel
Introduction to Operating Systems
Chapter Objectives In this chapter, you will learn:
Timer and Interrupts.
Router Startup and Setup
Protection of System Resources
Improvement of startup time using Software Suspend - Project Update -
ARM Cortex-M3 RTLAB 박 유 진.
Software Design Team KANG Group 1.
Chapter 5: Switch Configuration
The blob bootloader Thomas Petazzoni Free Electrons
Key Terms By: Kelly, Jackson, & Merle
CSCI 315 Operating Systems Design
Introduction to Operating Systems
AT91RM9200 Boot strategies This training module describes the boot strategies on the AT91RM9200 including the internal Boot ROM and the U-Boot program.
More examples How many processes does this piece of code create?
Genesis: From Raw Hardware to Processes
Architectural Support for OS
Router Startup and Setup
Processes David Ferry CSCI 3500 – Operating Systems
Lecture9: Embedded Network Operating System: cisco IOS
Architectural Support for OS
Lecture 10 review Booting sequence in Brief
Lecture9: Embedded Network Operating System: cisco IOS
Presentation transcript:

EMBEDDED LINUX #2

CONTENTS Boot sequence BLOB start.S trampoline.S main.c

Boot sequence (1/3) Boot sequence of common linux POWER ON ROM BIOS BOOT LOADER MBR BOOT SECTOR KERNEL LOAD & EXECUTION BOOT PROGRAM

Boot sequence (2/3) Boot sequence of embedded linux POWER ON BLOB UNCOMPRESS zImage piggy.o KERNEL EXECUTION

Boot sequence (3/3) Flow 9 KERNEL START POWER ON 1 8 Jump to decompressed kernel and execution Jump to 0x00000000 (flash memory area) 2 Decompress kernel image (piggy.o) 7 3 Execution Copy zImage to sdram area 6 ※ BLOB (boot loader) 4 5 Conditional jump A Command mode

BLOB (1/16) Functions Hardware initialization Kernel booting Download host sides kernel or ramdisk image into sdram Write downloaded kernel or ramdisk image into flash memory

BLOB (2/16) Flow start.S main.c -> main() Auto boot Manual boot Hardware initialization Serial, timer initialization Load kernel and ramdisk to sdram main.c -> main() Wait for 10 seconds Wait for key press Key pressed within 10 seconds Auto boot Manual boot Run command Get command() BootKernel() BootKernel() SetClock() Download() …

BLOB – start.S (3/16) Hardware initialization Set exception vector table Switch CPU to correct speed Setup memory LED initialization Memory test Relocate the second stage loader Setup stack pointer

BLOB – start.S (4/16) _start() function (1/4) Memory location 0x1FFFFFFF main() _trampoline() _start() 0x00000400 0x00000000

BLOB – start.S (5/16) _start() function (2/4) Flow Set exception vector table 1 2 Define constants Jump to reset() function 3

BLOB – start.S (6/16) _start() function (3/4) Set exception vector table _start: b reset b undefined_instruction b software_interrupt b prefetch_abort b data_abort b not_used b irq b fiq Exception vector table 0x00000004 0x00000000

BLOB – start.S (7/16) _start() function (4/4) Memory map 0xFFFFFFFF Sdram banks Registers Flash banks 0xE0000000 0xC0000000 0x20000000 0x80000000 0x00000000

BLOB – start.S (8/16) reset() function Flow Jump to the Second stage loader (_trampoline()) 8 Disable all interrupts 1 Switch CPU to correct speed 2 7 Setup stack pointer Relocate the second stage loader Setup memory 3 6 no yes LED initialization 4 5 A Wake-up Sleep?

BLOB – trampoline.S (9/16) Infinite loop Call main() function If main() ever returns, call it again

BLOB – trampoline.S (10/16) _trampoline() function (1/2) Memory location 0xDFFFFFFF 0x1FFFFFFF main() _trampoline() main() _trampoline() _start() 0x00000400 0xC0000400 0x00000000

BLOB – trampoline.S (11/16) _trampoline() function (2/2) Flow Call main() function 1 2 Return ?

BLOB – main.c (12/16) Core routine of BLOB Serial initialization Timer initialization Load BLOB, kernel and ramdisk into sdram Processing user-input command

BLOB – main.c (13/16) main() function (1/4) Memory location 0xDFFFFFFF 0x1FFFFFFF main() _trampoline() main() _trampoline() _start() 0x00000400 0xC0000400 0x00000000

BLOB – main.c (14/16) main() function (2/4) Flow Serial initialization 7 Call boot_linux() function 8 Wait for user command Timer initialization 2 9 Processing user command yes conditional return no Usable memory check 3 6 Key pressed within 10 seconds? Reload BLOB, kernel and ramdisk 4 5 Wait for key press 10sec

BLOB – main.c (15/16) main() function (3/4) Memory location after reload 0xDFFFFFFF 0xC0FFFFFF Ramdisk Kernel BLOB main() _trampoline() 0xC134FFFF 0xC10D0000 0xC1010000 0xC1000000 0xC0000400

BLOB – main.c (16/16) main() function (4/4) User command boot, clock, download flash, help, reblob reboot, reload, reset speed, status

EMBEDDED LINUX #2 E N D [참고문헌] Chul, Park – StrongARM(SA1110)을 이용한 board level porting 작업 http://www.lart.tudelft.nl/lartware/blob http://www.linuxdeveloper.co.kr - 임베디드 리눅스 강좌