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

折腾了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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值