SlideShare une entreprise Scribd logo
1  sur  59
The bootstrap procedure of u-boot. Take NDS32 architecture as an example. Macpaul Lin macpaul <at> gmail.com 2012/Jan/10
Outline ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Introduction ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Introduction ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Introduction ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],CPU (SoC) DRAM FLASH ROM
How to pack a boot loader? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],.TEXT .rodata .got .data .u_boot_cmd .bss 0x00000000, _start
How to pack a boot loader? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],.TEXT .rodata .got .data .u_boot_cmd .bss CONFIG_SYS_TEXT_BASE, _start FLASH/ROM DRAM AHB Controller Reserved SMC Controller DMA Controller Reserved ... 0x00000000
How to pack a boot loader? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],.TEXT _TEXT_BASE IRQ_STACK_START_IN ... 0x0000 0000 ... 0xdec0 ad0b ... ...
Overview – The bootstrap procedure Reset CPU and Hardware Setup SP for  Early Board Setup Environment (ASM->C) Early Board Setup board_init_f() Relocation Setup SP for  Common Board Setup Setup GD and JUMP to Final Board Setup Common Board Setup board_init_r() Jump into Main loop Low Level Initialization Setup Memory Memory REMAP Setup Memory Controller or on-chip SRAM
Overview – The bootstrap procedure ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Overview – The bootstrap procedure Setup SP for  Early Board Setup Environment (ASM->C) Setup SP for  Common Board Setup Setup GD and JUMP to Final Board Setup Reset CPU and Hardware Setup Vector Early Board Setup board_init_f() Early Devices Setup Calculate Addresses (SP, Dest, GD) for Relocation General Relocation Copy Binary to RAM Fix Relocation Fix GOT Clear BSS Common Board Setup board_init_r() Setup Mem for dlmalloc() Setup Board Data Setup Board FLASH Load Default Environments Setup Environment env_relocate(); Jump into Main loop Setup SoC and Board Specific Devices board_init() Low Level Initialization Turnoff Watchdog Setup Memory Memory REMAP Setup Memory Controller or on-chip SRAM
Overview – The bootstrap procedure cpu/n1213/start.S Setup Vector cpu/n1213/start.S Setup SP for  Early Board Setup Environment (ASM->C) lib/board.c board_init_f() Early Devices Setup Calculate Addresses (SP, Dest, GD) for Relocation cpu/n1213/start.S Copy Binary to RAM Fix Relocation Fix GOT Clear BSS cpu/n1213/start.S Setup SP for  Common Board Setup cpu/n1213/start.S Setup GD & Final Setup lib/board.c board_init_r() Setup Mem for dlmalloc() Setup Board Data Setup Board FLASH Load Default Environments Setup Environment env_relocate(); Jump into Main loop Setup SoC and Board Specific Devices board_init() cpu/n1213/ag101/low_levelinit.S cpu/n1213/ag101/watchdog.S Turnoff Watchdog Setup Memory Memory REMAP Setup Memory Controller or on-chip SRAM
Binary relocation and  memory remap. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Binary relocation and  memory remap. ,[object Object],FLASH/ROM U-boot DRAM ... 0x00000000 0x10000000 FLASH/ROM DRAM ... U-boot U-boot copy Relocation for REMAP REMAP … DRAM FLASH/ROM ... U-boot U-boot General Relocation U-boot runs in DRAM with adjusted linking address. DRAM FLASH/ROM ... U-boot U-boot U-boot relo U-boot runs in DRAM with the origin linking address.
Binary relocation and  memory remap. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Memory relocation and remap. ,[object Object],FLASH/ROM U-boot DRAM ... 0x00000000 0x10000000 FLASH/ROM DRAM ... U-boot U-boot $PC FLASH/ROM DRAM ... U-boot U-boot copy DRAM FLASH/ROM ... U-boot U-boot $PC+4 The Instruction affects REMAP REMAP, Change the Base Address U-boot runs in DRAM with the origin linking address. Relocation for REMAP remap
Binary relocation and  memory remap. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Binary relocation and  memory remap. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Binary relocation and  memory remap. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Binary relocation and  memory remap. ,[object Object],0x00000000 0x10000000 Pre-loader will copy u-boot to DRAM. lowlevel_init without remap copy lowlevel_init with remap Without lowlevel_init U-boot will copy itself to DRAM. FLASH/ROM U-boot DRAM ... FLASH/ROM DRAM ... U-boot U-boot relo DRAM FLASH/ROM ... U-boot U-boot relo U-boot copy DRAM FLASH/ROM ... U-boot U-boot relo U-boot pre-loader
Vector setup. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Vector setup. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Low level initialization ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Low Level Initialization Turnoff Watchdog Setup Memory Memory REMAP Setup Memory Controller or on-chip SRAM
Low level initialization ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Low level initialization ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Low level initialization ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Low level initialization ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Low level initialization ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Low level initialization ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Low level initialization ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Low level initialization ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Stack setup and jump into C functions. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Setup SP for  Early Board Setup Environment (ASM->C)
Stack setup and jump into C functions. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Early board and peripherals initialization. ,[object Object],[object Object],[object Object],[object Object],Early Board Setup board_init_f() Early Devices Setup Calculate Addresses (SP, Dest, GD) for Relocation Setup SP for  Common Board Setup
Early board and peripherals initialization. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Early board and peripherals initialization. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Early board and peripherals initialization. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Early board and peripherals initialization. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Early board and peripherals initialization. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Early board and peripherals initialization. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Early board and peripherals initialization. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
General Relocation. ,[object Object],[object Object],[object Object],Relocation Copy Binary to RAM Fix Relocation Fix GOT Clear BSS
General Relocation. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
General Relocation. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
General Relocation. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
General Relocation. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
General Relocation. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],.TEXT .rodata .got .data .u_boot_cmd .bss 0x00000000 .TEXT .rodata .got .data .u_boot_cmd .bss 0x10000000 0x00000000 0x00000000 0x00021cb8 0x00000000 0x00008a74 0x001023a4 .got in FLASH 0x00000000 0x00000000 0x10021cb8 0x10000000 0x10008a74 0x101023a4 .got in RAM
General Relocation. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Relocation. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Common board and other peripherals initialization. ,[object Object],[object Object],[object Object],[object Object],[object Object],Common Board Setup board_init_r() Setup mem for dlmalloc() Setup Board Data Setup Board FLASH Load Default Environments Setup Environment env_relocate(); Jump into Main loop Setup SoC and Board Specific Devices board_init()
Common board and other peripherals initialization. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Common board and other peripherals initialization. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Common board and other peripherals initialization. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Common board and other peripherals initialization. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Common board and other peripherals initialization. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Common board and other peripherals initialization. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Summary ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Appendix: An Example of Vector Implements ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Appendix: reset_cpu ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Contenu connexe

