以下wiki详细讲解了启动过程

http://omappedia.org/wiki/Bootloader_Project

http://omappedia.org/wiki/OMAP3_U-Boot_TODO

Bootloader Project

Contents

[hide]

  • 1 OMAP U-boot
  • 2 OMAP Boot Sequence
    • 2.1 First Stage Boot
    • 2.2 Second Stage Boot
  • 3 Bootloader Overview
    • 3.1 Accessing Uboot source
    • 3.2 Building Uboot
    • 3.3 U-boot config files
    • 3.4 Accessing X-loader source
    • 3.5 Building Xloader for GP
    • 3.6 X-loader config files
    • 3.7 Building Xloader for EMU
  • 4 Flashing
  • 5 Upstreaming U-boot

[edit]OMAP U-boot

Das U-Boot is the bootloader typically used on OMAP development platform.

X-Loader is a tiny first stage minimal bootloader which loads up u-boot as explained by this wiki.

Developer Reference: OMAP3 U-Boot TODO things for mainline U-boot Support.

[edit]OMAP Boot Sequence

The OMAP processor follows a 2 stage boot process. The first stage is loaded into the internal static RAM by the ROM code. Because the internal static RAM is very small (64k), the first stage loader is needed to initialize memory and enough of the peripheral devices to access and load the second stage loader into main memory. It is the job of the second stage loader to initialize the remaining hardware and prepare the system for kernel boot.(detail documentation available from TI, see the Initialization chapter of the Technical Documents/OMAP34xx on this page)

[edit]First Stage Boot

The internal ROM Code will attempt to boot from several different peripherals including but not limited to: Serial(UART3), SD Card(MMC1 and MMC2), Nand and USB. The order in which the peripherals are attempted is determine by a set of GPIO configuration pins referred to as SYS_BOOT. The default SYS_BOOT configuration for the Zoom2 appears to be: USB, Serial(UART3), SD Card(MM1), and NAND flash.

The documentation of SYS_BOOT can be found on TI website -- Technical Documents/OMAP34xx Multimedia Device.

The value can be read from physical address 0x480022f0, either using JTAG, or if you have linux running, use devmem2:

# devmem2 0x480022f0 b
/dev/mem opened.
Memory mapped at address 0x40020000.
Value at address 0x480022F0 (0x400202f0): 0x2F

Or use this tool: omap34xx-boot-order

Serial Boot

A simple ID is written out of the serial port. If the host responds correctly within a short window of time, the ROM will read from the serial port and transfer the data to the internal sram. Control is passed to the start of sram if no errors are detected. UART3 is the only uart for which the ROM will attempt to load from.

SD Card Boot

Assuming there was no answer from the host during serial boot, the ROM looks for an SD Card on the first MMC controller. If a card is found, the ROM then looks for the first FAT32 partition within the partition table. Once the partition is found, the root directory is scanned for a special signed file called "MLO"(x-load binary with a header containing the memory location to load the file and the size of the file). Assuming all is well with the file, it is transfered into the internal sram and control is passed to it. Both MMC1 and MMC2 can be used for booting.

Nand Boot

Assuming the SD Card boot was unable to complete successfully, the ROM attempts to load the first sector of Nand. If the sector is bad, corrupt, or blank, the ROM will try the next sector (up to 4) before exiting. Once a good sector is found, the ROM transfers the contents to sram and transfers control to it.

[edit]Second Stage Boot

The second stage of the boot is done by the x-loader installed from the first stage. There are different versions of the x-loader corresponding to each of the devices that can be loaded from. It is the job of the x-loader to transfer the 2nd stage loader into main memory. Usually you will use the x-loader that corresponds to the type of boot you are attempting - i.e. you would use the serial x-loader for a serial boot and the nand x-loader for a nand boot. However, you don't have to. For example, you could flash the serial x-loader into the nand. The rom will load from nand and transfer control to the x-loader which will wait for the 2nd stage to be downloaded from the serial port.

Serial Boot

The serial x-loader waits for the host to initiate a kermit connection to reliably transfer large files into main memory. Once the file transfer is completed successfully, control is transfered.

SD Card Boot

The SDCard x-loader looks for a FAT32 partition on the first MMC controller and scans the top level directory for a file named "u-boot.bin". It then transfers the file into main memory and transfers control to it.

NAND Boot

The nand x-loader expects u-boot to be loaded at the 5th sector (offset 0x00800000). It transfers the image from nand into main memory and transfers control to it.

[edit]Bootloader Overview

Bootloader project contains information regarding the building and flashing procedures for uboot and xloader. These two items are necessary to bring up the zoom2's environment.

Why two bootloaders? The first bootloader, x-loader, is a stripped down version of u-boot designed to run in the on-chip sram of the zoom2. It initializes the main off-chip memory of the system and other necessary device drivers, and then loads the larger bootloader for linux, u-boot. The following steps will build the bootloaders:

  • Ensure that "git" has been installed within the host system. Git is available for download at git-scm.com. For more details on installing and using git please see this wiki page.
  • Ensure that CodeSourcery ARM Compiler has been installed in the host system. Visit Support_Tools/Cross_Compilers for further information.

