天嵌 ARM开发社区

 找回密码
 注册
查看: 3138|回复: 6

关于uboot启动选择

[复制链接]
yangliu8623 发表于 2013-4-27 15:38:23 | 显示全部楼层 |阅读模式
今天在熟悉U-BOOT,对于启动时选择SD卡,nand启动,这个是在什么时候判断的,AM335x系列启动有3个阶段,第一阶段固化在CPU的rom中,第二阶段是SPL,第三阶段是uboot,通过U-boot已经基本明白第二阶段到第三阶段,但是如果我刚上电,这个时候应该按手册是说MPU在复位信号的上升沿阶段采集LCD[15:0] 的电平状态,也就是说采集启动方式,这个时候应该还没有加载uboot的吧,难道是在固化的rom中判断,还有一个疑问SPL是在SRAM中运行,第一阶段和第二阶段是如何跳转的,或者说SPL是如何加载到SRAM中的。
亚瑟王 发表于 2013-4-27 15:53:24 | 显示全部楼层
亲,在SPL中判断的。
TQ-ZQL 发表于 2013-4-27 16:00:42 | 显示全部楼层
固化是rom中的
 楼主| yangliu8623 发表于 2013-4-27 16:05:30 | 显示全部楼层
那SPL是如何加载被加载的呢,以前弄6410的时候是说把uboot烧到nand中,然后cpu上电会自动将nand的前4k的代码加载到cpu的srom中,那这个AM335x它又是如何加处理的呢,比如说我现在nand中没有烧写,而要从SD卡启动,这个是怎么实现的啊
 楼主| yangliu8623 发表于 2013-4-27 16:50:02 | 显示全部楼层
NAND flashing tool used to flash SPL and U-boot. SPL should be flashed to first four blocks as in AM335x, RBL checks for SPL at 1st 4 Blocks. If the 1st block fails, RBL checks in 2nd blocks and so on till 4th Block. To support this feature, SPL needs to be flashed to 1st 4 blocks. So the offset for flashing SPL are 0x0, 0x20000, 0x40000 & 0x60000. For U-Boot flashing offset to 0x80000, on the 4th block. Flash layout of NAND is shown
 楼主| yangliu8623 发表于 2013-4-27 17:22:15 | 显示全部楼层
        boot_device = omap_boot_device();
#ifdef CONFIG_BOOT_DEVICE
        //uboot_device = boot_device; //hxs add
        *p_data = boot_device;  // hxs add
#endif /*CONFIG_BOOT_DEVICE*/
               
        printd("boot device - %d\n", boot_device);
       
        switch (boot_device) {
#ifdef CONFIG_SPL_MMC_SUPPORT  //SD鍗″惎鍔?
        case BOOT_DEVICE_MMC1:
        case BOOT_DEVICE_MMC2:
                printf("boot from SD card... \n");
                spl_mmc_load_image();
                break;
#endif
#ifdef CONFIG_SPL_NAND_SUPPORT  //NAND 鍚?姩
        case BOOT_DEVICE_NAND:
                printf("boot from NAND... \n");
                spl_nand_load_image();
                break;
#endif
为什么 omap_boot_device返回只有一个值呢,
u32 omap_boot_device(void)
{
        printd("boot_device %d\n", ti81xx_boot_device);
        return ti81xx_boot_device;
}
TQ-lkp 发表于 2013-4-28 09:03:04 | 显示全部楼层
请使用回复功能来追问,这个我已经讲了N遍了,否则别人无法看到你追问的内容,你的帖子就沉下去了!!!!!!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号 )

GMT+8, 2024-4-25 00:58 , Processed in 1.062500 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表