uboot1.1.6之NOR FLASH 出现的问题解决方法
U-BOOT移植,structure has no member named `CAMDIVN
speed.c: In function `get_HCLK':
speed.c:114: error: structure has no member named `CAMDIVN'
speed.c: In function `get_PCLK':
speed.c:154: error: structure has no member named `CAMDIVN'
make[1]: *** [speed.o] Error 1
make[1]: Leaving directory `/usr/wuxuezhi/u-boot-1.1.6/cpu/arm920t/s3c24x0'
make: *** [cpu/arm920t/s3c24x0/libs3c24x0.a] Error 2
在include下的s3c24x0.h上的clock&power结构中添加相应名为CAMDIVN的结构变量
参考《嵌入式linux完全开发流程》P273,
(1)在include/configs/sbc2410x.h中添加#define CFG_FLASH_CFI_DRIVER 1
(2)在board/sbc2410x/Makefile中去掉flash.o
COBJS :=sbc2410x.o flash.o改为COBJS :=sbc2410x.o
(3)make测试,出错如下:编译出现很多警告,好像是编译器的问题,这里先不管它了啦,O(∩_∩)O哈哈~
[alu@localhost u-boot-1.1.6]$ make sbc2410x_config
Configuring for sbc2410x board...
[alu@localhost u-boot-1.1.6]$ make
.......
./bmp_logo logos/denx.bmp >/home/alu/mywork/systems/u-boot-1.1.6/include/bmp_logo.h
make[1]: Leaving directory `/home/alu/mywork/systems/u-boot-1.1.6/tools'
make -C examples all
make[1]: Entering directory `/home/alu/mywork/systems/u-boot-1.1.6/examples'
/usr/local/arm/usr/bin/arm-ep9312-linux-gnueabi-gcc -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x33F80000 -I/home/alu/mywork/systems/u-boot-1.1.6/include -fno-builtin -ffreestanding -nostdinc -isystem /usr/local/arm/usr/bin/../lib/gcc/arm-ep9312-linux-gnueabi/4.1.1/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv4 -mabi=apcs-gnu -Wall -Wstrict-prototypes -c -o hello_world.o hello_world.c
hello_world.c:1: warning: target CPU does not support interworking
In file included from /home/alu/mywork/systems/u-boot-1.1.6/include/common.h:105,
from hello_world.c:24:
/home/alu/mywork/systems/u-boot-1.1.6/include/flash.h:36: error: 'CFG_MAX_FLASH_SECT' undeclared here (not in a function)
make[1]: *** [hello_world.o] Error 1
make[1]: Leaving directory `/home/alu/mywork/systems/u-boot-1.1.6/examples'
make: *** [examples] Error 2
[alu@localhost u-boot-1.1.6]$
上边有很多编译警告,先不管,看下边的错误可知,此错误是由未定义'CFG_MAX_FLASH_SECT' 而引起。呵呵是问了好多大侠才知道的。在include/configs/sbc2410x.h中添加'CFG_MAX_FLASH_SECT'的定义,暂时定义为#define CFG_MAX_FLASH_SECT 1 好像说这里应该根据flash 的data sheet来定义,但是我还不知道怎么定义,先不管了。定义后编译:
添加了'CFG_MAX_FLASH_SECT'的定义后编译,出现了好一堆的错误:
cfi_flash.c:1224: error: 'flash_info_t' has no member named 'cmd_reset'
cfi_flash.c: In function 'flash_write_cfiword':
cfi_flash.c:1257: error: 'flash_info_t' has no member named 'portwidth'
cfi_flash.c:1279: error: 'flash_info_t' has no member named 'vendor'
cfi_flash.c:1288: error: 'flash_info_t' has no member named 'portwidth'
cfi_flash.c:1292: error: 'flash_info_t' has no member named 'portwidth'
cfi_flash.c:1312: error: 'flash_info_t' has no member named 'write_tout'
cfi_flash.c: In function 'flash_make_addr':
cfi_flash.c:221: warning: control reaches end of non-void function
make[1]: *** [cfi_flash.o] Error 1
make[1]: Leaving directory `/home/alu/mywork/systems/u-boot-1.1.6/drivers'
make: *** [drivers/libdrivers.a] Error 2
[alu@localhost u-boot-1.1.6]$
分析:在include/flash.h中:
typedef struct {
ulong size;
ushort sector_count;
ulong flash_id;
ulong start[CFG_MAX_FLASH_SECT];
uchar protect[CFG_MAX_FLASH_SECT];
#ifdef CFG_FLASH_CFI
uchar portwidth;
uchar chipwidth;
……
“cfi_flash.c:220: error: structure has no member named `portwidth'”这个错误的意思是:
结构中没有portwidth,从flash_info_t结构的定义就可以知道,是CFG_FLASH_CFI没有定义。
所以,在include/configs/100ask24x0.h 中加一个#define CFG_FLASH_CFI 1
(4)添加#define CFG_FLASH_CFI 1再编译,又出现错误:
cfi_flash.c: In function `flash_init':
cfi_flash.c:411: error: `CFG_MONITOR_BASE' undeclared (first use in this function)
cfi_flash.c:411: error: (Each undeclared identifier is reported only once
cfi_flash.c:411: error: for each function it appears in.)
make[1]: *** [cfi_flash.o] 错误 1
make[1]:正在离开目录 `/home/boy/document/system/ub/u-boot-1.1.6/drivers'
make: *** [drivers/libdrivers.a] 错误 2
查找问题 在flash.h 和 100ask24x0.h中都没有定义CFG_MONITOR_BASE,又看了cfi_flash.c中的207:ulong flash_get_size (ulong base, int banknum);
208:#if defined(CFG_ENV_IS_IN_FLASH) || defined(CFG_ENV_ADDR_REDUND) || (CFG_MONITOR_BASE >= CFG_FLASH_BASE)
在100ask24x0.h定义:#define CFG_MONITOR_BASE 0x00000000 在编译:
(5)编译时,应该还会出现一个错误,我的是这样的,但是别人的没有出现。会要求定义#define CFG_ENV_ADDR (CFG_FLASH_BASE + 0X0F0000)这个地址我也不知道怎么定义,是对着LV800的定义的,还不知道是对是错呢!
(6)终于编译通过了!一共在sbc2410x.h中添加了
#define CFG_FLASH_CFI_DRIVER 1
#define CFG_MAX_FLASH_SECT 1
#define CFG_FLASH_CFI 1
#define CFG_MONITOR_BASE 0x00000000
#define CFG_ENV_ADDR (CFG_FLASH_BASE + 0X0F0000) 这几个定义。
(7)终于可以下到板子上边去跑了,虽然显示还是有问题
U-Boot 1.1.6 (Oct 29 2008 - 14:15:28)
DRAM: 64 MB
Flash: 0 kB ???????flash显示有问题
*** Warning - bad CRC, using default environment
In: serial
Out: serial
小知识:
1)用fl可以显示内存
SMDK2410 # fl
Bank # 1: AMD: 1x Amd29LV400BB (4Mbit) (此为未修改nor flash之前的设置)
Size: 0 MB in 11 Sectors
Sector Start Addresses:
00000000 (RO) 00004000 (RO) 00006000 (RO) 00008000 (RO) 00010000 (RO)
00020000 00030000 00040000 00050000 00060000
00070000 (RO)
SMDK2410 #
2) pro off all 解除所有内存的保护状态
erase all 擦除所有内存
md 0 显示内存信息
SMDK2410 # md 0
00000000: ffffffff ffffffff ffffffff ffffffff ................
00000010: ffffffff ffffffff ffffffff ffffffff ................
00000020: ffffffff ffffffff ffffffff ffffffff ................
00000030: ffffffff ffffffff ffffffff ffffffff ................
00000040: ffffffff ffffffff ffffffff ffffffff ................
00000050: ffffffff ffffffff ffffffff ffffffff ................
00000060: ffffffff ffffffff ffffffff ffffffff ................
00000070: ffffffff ffffffff ffffffff ffffffff ................
00000080: ffffffff ffffffff ffffffff ffffffff ................
00000090: ffffffff ffffffff ffffffff ffffffff ................
000000a0: ffffffff ffffffff ffffffff ffffffff ................
000000b0: ffffffff ffffffff ffffffff ffffffff ................
000000c0: ffffffff ffffffff ffffffff ffffffff ................
000000d0: ffffffff ffffffff ffffffff ffffffff ................
000000e0: ffffffff ffffffff ffffffff ffffffff ................
000000f0: ffffffff ffffffff ffffffff ffffffff ................
SMDK2410 #
3)内存拷贝 cp.b 目标地址 要存放的地址 $(filesize) 后边的$(filesize)是下载的文件大小,直接用$(filesize),不改变。
4)定义DEBUG ,可以使用CFI的调试.至于是什么,不知道!没试过,只是听说了……
uboot1.1.6之NOR FLASH 出现的问题解决方法的更多相关文章
- 使用WebBrowser控件播放Flash网页相关问题解决方法(转)
就是写一个类继承WebBrower控件,重写 protected override void WndProc(ref System.Windows.Forms.Message m) ...
- 在网页中怎样给已发布的Flash添加链接的方法(zhuan)
因为网页中的 Flash 是以控件形式出现的,优先级别较高,所以直接对它加链接是无效的,不过可以用按钮控件 BUTTON 来实现. 具体步骤 1.直接在按钮上加上onClick事件打开指定页面: &l ...
- 如何在HTML中加载Flash(2种实现方法)_HTML/Xhtml_网页制作
点评:如何在HTML中加载Flash,为网页添加更多的色彩,普通的网页以无法满足用户的需求,接下来为大家介绍下2种在HTML中加载Flash的方法,感兴趣的各位可以适当参考下,希望对你有所帮助 第一种 ...
- 总结调用Flash的几种方法
一.Adobe 提供的方法 <object width="200" height="200" classid="clsid:D27CDB6E-A ...
- javascript调用Flash里对象的方法(函数)搞了五个小时。
搞了几个小时后,才发现,之前走的路是错的. 今天在Firefox浏览器上测试一个javascript调用Flash中的一个对象的方法时遇到问题了, 一搞就整整搞了一个下午. 我记得之前我用Flash8 ...
- Chrome(谷歌浏览器)和Firefox浏览器flash的swf文件发黑不透明问题解决方法
一直以来看到各大网站的FLASH都是黑框框的,很好奇,难道他们不知道flash是可以设成透明的?于是用IE Tab插件浏览了下,发现人家的网页又正常,这样一来我就开始怀疑是我的Chrome有问题,于是 ...
- Flash数据的采集方法-搜房房价走势采集
一般来说flash中的数据是不能被现有技术很容易采集到的,但是也不能谈flash色变,要具体问题具体分析,有些flash是可以通过一些分析发现背后的数据.然后采集就变得很容易了. 具体案例:搜房房价走 ...
- 火狐浏览器(FireFox)安装Flash插件失败处理方法
最近不知道怎么了,总是嫌弃IE,可能是被网络流量监测的网址给搞得了,弄了火狐浏览器,也安装了猎豹,这里不对浏览器做评价 好多朋友安装好火狐(FireFox)的时候发现之前不是有装IE的Flash播放插 ...
- 解决chrome和firefox flash不透明的方法
透明flash在IE内核的浏览器下正常.在chrome和火狐下不透明了. 解决方法: <object height="377" width="712" c ...
随机推荐
- Windows常用的监视数据指标
- JavaScript高级程序设计:第二十一章
第二十一章 Ajax与Comet 一.XMLHttpRequest对象 1.XHT的用法 在使用XHR对象时,要调用的第一个方法时open( ),它接受3个参数:要发送的请求的类型.请求的URL和表示 ...
- A - 娜娜梦游仙境系列——诡异的钢琴
A - 娜娜梦游仙境系列——诡异的钢琴 Time Limit: 2000/1000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Othe ...
- docker 基础命令二
开启/停止/重启 查看当前正在运行容器docker ps 查看包括已经停止的所有容器docker ps -a 显示最新启动的一个容器docker ps -l 新建一个容器运行docker run 启动 ...
- .htaccess重写URL讲解
使用ThinkPHP和Laravel等框架的都知道,所以的请求都需要经过index.php文件入口,无论你的URI是什么. 当然除了访问的是静态文件或者访问路径的文件真实存在,例如你访问xxx.com ...
- linux--每日一个命令
编写shell脚本 hello.sh #!/bin/bash # The first program echo -e "\e[1;34m Hello world ! \e[0m" ...
- Hibernate4 占位符(?)
Hibernate3使用?占位符: Session session = sessionFactory.getCurrentSession(); session.beginTransaction(); ...
- org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named '__frch_lableId_0' in 'class com.cd.entity.Page'
#号改为$即可
- 【转】ThinkPHP 页面跳转
ThinkPHP 提供了success 与error 方法用于带提示信息的页面跳转,如添加数据后显示提示信息并跳转等.success 方法用于操作成功后的提示,error 用于操作失败后的提示,二者使 ...
- HDU1258 Sum it up
Sum it up 题意:给定一个数sum,和n个数,求sum可以由这n个数里面的那几个数的和表示. Given a specified total t and a list of n integer ...