Tendances

Linux Porting to a Custom Board
Linux Porting to a Custom BoardLinux Porting to a Custom Board
Linux Porting to a Custom Board
Patrick Bellasi
 

Tendances (20)

U Boot or Universal Bootloader
U Boot or Universal BootloaderU Boot or Universal Bootloader
U Boot or Universal Bootloader
 
U-Boot - An universal bootloader
U-Boot - An universal bootloader U-Boot - An universal bootloader
U-Boot - An universal bootloader
 
Bootloaders (U-Boot)
Bootloaders (U-Boot) Bootloaders (U-Boot)
Bootloaders (U-Boot)
 
USB Drivers
USB DriversUSB Drivers
USB Drivers
 
U-Boot Porting on New Hardware
U-Boot Porting on New HardwareU-Boot Porting on New Hardware
U-Boot Porting on New Hardware
 
Introduction to Modern U-Boot
Introduction to Modern U-BootIntroduction to Modern U-Boot
Introduction to Modern U-Boot
 
Linux Porting to a Custom Board
Linux Porting to a Custom BoardLinux Porting to a Custom Board
Linux Porting to a Custom Board
 
I2c drivers
I2c driversI2c drivers
I2c drivers
 
A practical guide to buildroot
A practical guide to buildrootA practical guide to buildroot
A practical guide to buildroot
 