[edit]Accessing Uboot source

  • Clone Uboot
# mkdir bootloader
# cd bootloader
# git clone git://git.omapzoom.org/repo/u-boot.git

[edit]Building Uboot

# cd <path_to_u-boot>
# make distclean
# make CROSS_COMPILE=arm-none-linux-gnueabi- omap3430zoom2_config
# make CROSS_COMPILE=arm-none-linux-gnueabi-

Note: If you get "cmd_voltage.c:27: error: inline function 'voltage_info' cannot be declared weak" try an older GCC (CSL 2008q3-72 seems ok) Note: Step above is building for a Zoom2. To build for other boards use respective config from the below table.

U-boot config files

Board config file
4460SDP omap4430sdp_config
4430SDP omap4430sdp_config
3430SDP omap3430sdp_config
3630SDP omap3630sdp_config
3430LDP omap3430labrador_config
Zoom2 omap3430zoom2_config
Zoom3 omap3630zoom3_config
2430sdp omap2430sdp_config
2420h4 omap2420h4_config
  • u-boot.bin is located in <path_to_u-boot>

[edit]Accessing X-loader source

  • Clone X-loader master for OMAP3
# cd bootloader
# git clone  git://git.omapzoom.org/repo/x-loader.git
  • X-loader for OMAP44xx
# cd bootloader/x-load
# git checkout --track -b omap4_dev origin/omap4_dev
# git pull {to be on latest commit ID }

[edit]Building Xloader for GP

Warning: u-boot needs to be built before x-loader.

# cd <path_to_x-boot>
# make distclean
# make CROSS_COMPILE=arm-none-linux-gnueabi- omap3430zoom2_config
# make CROSS_COMPILE=arm-none-linux-gnueabi- ift
* Build x-loader for OMAP4460
# cd <path_to_x-boot>
# make sure you are on omap4_dev branch
# make distclean
# make CROSS_COMPILE=arm-none-linux-gnueabi- omap4460sdp_config
# make CROSS_COMPILE=arm-none-linux-gnueabi- ift

Note: Step above is building for Zoom2 and for Zoom1(LDP). For other boards use respective config file from below tables

X-loader config files

Board config file
4460SDP omap4460sdp_config
4430SDP omap4430sdp_config
3430SDP omap3430sdp_config
3630SDP omap3630sdp_config
3630SDP 1GB omap3630sdp_1G_config
3430LDP omap3430labrador_config
Zoom2 omap3430zoom2_config
Zoom3 omap3630zoom3_config
2430sdp omap2430sdp_config
2420h4 omap2420h4_config

To build X-loader to boot over a serial connection, use "omap3430labradordownload_config"

  • MLO is located in <path_to_x-loader>

[edit]Building Xloader for EMU

Warning: Build x-load.bin using correct config file for 4430/4460 .

Warning: Download mshield-dk lite .

  • create x-load.bin for OMAP44xx <same procedure for GP/EMU/HS>
  • For OMAP4430 ES2.0 EMU/HS
# cd mshield-dk-root-folder
# ./generate_MLO OMAP4430 ES2.0 x-load.bin
# MLO will be located in root mshield-dk folder
  • For OMAP4430 ES2.1 EMU/HS
# cd mshield-dk-root-folder
# ./generate_MLO OMAP4430 ES2.1 x-load.bin
# MLO will be located in root mshield-dk folder
  • For OMAP4430 ES2.2 EMU/HS
# cd mshield-dk-root-folder
# ./generate_MLO OMAP4430 ES2.2 x-load.bin
# MLO will be located in root mshield-dk folder
  • For OMAP4430 ES2.3 EMU/HS
# cd mshield-dk-root-folder
# ./generate_MLO OMAP4430 ES2.3 x-load.bin
# MLO will be located in root mshield-dk folder
  • For OMAP4460 ES1.0 EMU/HS
# cd mshield-dk-root-folder
# ./generate_MLO OMAP4460 ES1.0 x-load.bin
# MLO will be located in root mshield-dk folder

[edit]Flashing

Refer to Zoom Flashing to review flashing methods for Zoom1/Zoom2/Zoom3.

Refer to 3630SDP Flashing to review flashing methods for 3630SDP board.

Refer to eMMC Boot to review flashing and boot methods from eMMC device.

Refer to Uimage-flasher which is a combination of uImage+initramfs along with g_file_storage.ko. This solution lets the PandaBoard export its SD card over the USB.

[edit]Upstreaming U-boot

U-boot upstreaming is being carried out as a separate project. Please refer to the following link for more details.

U-boot Upstreaming Project

Categories: Android | Angstrom | Bootloader | Poky | Linux

