主要参考:U-BOOT-2010.06移植到TQ2440.pdf 这个资料
整理的一些资料:
u-boot-2011.03在TQ2440上的移植(3)--支持norflash启动
嵌入式Linux之我行——u-boot-2009.08在2440上的移植详解(二)EN29LV160AB nor flash 开发板1.修改u-boot 提示符
gedit include/configs/smdk2440.h
- /*
-
* Miscellaneous configurable options
-
*/
-
#define CONFIG_SYS_LONGHELP /* undef to save memory */
-
#define CONFIG_SYS_PROMPT "[SMDK2440]# " /* Monitor Command Prompt */ 修改
-
#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
-
#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,8KB,32KB,后31个扇区的大小都是64K。所以正好可以使用board/smdk2410目录下的flash.c,直接对芯片
厂商以及ID进行赋值的方式。(当然还有更好的方式就是读取芯片信息,判断出芯片厂商和ID再进行以后相应的操作,以后有空用这种方式)。
gedit include/configs/smdk2440.h
- /*-----------------------------------------------------------------------
-
* FLASH and environment organization
-
*/
-
#if 0 修改为 CONFIG_AMD_LV800
-
#define CONFIG_AMD_LV400 1 /* uncomment this if you have a LV400 flash */
-
#endif
-
#define CONFIG_AMD_LV800 1 /* uncomment this if you have a LV800 flash */
-
-
-
#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */
-
#ifdef CONFIG_AMD_LV800
-
#define PHYS_FLASH_SIZE 0x00200000 /* 2MB */
-
#define CONFIG_SYS_MAX_FLASH_SECT (19) /* max number of sectors on one chip */
-
#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x0F0000) /* addr of environment */
-
#endif
-
#ifdef CONFIG_AMD_LV400
-
#define PHYS_FLASH_SIZE 0x00080000 /* 512KB */
-
#define CONFIG_SYS_MAX_FLASH_SECT (11) /* max number of sectors on one chip */
-
#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x070000) /* addr of environment */
-
#endif
/* 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.显示
- Now, Downloading [ADDRESS:33000000h,TOTAL:98790]
-
RECEIVED FILE SIZE: 98790 (96KB/S, 1S)
-
## Starting application at 0x33000000 ...▲
-
-
U-Boot 2010.06-rc1 ( 4鏈?16 2011 - 15:23:12)
-
-
DRAM: 64 MiB
-
Flash: 2 MiB
-
*** Warning - bad CRC, using default environment
-
-
In: serial
-
Out: serial
-
Err: serial
-
Net: CS8900-0
-
[SMDK2440]# ?
-
? - alias for 'help'
-
base - print or set address offset
-
bdinfo - print Board Info structure
-
boot - boot default, i.e., run 'bootcmd'
-
bootd - boot default, i.e., run 'bootcmd'
-
bootelf - Boot from an ELF image in memory
-
bootm - boot application image from memory
-
bootp - boot image via network using BOOTP/TFTP protocol
-
bootvx - Boot vxWorks from an ELF image
-
cmp - memory compare
-
coninfo - print console devices and information
因为使用的是 AM flash 原先的配置
- [SMDK2440]# flinfo
-
-
Bank # 1: AMD: 1x Amd29LV800BB (8Mbit) ##这里还是 AMD nor flash 芯片,
-
Size: 2 MB in 19 Sectors
-
Sector Start Addresses:
-
00000000 (RO) 00004000 (RO) 00006000 (RO) 00008000 (RO) 00010000 (RO)
-
00020000 00030000 00040000 00050000 00060000
-
00070000 00080000 00090000 000A0000 000B0000
-
000C0000
阅读(2182) | 评论(0) | 转发(0) |