U boot-boot-flow
U boot-boot-flowU boot-boot-flow
U boot-boot-flow
 
Linux Kernel MMC Storage driver Overview
Linux Kernel MMC Storage driver OverviewLinux Kernel MMC Storage driver Overview
Linux Kernel MMC Storage driver Overview
 
BusyBox for Embedded Linux
BusyBox for Embedded LinuxBusyBox for Embedded Linux
BusyBox for Embedded Linux
 
Booting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot imagesBooting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot images
 
linux device driver
linux device driverlinux device driver
linux device driver
 
BeagleBone Black Bootloaders
BeagleBone Black BootloadersBeagleBone Black Bootloaders
BeagleBone Black Bootloaders
 
Android crash debugging
Android crash debuggingAndroid crash debugging
Android crash debugging
 
Introduction Linux Device Drivers
Introduction Linux Device DriversIntroduction Linux Device Drivers
Introduction Linux Device Drivers
 
Platform Drivers
Platform DriversPlatform Drivers
Platform Drivers
 
Spi drivers
Spi driversSpi drivers
Spi drivers
 
SPI Drivers
SPI DriversSPI Drivers
SPI Drivers
 

En vedette

USB Specification 2.0 - Chapter 9 - Device Framework
USB Specification 2.0 - Chapter 9 - Device FrameworkUSB Specification 2.0 - Chapter 9 - Device Framework
USB Specification 2.0 - Chapter 9 - Device Framework
Macpaul Lin
 
Why sending patches back is so important
Why sending patches back is so importantWhy sending patches back is so important
Why sending patches back is so important
Macpaul Lin
 
U boot source clean up project how-to
U boot source clean up project how-toU boot source clean up project how-to
U boot source clean up project how-to
Macpaul Lin
 
OpenWRT, A value-add base solution for your product. (2nd, Macpual)
OpenWRT, A value-add base solution for your product. (2nd, Macpual)OpenWRT, A value-add base solution for your product. (2nd, Macpual)
OpenWRT, A value-add base solution for your product. (2nd, Macpual)
Macpaul Lin
 
從u-boot 移植 NDS32 談 嵌入式系統開放原始碼開發的 一些經驗
從u-boot 移植 NDS32 談 嵌入式系統開放原始碼開發的 一些經驗從u-boot 移植 NDS32 談 嵌入式系統開放原始碼開發的 一些經驗
從u-boot 移植 NDS32 談 嵌入式系統開放原始碼開發的 一些經驗
Macpaul Lin
 
政黨票的故事
政黨票的故事政黨票的故事
政黨票的故事
Macpaul Lin
 
Porting a new architecture (NDS32) to open wrt project
Porting a new architecture (NDS32) to open wrt projectPorting a new architecture (NDS32) to open wrt project
Porting a new architecture (NDS32) to open wrt project
Macpaul Lin
 
Pull up & pull-down resistors
Pull up & pull-down resistorsPull up & pull-down resistors
Pull up & pull-down resistors
prathik
 
U Boot Presentation Final
U Boot Presentation FinalU Boot Presentation Final
U Boot Presentation Final
ktrefz
 

En vedette (20)

USB Specification 2.0 - Chapter 9 - Device Framework
USB Specification 2.0 - Chapter 9 - Device FrameworkUSB Specification 2.0 - Chapter 9 - Device Framework
USB Specification 2.0 - Chapter 9 - Device Framework
 
Why sending patches back is so important
Why sending patches back is so importantWhy sending patches back is so important
Why sending patches back is so important
 
U boot source clean up project how-to
U boot source clean up project how-toU boot source clean up project how-to
U boot source clean up project how-to
 
U boot 程式碼打掃計畫
U boot 程式碼打掃計畫U boot 程式碼打掃計畫
U boot 程式碼打掃計畫
 
OpenWRT, A value-add base solution for your product. (2nd, Macpual)
OpenWRT, A value-add base solution for your product. (2nd, Macpual)OpenWRT, A value-add base solution for your product. (2nd, Macpual)
OpenWRT, A value-add base solution for your product. (2nd, Macpual)
 
