嵌入式软件开发培训笔记——boot原理与u-boot 基于Cortex_A8核的S5PC100芯片

本文详细介绍了Bootloader的原理,包括BL0和BL1的角色,以及在S5PC100芯片上的启动流程。此外,讨论了u-boot的配置过程,包括创建软链接、编译选项和驱动添加方法。最后,分析了u-boot的启动流程,涉及arm核初始化、设备初始化和命令机制。
摘要由CSDN通过智能技术生成
一、boot原理
1、解决系统启动 (参考s5pc100手册 --->  2.1节 irom code)

    The boot loader is divided into the BL0(1st boot loader) and the BL1(2nd boot loader).
    • BL0 which is placed in iROM loads BL1 from the booting device to iRAM. The booting device is determined by   the OM and NFMOD pins. In addition, according to the secure boot key values, BL0 checks the integrity of  BL1. 
    • BL1 has to initialize the DRAM controller. After initializing the DRAM controller, it loads the OS image from the   booting device to DRAM. And, according to the secure boot key values, BL1 checks the integrity of the OS  image.
        1)、由BL0配置判断以哪种方式启动,一般使用拨码头开关控制
              The booting device can one of the followings,
            • NAND Flash
            • OneNAND
            • MMC or SD Memory including MoviNAND and iNAND
            • USB
        2)、 Full booting sequence in BL0 is as follows,    BL0中配置好的booting 引导顺序
        a. Initialize the PLL & Clock setting with fixed value    初始化PLL与Clock为固定值
        b. Initialize the stack and heap region.    初始化堆与栈寄存器
        c. Initialize the Instruction Cache controller.    初始化指令高速缓存寄存器
        d. Load BL1 from the booting device to iRAM.*    装载BL1到IRAM,上图上步骤2
        e. If secure booting is enabled, execute integrity check.    若安全引导启用,执行完整性检查
        f. If integrity check passes, then jump to 0x34010. (First 4words are reserved.)    若通过完整性检查,跳转到0x34010,前四个字被保留
        g. If integrity check fails, then it stops.    若 完整性检查失败,那么将停止启动
        * NOTE. In case of SD/MMC, iROM code loads 9KB at 0x34000 from the end of the booting device. < 在SD/MMC情况下,IROM代码只加载9K(从 SD/MMC中结尾处 ),9K代码加载至IRAM的0x34000>
        * NOTE. In case of OneNAND and NAND, iROM code loads 16KB at 0x34000 from the beginning (Block 0) of the  booting device. < OneNAND 和 NAND情况下,IROM代码只加载16K(从 NAND/ONENAND中开始处 ,16K代码加载至IRAM的0x34000.>
        一般定的boot代码远大于16K,那么可以将其放在DRAM中,此时只需要在该16K代码中注明这些信息。也就是常说到的自搬移操作。
        * NOTE. Bad block information is in the 6th byte of the spare area in case of 512 byte page NAND devices. And  the other NAND devices have bad block information in the first byte of the spare area.<在1页为512字节的NAND设备上,坏块信息在备用区域中的第6个字节;其他NAND设备的坏块信息在备用区域中的第1个字节>

2 、map.lds    链接脚本
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
/*OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm")*/
OUTPUT_ARCH(arm)
ENTRY(_start)    //系统入口
SECTIONS
{
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值