Download presentation
Presentation is loading. Please wait.
1
EMBEDDED LINUX #2
2
CONTENTS Boot sequence BLOB start.S trampoline.S main.c
3
Boot sequence (1/3) Boot sequence of common linux POWER ON ROM BIOS
BOOT LOADER MBR BOOT SECTOR KERNEL LOAD & EXECUTION BOOT PROGRAM
4
Boot sequence (2/3) Boot sequence of embedded linux POWER ON BLOB
UNCOMPRESS zImage piggy.o KERNEL EXECUTION
5
Boot sequence (3/3) Flow 9 KERNEL START POWER ON 1 8
Jump to decompressed kernel and execution Jump to 0x (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
6
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
7
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() …
8
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
9
BLOB – start.S (4/16) _start() function (1/4) Memory location
0x1FFFFFFF main() _trampoline() _start() 0x 0x
10
BLOB – start.S (5/16) _start() function (2/4) Flow Set exception
vector table 1 2 Define constants Jump to reset() function 3
11
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 0x 0x
12
BLOB – start.S (7/16) _start() function (4/4) Memory map 0xFFFFFFFF
Sdram banks Registers Flash banks 0xE 0xC 0x 0x 0x
13
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?
14
BLOB – trampoline.S (9/16) Infinite loop Call main() function
If main() ever returns, call it again
15
BLOB – trampoline.S (10/16) _trampoline() function (1/2)
Memory location 0xDFFFFFFF 0x1FFFFFFF main() _trampoline() main() _trampoline() _start() 0x 0xC 0x
16
BLOB – trampoline.S (11/16) _trampoline() function (2/2) Flow
Call main() function 1 2 Return ?
17
BLOB – main.c (12/16) Core routine of BLOB Serial initialization
Timer initialization Load BLOB, kernel and ramdisk into sdram Processing user-input command
18
BLOB – main.c (13/16) main() function (1/4) Memory location 0xDFFFFFFF
0x1FFFFFFF main() _trampoline() main() _trampoline() _start() 0x 0xC 0x
19
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
20
BLOB – main.c (15/16) main() function (3/4)
Memory location after reload 0xDFFFFFFF 0xC0FFFFFF Ramdisk Kernel BLOB main() _trampoline() 0xC134FFFF 0xC10D0000 0xC 0xC 0xC
21
BLOB – main.c (16/16) main() function (4/4) User command
boot, clock, download flash, help, reblob reboot, reload, reset speed, status
22
EMBEDDED LINUX #2 E N D [참고문헌] Chul, Park – StrongARM(SA1110)을 이용한
board level porting 작업 - 임베디드 리눅스 강좌
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.