How to build a community in a company blue&macpaul coscup2015
How to build a community in a company blue&macpaul coscup2015How to build a community in a company blue&macpaul coscup2015
How to build a community in a company blue&macpaul coscup2015
 
從u-boot 移植 NDS32 談 嵌入式系統開放原始碼開發的 一些經驗
從u-boot 移植 NDS32 談 嵌入式系統開放原始碼開發的 一些經驗從u-boot 移植 NDS32 談 嵌入式系統開放原始碼開發的 一些經驗
從u-boot 移植 NDS32 談 嵌入式系統開放原始碼開發的 一些經驗
 
Board Bringup
Board BringupBoard Bringup
Board Bringup
 
Building Embedded Linux Full Tutorial for ARM
Building Embedded Linux Full Tutorial for ARMBuilding Embedded Linux Full Tutorial for ARM
Building Embedded Linux Full Tutorial for ARM
 
政黨票的故事
政黨票的故事政黨票的故事
政黨票的故事
 
Porting linux to a new architecture
Porting linux to a new architecturePorting linux to a new architecture
Porting linux to a new architecture
 
Porting a new architecture (NDS32) to open wrt project
Porting a new architecture (NDS32) to open wrt projectPorting a new architecture (NDS32) to open wrt project
Porting a new architecture (NDS32) to open wrt project
 
Linux Porting
Linux PortingLinux Porting
Linux Porting
 
Module 4 Embedded Linux
Module 4 Embedded LinuxModule 4 Embedded Linux
Module 4 Embedded Linux
 
Qt5 embedded
Qt5 embeddedQt5 embedded
Qt5 embedded
 
Pull up & pull-down resistors
Pull up & pull-down resistorsPull up & pull-down resistors
Pull up & pull-down resistors
 
Linux-without-a-bootloader
Linux-without-a-bootloaderLinux-without-a-bootloader
Linux-without-a-bootloader
 
U Boot Presentation Final
U Boot Presentation FinalU Boot Presentation Final
U Boot Presentation Final
 
Evoluzione dei Sistemi Embedded: Verso architetture multi-core
Evoluzione dei Sistemi Embedded: Verso architetture multi-coreEvoluzione dei Sistemi Embedded: Verso architetture multi-core
Evoluzione dei Sistemi Embedded: Verso architetture multi-core
 
Constrained Power Management
Constrained Power ManagementConstrained Power Management
Constrained Power Management
 

Similaire à Bootstrap process of u boot (NDS32 RISC CPU)

Bootstrap process boot loader
Bootstrap process boot loaderBootstrap process boot loader
Bootstrap process boot loader
idrajeev
 
망고100 보드로 놀아보자 7
망고100 보드로 놀아보자 7망고100 보드로 놀아보자 7
망고100 보드로 놀아보자 7
종인 전
 
Introduction to-cisco-routers
Introduction to-cisco-routersIntroduction to-cisco-routers
Introduction to-cisco-routers
97148881557
 

Similaire à Bootstrap process of u boot (NDS32 RISC CPU) (20)

Bootstrap process boot loader
Bootstrap process boot loaderBootstrap process boot loader
Bootstrap process boot loader
 
建構嵌入式Linux系統於SD Card
建構嵌入式Linux系統於SD Card建構嵌入式Linux系統於SD Card
建構嵌入式Linux系統於SD Card
 
Armboot process zeelogic
Armboot process zeelogicArmboot process zeelogic
Armboot process zeelogic
 
Roll your own toy unix clone os
Roll your own toy unix clone osRoll your own toy unix clone os
Roll your own toy unix clone os
 
BOOTABLE OPERATING SYSTEM
BOOTABLE OPERATING SYSTEMBOOTABLE OPERATING SYSTEM
BOOTABLE OPERATING SYSTEM
 
Study on Android Emulator
Study on Android EmulatorStudy on Android Emulator
Study on Android Emulator
 
C programming session10
C programming  session10C programming  session10
C programming session10
 
Embedded C programming session10
Embedded C programming  session10Embedded C programming  session10
Embedded C programming session10
 
