u-boot-2010.03在tq6410上的移植详解(四)
来源:互联网 发布:北京建筑软件班 编辑:程序博客网 时间:2024/06/12 18:53
原创文章版权所有!如需转载,请注明出处: http://hi.baidu.com/liushuiyue1/myhome谢谢合作!!!!!
六.对Nor flash的支持:
从上图的启动信息可以看到flash:0kb。Uboot还没有添加对Nor flash的支持。我们使用的nor flash型号是EN29LV160AB,与AMD的兼容,所以添加对Nor flash的支持。
#cd include/configs///
#gedit smdk6410.h //
/*-----------------------------------------------------------------------
* FLASH and environment organization
*/
#define CONFIG_SYS_FLASH_BASE 0x00000000//0x10000000Flash的基地址
#define CONFIG_SYS_MONITOR_BASE 0x00000000
#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */
//一定要定义为>0
/* AM29LV160B has 35 sectors, AM29LV800B - 19 */
#define CONFIG_SYS_MAX_FLASH_SECT 35//40硬件得来
#define CONFIG_AMD_LV800
//#define CONFIG_SYS_FLASH_CFI 1 /* Use CFI parameters (needed?) */
#define PHYS_FLASH_SIZE 0x200000 //2M Flash的大小
#define PHYS_FLASH_1 0x00000000
/* Use drivers/cfi_flash.c, even though the flash is not CFI-compliant */
//CFI相关的屏蔽掉
//#define CONFIG_FLASH_CFI_DRIVER 1
//#define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT
//#define CONFIG_FLASH_CFI_LEGACY
//#define CONFIG_SYS_FLASH_LEGACY_512Kx16
/* 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_ADDR 0x00000
#define CONFIG_ENV_SIZE 0x4000 /* Total Size of Environment Sector */
说明:Uboot2010.03中支持Nor flash的两种读写方式:CFI和JEDEC。本文章采用JEDEC的方式。因为S3C2440和S3C6410的nor flash接口兼容,所以将S3C2440目录下的flash.c复制到./board/samsung/s3c6410/下,并修改Makefile文件。
#cd board/samsung/s3c6410/Makefile//
#gedit Makefile //
COBJS-y := smdk6410.o flash.o
重新编译Uboot并下载到Nand Flash中,串口打印信息如下。说明板子已经能检测到Nor flash
- u-boot-2010.03在tq6410上的移植详解(四)
- u-boot-2010.03在tq6410上的移植详解(一)
- u-boot-2010.03在tq6410上的移植详解(五)
- u-boot-2010.03在tq6410上的移植详解(一)
- u-boot-2010.03在tq6410上的移植详解
- u-boot-2010.03在tq6410上的移植详解(二)
- u-boot-2010.03在tq6410上的移植详解(一)
- u-boot-2010.03在tq6410上的移植详解(二)
- u-boot-2010.03在tq6410上的移植详解(三)
- u-boot-2010.03在tq6410上的移植详解(六)
- u-boot-2010.03在tq6410上的移植详解(七)
- u-boot-2010.03在tq6410上的移植详解(八)
- u-boot-2010.03在LT2440上的移植详解 (四)
- U-boot在S3C2440上的移植详解(四)
- U-boot在S3C2440上的移植详解(四)
- (转)u-boot-2009.08在2440上的移植详解(四)
- u-boot-2009.08在2440上的移植详解(四)
- u-boot-2009.08在2440上的移植详解(四)
- MFC子对话框建立与关闭
- Java.enableEvents.processXxxEvent(XxxEvent e)
- u-boot-2010.03在tq6410上的移植详解(一)
- u-boot-2010.03在tq6410上的移植详解(二)
- u-boot-2010.03在tq6410上的移植详解(三)
- u-boot-2010.03在tq6410上的移植详解(四)
- u-boot-2010.03在tq6410上的移植详解(五)
- u-boot-2010.03在tq6410上的移植详解(六)
- u-boot-2010.03在tq6410上的移植详解(七)
- 在报表中加入柱状图--转
- u-boot-2010.03在tq6410上的移植详解(八)
- JS屏蔽Cognos报表右键菜单
- 利用JS重写Cognos右键菜单
- 近况