TI OMAP Bootloader Project 关于启动过程相关推荐

  1. BootLoader与MCU启动过程

    STM32那点事(1)_STM32F40_41xx启动文件详解 STM32 官方为广大开发者提供一套统一开发固件,主要是屏蔽寄存器封装,提供初始化等功能,较少开发者负担.只需要调用相关模块封装,对相关 ...

  2. OMAP开发板的启动过程

    OMAP的启动过程 参考文档:http://www.omappedia.org/wiki/Bootloader_Project#u-boot_overview OMAP平台的启动初始化过程(bootl ...

  3. Bootloader启动过程

    1.作用 嵌入式系统的引导加载程序,系统上电后运行的第一段程序.在完成对系统的初始化任务后,它会将非易失性存储器(通常是FLASH)中的Linux内核拷贝到RAM中,然后跳转到内核的第一条指令处继续执 ...

  4. 简述arm linux内核启动流程,Linux内核启动过程和Bootloader(总述)

    1.Linux内核启动过程概述 一个嵌入式 Linux 系统从软件角度看可以分为四个部分:引导加载程序(Bootloader),Linux 内核,文件系统,应用程序.其中 Bootloader是系统启 ...

  5. Linux内核启动过程和Bootloader(总述)

    1.Linux内核启动过程概述     一个嵌入式 Linux 系统从软件角度看可以分为四个部分:引导加载程序(Bootloader),Linux 内核,文件系统,应用程序.其中 Bootloader ...

  6. BootLoader(U-Boot)启动过程记录

    BootLoader(U-Boot)启动过程记录 定义 Bootloader终极目的是引导内核,加载内核到内存然后跳转到内核的地方执行,在加载之前也会做一些硬件的初始化等等操作.启动模式分为两种:启动 ...

  7. linux系统需要占多大的内存,linux启动过程Bootloader、kernel

    256M可以推1080P屏幕 128M可以基本运行并安装 256M可以勉强开启特效 512M流畅运行特效 当然内存越大越好,特效与显卡也有关系 和windows相比,当然linux对内存的需求小 Bo ...

  8. Tiva C(TM4C)的bootloader和启动过程与stm32对比

    gossip: 最近在咸鱼捡了个123GXL的板子,板子没到就先装好了环境,然后看了看资料,前天板子到了,先点了个灯,然后把板子扔到一边又继续看资料去了emmm... 看资料的时候发现有些东西挺有意思 ...

  9. Linux开机启动过程(2):内核启动的第一步

    在内核安装代码的第一步 本文是在原文基础上经过本人的修改. 内核启动的第一步 在上一节中我们开始接触到内核启动代码,并且分析了初始化部分,最后我们停在了对main函数(main函数是第一个用C写的函数 ...

最新文章

  1. java宠物医院_java宠物医院管理系统
  2. python画树叶-Python_Turtle库画一只派大星
  3. bzoj 2705: [SDOI2012]Longge的问题——欧拉定理
  4. JS模式--状态模式(状态机)
  5. android自定义view生命周期,android基础之自定义view
  6. 如何在 Mac 上输入带重音符的字符?
  7. 《剑指offer》面试题6——重构二叉树——已知 前序遍历和中序遍历,求后序遍历(C++)
  8. 打架打出来的牛逼城市!
  9. 欧姆龙plc多轴伺服控制程序fb
  10. UG NX 12 使用快捷键调整视图方位
  11. 将bmp格式的图片反色
  12. SPSS分析数据学习笔记
  13. 定义一个鸭子的类java_2019-02-11——Java 鸭子模型
  14. 【板栗糖GIS】win11提示无法成功操作 因为文件包含病毒
  15. 2※、封装流(包装流派)、缓冲流【字节缓冲流、字符缓冲流】-->【字节缓冲流、字符缓冲流】 、字符集、转换流以及打印流
  16. windows 8 新登陆方式(图片密码、Pin码)
  17. Android Studio 介绍
  18. html做出来的网页参考,完整的网页创建手册(DHTML,HTML,CSS)参考手册CHM格式...
  19. ubuntu升级到8.10后Realplayer11不能播放的问题
  20. raw文件 linux,Linux下处理(包括raw,HDR)和管理照片软件介绍

热门文章

  1. python音乐属性信息处理
  2. STM32F40x 红外遥控器
  3. 【数据库原理与SQL Server应用】Part03——T-SQL语言
  4. 如何设计一个锂电池充电电路(TP4056)
  5. 为什么要做高新?高新技术企业和科技型企业的区别?
  6. 经典公式sum=sum+i求和函数
  7. 学校云计算机中心建设方案,智慧校园云数据中心建设方案.docx
  8. 短信系统WEB网页短信平台设计-移讯云短信系统
  9. 直播系统源码如何对直播平台进行搭建?
  10. python修改ip地址_用Python更改IP地址(转) | 学步园