Linux: the first second
Linux: the first secondLinux: the first second
Linux: the first second
 
System Booting Process overview
System Booting Process overviewSystem Booting Process overview
System Booting Process overview
 
How to build and load linux to embedded system
How to build and load linux to embedded systemHow to build and load linux to embedded system
How to build and load linux to embedded system
 
Когда предрелизный не только софт
Когда предрелизный не только софтКогда предрелизный не только софт
Когда предрелизный не только софт
 
CCNA complete.ppt
CCNA complete.pptCCNA complete.ppt
CCNA complete.ppt
 
C C N A Day2
C C N A  Day2C C N A  Day2
C C N A Day2
 
BeagleBoard-xM Booting Process
BeagleBoard-xM Booting ProcessBeagleBoard-xM Booting Process
BeagleBoard-xM Booting Process
 
망고100 보드로 놀아보자 7
망고100 보드로 놀아보자 7망고100 보드로 놀아보자 7
망고100 보드로 놀아보자 7
 
Cisco IOS (internetworking operating system)
Cisco IOS (internetworking operating system)Cisco IOS (internetworking operating system)
Cisco IOS (internetworking operating system)
 
Vmlinux: anatomy of bzimage and how x86 64 processor is booted
Vmlinux: anatomy of bzimage and how x86 64 processor is bootedVmlinux: anatomy of bzimage and how x86 64 processor is booted
Vmlinux: anatomy of bzimage and how x86 64 processor is booted
 
Introduction to-cisco-routers
Introduction to-cisco-routersIntroduction to-cisco-routers
Introduction to-cisco-routers
 
CCNA CheatSheet
CCNA CheatSheetCCNA CheatSheet
CCNA CheatSheet
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 

Bootstrap process of u boot (NDS32 RISC CPU)

  • 1. The bootstrap procedure of u-boot. Take NDS32 architecture as an example. Macpaul Lin macpaul <at> gmail.com 2012/Jan/10
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9. Overview – The bootstrap procedure Reset CPU and Hardware Setup SP for Early Board Setup Environment (ASM->C) Early Board Setup board_init_f() Relocation Setup SP for Common Board Setup Setup GD and JUMP to Final Board Setup Common Board Setup board_init_r() Jump into Main loop Low Level Initialization Setup Memory Memory REMAP Setup Memory Controller or on-chip SRAM
  • 10.
  • 11. Overview – The bootstrap procedure Setup SP for Early Board Setup Environment (ASM->C) Setup SP for Common Board Setup Setup GD and JUMP to Final Board Setup Reset CPU and Hardware Setup Vector Early Board Setup board_init_f() Early Devices Setup Calculate Addresses (SP, Dest, GD) for Relocation General Relocation Copy Binary to RAM Fix Relocation Fix GOT Clear BSS Common Board Setup board_init_r() Setup Mem for dlmalloc() Setup Board Data Setup Board FLASH Load Default Environments Setup Environment env_relocate(); Jump into Main loop Setup SoC and Board Specific Devices board_init() Low Level Initialization Turnoff Watchdog Setup Memory Memory REMAP Setup Memory Controller or on-chip SRAM
  • 12. Overview – The bootstrap procedure cpu/n1213/start.S Setup Vector cpu/n1213/start.S Setup SP for Early Board Setup Environment (ASM->C) lib/board.c board_init_f() Early Devices Setup Calculate Addresses (SP, Dest, GD) for Relocation cpu/n1213/start.S Copy Binary to RAM Fix Relocation Fix GOT Clear BSS cpu/n1213/start.S Setup SP for Common Board Setup cpu/n1213/start.S Setup GD & Final Setup lib/board.c board_init_r() Setup Mem for dlmalloc() Setup Board Data Setup Board FLASH Load Default Environments Setup Environment env_relocate(); Jump into Main loop Setup SoC and Board Specific Devices board_init() cpu/n1213/ag101/low_levelinit.S cpu/n1213/ag101/watchdog.S Turnoff Watchdog Setup Memory Memory REMAP Setup Memory Controller or on-chip SRAM
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
  • 59.