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 出现的问题解决方法的更多相关文章

  1. 使用WebBrowser控件播放Flash网页相关问题解决方法(转)

    就是写一个类继承WebBrower控件,重写 protected   override   void   WndProc(ref   System.Windows.Forms.Message   m) ...

  2. 在网页中怎样给已发布的Flash添加链接的方法(zhuan)

    因为网页中的 Flash 是以控件形式出现的,优先级别较高,所以直接对它加链接是无效的,不过可以用按钮控件 BUTTON 来实现. 具体步骤 1.直接在按钮上加上onClick事件打开指定页面: &l ...

  3. 如何在HTML中加载Flash(2种实现方法)_HTML/Xhtml_网页制作

    点评:如何在HTML中加载Flash,为网页添加更多的色彩,普通的网页以无法满足用户的需求,接下来为大家介绍下2种在HTML中加载Flash的方法,感兴趣的各位可以适当参考下,希望对你有所帮助 第一种 ...

  4. 总结调用Flash的几种方法

    一.Adobe 提供的方法 <object width="200" height="200" classid="clsid:D27CDB6E-A ...

  5. javascript调用Flash里对象的方法(函数)搞了五个小时。

    搞了几个小时后,才发现,之前走的路是错的. 今天在Firefox浏览器上测试一个javascript调用Flash中的一个对象的方法时遇到问题了, 一搞就整整搞了一个下午. 我记得之前我用Flash8 ...

  6. Chrome(谷歌浏览器)和Firefox浏览器flash的swf文件发黑不透明问题解决方法

    一直以来看到各大网站的FLASH都是黑框框的,很好奇,难道他们不知道flash是可以设成透明的?于是用IE Tab插件浏览了下,发现人家的网页又正常,这样一来我就开始怀疑是我的Chrome有问题,于是 ...

  7. Flash数据的采集方法-搜房房价走势采集

    一般来说flash中的数据是不能被现有技术很容易采集到的,但是也不能谈flash色变,要具体问题具体分析,有些flash是可以通过一些分析发现背后的数据.然后采集就变得很容易了. 具体案例:搜房房价走 ...

  8. 火狐浏览器(FireFox)安装Flash插件失败处理方法

    最近不知道怎么了,总是嫌弃IE,可能是被网络流量监测的网址给搞得了,弄了火狐浏览器,也安装了猎豹,这里不对浏览器做评价 好多朋友安装好火狐(FireFox)的时候发现之前不是有装IE的Flash播放插 ...

  9. 解决chrome和firefox flash不透明的方法

    透明flash在IE内核的浏览器下正常.在chrome和火狐下不透明了. 解决方法: <object height="377" width="712" c ...

随机推荐

  1. WinDbg抓取程序报错dump文件的方法

    程序崩溃的两种主要现象: a. 程序在运行中的时候,突然弹出错误窗口,然后点错误窗口的确定时,程序直接关闭 例如: “应用程序错误” “C++错误之类的窗口” “程序无响应” “假死”等 此种崩溃特点 ...

  2. vi 操作技巧

    输入模式的操作Home光标到行首End 光标到行尾Page Up和Page Down上下翻页Delect删除光标位置的字符 删除操作(命令模式使用)x删除光标处的单个字符dd删除光标所在行dw删除当前 ...

  3. 图片(img标签)大小自适应

    $(function(){ var myimg,oldwidth,oldheight; var maxwidth=249; var maxheight=187; var imgs = document ...

  4. android网络编程之HttpUrlConnection的讲解--实现文件断点下载

    1.没有实现服务器端,下载地址为网上的一个下载链接. 2.网络开发不要忘记在配置文件中添加访问网络的权限 <uses-permission android:name="android. ...

  5. Centos7下安装pip

    Linux 通过 pip 安装使用 Shadowsocks - CentOS 7 (06) Pip是安装Python包的工具,提供了安装.列举已安装包.升级以及卸载包的功能.Pip 是对easy_in ...

  6. 安卓无法生成R文件原因

    原因个人总结出来: 清单文件报错,则无法生成R文件 gen和bin目录可以删除

  7. 【翻译】Longest Palindromic Substring 最长回文子串

    原文地址: http://articles.leetcode.com/2011/11/longest-palindromic-substring-part-i.html 转载请注明出处:http:// ...

  8. NDK编译应用程序

    Android源码目录下的build/envsetup.sh文件,描述编译的命令 - m:       Makes from the top of the tree. - mm:      Build ...

  9. java操作oracle的blob,clob数据

    一.区别和定义 LONG: 可变长的字符串数据,最长2G,LONG具有VARCHAR2列的特性,可以存储长文本一个表中最多一个LONG列 LONG RAW: 可变长二进制数据,最长2G CLOB:  ...

  10. 8.4 sikuli 集成进eclipse 报错:Unsupported major.minor version 51.0

    8.3中的问题Win32Util.dll: Can't load 32-bit .dll on a AMD 64 bit platform  解决之后,执行还是会有报错:Unsupported maj ...