分享

UU-boot终于在ram中起来了,串口有输出了

 定慧图书馆 2011-12-26

分类: B原创2961人阅读评论(0)收藏举报

折腾了3个晚上,今天21:58 U-boot终于在我的开发板上跑起来了。

最开始用的1.1.4版本,自己修改了程序,编译了s3c2410的u-boot.bin,但是不管是在ram中还是在flash中都不能运行。后经高人指点,u-boot好像不支持nand flash启动,我的板子是samsung k9f120800b 64M nand flash,需要在u-boot的前4K字节编写将u-boot拷贝到ram中的程序,所以我想先从ram中把u-boot跑起来,这样也编译调试,毕竟通过usb写ram比写flash要快。

昨天在立宇泰电子下载了一个编译好的u-boot程序,可以写在nand flash中运行,他的是1.1.0版本的,所以今天编译了一个1.1.0版本u-boot,同样不能在ram和flash里启动。

发现1.1.0的Makefile和1.1.4版本有很大不同,并且在1.1.4源码树中把s3c2410作为arm920t cpu的一种SOC。

晚上转战eldk中包含的1.1.3版本u-boot,因为我觉得最新的版本一般都不好用。

发现include/configs/smdk2410.h中有这样一段:

/*
 * If we are developing, we might want to start armboot from ram
 * so we MUST NOT initialize critical regs like mem-timing ...
 */
#define CONFIG_INIT_CRITICAL          /* undef for developing */

于是注释掉了这个宏定义,不去做initialize critical regs,编译,在ram中运行,串口打出:

U-Boot 1.1.3 (Mar  9 2006 - 20:22:29)


U-Boot code: 33F80000 -> 33F965B0  BSS: -> 33F9A898

RAM Configuration:

Bank #0: 30000000 64 MB

Flash: 512 kB

*** Warning - bad CRC, using default environment


In:    serial

Out:   serial

Err:   serial

SMDK2410 # version


U-Boot 1.1.3 (Mar  9 2006 - 20:22:29)

SMDK2410 #

狂喜! ^_^

BTW:之前一定是在设置mem clock之类的地方出错了,导致u-boot没有输出。

 

u-boot 1.1.3 README中对skip low level init的描述:

- CONFIG_SKIP_LOWLEVEL_INIT
- CONFIG_SKIP_RELOCATE_UBOOT

  [ARM only] If these variables are defined, then
  certain low level initializations (like setting up
  the memory controller) are omitted and/or U-Boot does
  not relocate itself into RAM.
  Normally these variables MUST NOT be defined. The
  only exception is when U-Boot is loaded (to RAM) by
  some other boot loader or by a debugger which
  performs these intializations itself.

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多