修改smdk6410.h
在#ifndef __CONFIG_H
#define __CONFIG_H 之后添加
#definevirt_to_phys(x) virt_to_phy_smdk6410(x)
#defineNAND_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)
延迟时间
#defineCONFIG_BOOTDELAY 10
修改SDRAM
//#defineCONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + 0x7e00000) /* 126MBin DRAM */
#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + 0x9e00000)/* 126MB in DRAM */
修改系统时间
//#defineCONFIG_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
//#definePHYS_SDRAM_1_SIZE 0x08000000 /* 128 MB in Bank #1 */
#define PHYS_SDRAM_1_SIZE 0x10000000 /* 256 MB in Bank#1 */
Size of Environment Sector 修改
//#defineCONFIG_ENV_SIZE 0x4000 /* Total Size of Environment Sector */
#define CONFIG_ENV_SIZE 0x80000 /* Total Size of EnvironmentSector */
bootcommand修改
#defineCONFIG_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 0x600000x1c0000;" \
// "bootm 0x50018000"
#define CONFIG_BOOTCOMMAND "nand read 0x50018000 0x1000000x500000;" \
"bootm 0x50018000"
#endif
修改段偏移地址
#defineCONFIG_ENV_OFFSET 0x0080000
页大小
/* NANDchip page size */
//#define CONFIG_SYS_NAND_PAGE_SIZE 2048
#define CONFIG_SYS_NAND_PAGE_SIZE 4096
块大小
/* NANDchip block size */
//#define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024)
#define CONFIG_SYS_NAND_BLOCK_SIZE (512 * 1024)
校验位
/* NANDchip page per block count */
//#define CONFIG_SYS_NAND_PAGE_COUNT 64
#define CONFIG_SYS_NAND_PAGE_COUNT 128