热门关键字:  ubuntu  分区  函数  Fedora  linux系统进程

uboot移植记录之一

来源: 作者: 时间:2008-06-19 Tag: 点击:



#define CFG_PROMPT "ARMSYS2410 # " /* Monitor Command Prompt */
#define CFG_LOAD_ADDR 0x33000000 /* default load address */
#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */
#define PHYS_SDRAM_1 0x30000000 /* SDRAM Bank #1 */
#define PHYS_SDRAM_1_SIZE 0x04000000 /* 64 MB */

解决问题3:

#define CONFIG_AMD_LV400 1 /* uncomment this if you have a LV400 flash */
#if 0
#define CONFIG_AMD_LV800 1 /* uncomment this if you have a LV800 flash */
#endif
改为:
#define CONFIG_AMD_LV800 1 /* uncomment this if you have a LV800 flash */
#if 0
#define CONFIG_AMD_LV400 1 /* uncomment this if you have a LV400 flash */
#endif
注意如下两个地方:
#ifdef CONFIG_AMD_LV800
#define PHYS_FLASH_SIZE 0x00100000 /* 1MB */
这里解决了u-boot启动时的问题3即Nor Flash大小为512 kB ,是因为没有选择正确的Nor flash型号。
#define CFG_MAX_FLASH_SECT (19) /* max number of sectors on one chip */
#define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x0F0000) /* addr of environment */
宏 CFG_ENV_ADDR定义了存放uboot变量的地址,换算一下为1MB-64KB=960KB地方,而实际uboot编译出来的大小仅为120KB 左右,由此可以得出,即使从新烧录了新编译的uboot到Nor flash内,也不会影响先前设定使用的uboot变量。
#endif
注:可以在u-boot的README里查到这些部分宏的作用

5.解决蜂鸣器一直响问题
查看ARMSYS2410-B底板电路图,在Reset Singal模块里可以看到蜂鸣器(BUZZER)控制口连接到TOUT1引脚,并且低电平响。如下:


由s3c2410 Datasheet知道TOUT1复用了GPB1口。因此,只要在uboot启动时给GPBDAT寄存器适当赋值,关闭BUZZER就可以了。

修改smdk2410.c
#vi board/smdk2410/smdk2410.c
找到board_init()函数
在gpio->GPBUP = 0x000007FF;下面
添加如下内容:

/*******stop beep******/
gpio->GPBDAT &= ~0x00000002; //Open BUZZER

delay (5000000); //BUZZER Delay Time

gpio->GPBDAT |= 0x00000002;

6.重新编译
#make clean
#make ARCH=arm

7.烧录u-boot.bin到nor flash
启动信息:
U-Boot 1.1.4 (Jan 3 2008 - 23:11:07)
U-Boot code: 33F80000 -> 33F96DC4 BSS: -> 33F9B0E8
RAM Configuration:
Bank #0: 30000000 64 MB
Flash: 1 MB
In: serial
Out: serial
Err: serial
Hit any key to stop autoboot: 0
ARMSYS2410 #
最新评论共有 0 位网友发表了评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名: 密码:
匿名?
注册