加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

UBOOT-2010.06 移植 支持norflash (四)

发布时间:2020-12-15 07:16:01 所属栏目:百科 来源:网络整理
导读:主要参考:U-BOOT-2010.06移植到TQ2440.pdf? 这个资料 整理的一些资料: u-boot-2011.03在TQ2440上的移植(3)--支持norflash启动 移植u-boot2009.08到OK2440V3开发板(3)---nor flash启动 嵌入式Linux之我行——u-boot-2009.08在2440上的移植详解(二) EN29L
主要参考:U-BOOT-2010.06移植到TQ2440.pdf? 这个资料

整理的一些资料:
u-boot-2011.03在TQ2440上的移植(3)--支持norflash启动 移植u-boot2009.08到OK2440V3开发板(3)---nor flash启动
嵌入式Linux之我行——u-boot-2009.08在2440上的移植详解(二)

EN29LV160AB? nor flash? 开发板

1.修改u-boot 提示符


?? gedit include/configs/smdk2440.h

  1. /*
  2. ?* Miscellaneous configurable options
  3. ?*/
  4. #define????CONFIG_SYS_LONGHELP????????????????* undef to save memory????????/
  5. #define????CONFIG_SYS_PROMPT????????"[SMDK2440]# "????* Monitor Command Prompt????/? 修改
  6. #define????CONFIG_SYS_CBSIZE????????256????????* Console I/O Buffer Size????/
  7. #define????CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) * Print Buffer Size /

2. 配置 nor falsh

发现自己的天嵌TQ2440板子所使用的Nor flash?芯片( NOE的EN29LV160AB)与smdk2410默认使用的芯片(AMD的AM29LV400B或AM29LV400)除了大小不一样外,其它如命令序列、工作方式等都是一样的。所以U-boot源码中关于nor flash的部分修改的不多。
?
因为已经知道自己板子的Nor flash芯片是Bottom boot模式,分成35个扇区(使用J-LINK烧写板载光盘的映像时,可以看到相应的芯片信息), 前4个扇区的大小分别为16KB,8KB,32KB,后3 1个扇区的大小都是64K。所以正好可以使用board/smdk2410目录下的flash.c,直接对芯片厂商以及ID进行赋值的方式。(当然还 有更好的方式就是读取芯片信息,判断出芯片厂商和ID再进行以后相应的操作,以后有空用这种方式)。


gedit include/configs/smdk2440.h

  1. --
  2. ?* FLASH and environment organization
  3. ?/
  4. #if 0?? 修改为 CONFIG_AMD_LV800
  5. #define CONFIG_AMD_LV400????1????* uncomment this if you have a LV400 flash */
  6. #endif
  7. #define CONFIG_AMD_LV800????1????if you have a LV800 flash /


  8. #define CONFIG_SYS_MAX_FLASH_BANKS????1????* max number of memory banks /
  9. #ifdef CONFIG_AMD_LV800
  10. #define PHYS_FLASH_SIZE????????0x00200000 /* 2MB /
  11. #define CONFIG_SYS_MAX_FLASH_SECT????(19)????* max number of sectors on one chip /
  12. #define CONFIG_ENV_ADDR????????(CONFIG_SYS_FLASH_BASE + 0x0F0000* addr of environment /
  13. #endif
  14. #ifdef CONFIG_AMD_LV400
  15. #define PHYS_FLASH_SIZE????????0x00080000 * 512KB /
  16. #define CONFIG_SYS_MAX_FLASH_SECT????(11+ 0x070000/
  17. #endif

  18. /* timeout values are in ticks */
    #define CONFIG_SYS_FLASH_ERASE_TOUT??? (5*CONFIG_SYS_HZ) /* Timeout for Flash Erase */
    #define CONFIG_SYS_FLASH_WRITE_TOUT??? (5*CONFIG_SYS_HZ) /* Timeout for Flash Write */

    #define??? CONFIG_ENV_IS_IN_FLASH??? 1
    #define CONFIG_ENV_SIZE??? ??? 0x20000??? /* Total Size of Environment Sector */



3. 配置下载
make mrproper
make smdk2440_config
make all

4.显示

  1. Now,Downloading [ADDRESS:33000000h,TOTAL:98790]
  2. RECEIVED FILE SIZE: 98790 (96KB/S,1S)
  3. ## Starting application at 0x33000000 ...▲

  4. U-Boot 2010.06-rc1 ( 4鏈?16 2011 - 15:23:12)

  5. DRAM: 64 MiB
  6. Flash: 2 MiB
  7. *** Warning - bad CRC,using default environment

  8. In: serial
  9. Out: serial
  10. Err: serial
  11. Net: CS8900-0
  12. [SMDK2440]# ?
  13. ? - alias for 'help'
  14. base - print or set address offset
  15. bdinfo - print Board Info structure
  16. boot - boot default,i.e.,run 'bootcmd'
  17. bootd - boot default,run 'bootcmd'
  18. bootelf - Boot from an ELF image in memory
  19. bootm - boot application image from memory
  20. bootp - boot image via network using BOOTP/TFTP protocol
  21. bootvx - Boot vxWorks from an ELF image
  22. cmp - memory compare
  23. coninfo - print console devices and information


因为使用的是 AM flash 原先的配置

  1. [SMDK2440]# flinfo

  2. Bank # 1: AMD: 1x Amd29LV800BB (8Mbit)? ##这里还是 AMD nor flash 芯片,
  3. ??Size: 2 MB in 19 Sectors
  4. ??Sector Start Addresses:
  5. ????00000000 (RO) 00004000 ) 00006000 ) 00008000 ) 00010000 )
  6. ????00020000 00030000 00040000 00050000 00060000
  7. ????00070000 00080000 00090000 000A0000 000B0000
  8. ????000C0000







阅读(1255) | 评论(0) | 转发(0) |
0

上一篇:UBOOT-2010.06 移植 建立自己的demo板 (二)

下一篇:UBOOT-2010.06 移植 支持nand flash 上 (五)

相关热门文章
  • 移植u-boot之修改代码支持norF...
  • norflash启动和nandflash启动...
  • norflash芯片内执行(XIP)...
  • norflash启动和nandflash启动...
  • norflash启动和nandflash启动...
  • A sample .exrc file for vi e...
  • IBM System p5 服务器 HACMP ...
  • 游标的特征
  • busybox的httpd使用CGI脚本(Bu...
  • Solaris PowerTOP 1.0 发布
    评论热议

    (编辑:李大同)

    【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

      推荐文章
        热点阅读