分享

【转载】OK6410 UBOOT 移植4

 寝乡园 2012-07-20
 

修改smdk6410.h

在#ifndef __CONFIG_H
#define __CONFIG_H 之后添加

#define virt_to_phys(x)   virt_to_phy_smdk6410(x)

#define NAND_DISABLE_CE() (NFCONT_REG |= (1 << 1))
#define NAND_ENABLE_CE() (NFCONT_REG &= ~(1 << 1))
#define NF_TRANSRnB()  do { while(!(NFSTAT_REG & (1 << 0))); } while(0)

/*
 * Architecture magic and machine type
 */
//#define MACH_TYPE  1270
#define MACH_TYPE  1626  //这里是定义6410的ID与LINUX内核是相配合的

修改内存值

/*
 * Size of malloc() pool
 */
//#define CONFIG_SYS_MALLOC_LEN  (CONFIG_ENV_SIZE + 1024 * 1024)
#define CONFIG_SYS_MALLOC_LEN  (CONFIG_ENV_SIZE + 512 * 1024)

延迟时间

#define CONFIG_BOOTDELAY 10 

修改SDRAM

//#define CONFIG_SYS_MEMTEST_END  (CONFIG_SYS_SDRAM_BASE + 0x7e00000) /* 126MB in DRAM */
#define CONFIG_SYS_MEMTEST_END  (CONFIG_SYS_SDRAM_BASE + 0x9e00000) /* 126MB in DRAM */ 

修改系统时间

//#define CONFIG_SYS_HZ   1000
#define CONFIG_SYS_HZ   1562500

修改堆栈

/*-----------------------------------------------------------------------
 * Stack sizes
 *
 * The stack sizes are set up in start.S using the settings below
 */
//#define CONFIG_STACKSIZE 0x40000  /* regular stack 256KB */
#define CONFIG_STACKSIZE 0x80000  /* regular stack 512KB */ 

修改NANDFLASH

//#define PHYS_SDRAM_1_SIZE 0x08000000 /* 128 MB in Bank #1 */
#define PHYS_SDRAM_1_SIZE 0x10000000 /* 256 MB in Bank #1 */ 

  Size of Environment Sector 修改

//#define CONFIG_ENV_SIZE  0x4000 /* Total Size of Environment Sector */
#define CONFIG_ENV_SIZE  0x80000 /* Total Size of Environment Sector */

bootcommand修改

#define CONFIG_BOOTCOMMAND "nand read 0xc0018000 0x60000 0x1c0000;" \
    "bootm 0xc0018000"
#else
#define CONFIG_SYS_MAPPED_RAM_BASE CONFIG_SYS_SDRAM_BASE
//#define CONFIG_BOOTCOMMAND "nand read 0x50018000 0x60000 0x1c0000;" \
//    "bootm 0x50018000"
#define CONFIG_BOOTCOMMAND "nand read 0x50018000 0x100000 0x500000;" \
    "bootm 0x50018000"
#endif 

 修改段偏移地址

#define CONFIG_ENV_OFFSET  0x0080000 

页大小

/* NAND chip page size  */
//#define CONFIG_SYS_NAND_PAGE_SIZE 2048
#define CONFIG_SYS_NAND_PAGE_SIZE 4096 

块大小

/* NAND chip block size  */
//#define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024)
#define CONFIG_SYS_NAND_BLOCK_SIZE (512 * 1024)

校验位

/* NAND chip page per block count  */
//#define CONFIG_SYS_NAND_PAGE_COUNT 64
#define CONFIG_SYS_NAND_PAGE_COUNT 128 

 


    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多