分类:
2012-08-09 10:34:29
移植U-Boot-2010.03到友善之臂mini2440(六)
(1)
include/configs/mini2440.h
添加对
2440
的宏定义:
#define CONFIG_ARM920T 1 /* This is an ARM920T Core */
#define CONFIG_S
//#define CONFIG_S
//#define CONFIG_SBC2410X 1 /* on a friendly-arm SBC-2410X Board */
添加对
2440
、
mini2440
、
LED
的支持
#define CONFIG_S
#define CONFIG_MINI2440 1 /* on a friendly-arm mini2440 Board */
#define CONFIG_MINI2440_LED 1 /* Use the LED on Board */
#define CONFIG_S
(2)
修改网卡的宏定义,注释掉
CS8900
的部分,添加对
DM9000
的支持
删除对
cs8900
的支持:
/* Hardware drivers*/
#if 0
#define CONFIG_NET_MULTI
#define CONFIG_DRIVER_CS8900 1 /* we have a CS8900 on-board */
#define CS8900_BASE 0x19000300
#define CS8900_BUS16 1 /* the Linux driver does accesses as shorts */
#endif
添加对DM9000的支持:
#define CONFIG_DRIVER_DM9000 1
#define CONFIG_DM9000_USE_16BIT 1
#define CONFIG_DM9000_BASE 0x20000300
#define DM9000_IO 0x20000300
#define DM9000_DATA 0x20000304
#define CONFIG_DM9000_NO_SROM 1
#undef CONFIG_DM9000_DEBUG
#define CONFIG_NET_MULTI 1
#define CONFIG_NET_RETRY_COUNT 20
(3)添加对nand命令的支持:
#define CONFIG_CMD_ASKENV
#define CONFIG_CMD_CACHE
#define CONFIG_CMD_DATE
#define CONFIG_CMD_DHCP
#define CONFIG_CMD_ELF
#define CONFIG_CMD_PING
#define CONFIG_CMD_NAND
(4) 修改tftp和nfs 下载和挂载内核和文件系统的参数
#define CONFIG_BOOTARGS "noinitrd root=/dev/nfs rw nfsroot=202.204.53.32:/opt/mini2440/root_qtopia ip=202.204.53.33:202.204.53.32::255.255.255.0 console=ttySAC0,115200 init=/linuxrc mem=
#define CONFIG_ETHADDR 08:00:3e:26:
#define CONFIG_NETMASK 255.255.255.0
#define CONFIG_IPADDR 202.204.53.33
#define CONFIG_SERVERIP 202.204.53.32
#define CONFIG_GATEWAYIP 202.204.53.1
/*#define CONFIG_BOOTFILE "elinos-lart" */
#define CONFIG_BOOTCOMMAND " tftp 0x30008000 zImage.img;bootm"
#define CONFIG_OVERWRITE_ETHADDR_ONCE
#define CONFIG_EXTRA_ENV_SETTINGS \
"xujun=bmp d 70000\0 " \
"stdin=serial\0" \
"stdout=serial\0" \
"stderr=serial\0"
(5)修改载入内存地址:
#define CONFIG_SYS_LOAD_ADDR 0x30008000 /* default load address */
(
6
)将环境参数储存在
NandFlash
里面
#define CONFIG_ENV_IS_IN_NAND 1
#define CONFIG_ENV_OFFSET 0x60000
#define CONFIG_ENV_SIZE 0x20000 /* Total Size of Environment Sector */
(
7
)添加对
mini2440
板子上的
Nor Flash
的支持
/* == LENGTH_UBOOT*/
#ifdef CONFIG_SST_VF1601
#define PHYS_FLASH_SIZE 0x00200000 /* 2MB */
#define CONFIG_SYS_MAX_FLASH_SECT (32) /* max number of sectors on one chip */
#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET) /* addr of environment */
#endif
(
8
)对
NandFlash
参数的相关支持
#if defined(CONFIG_CMD_NAND)
#define CONFIG_NAND_S
#define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND devices */
#define CONFIG_SYS_NAND_BASE 0x4E000000
#define SECTORSIZE 512
#define SECTORSIZE_2K 2048
#define NAND_SECTOR_SIZE SECTORSIZE
#define NAND_SECTOR_SIZE_2K SECTORSIZE_2K
#define NAND_BLOCK_MASK 511
#define NAND_BLOCK_MASK_2K 2047
#define NAND_MAX_CHIPS 1
#define CONFIG_MTD_NAND_VERIFY_WRITE
#define CONFIG_SYS_64BIT_VSPRINTF /* needed for nand_util.c */
#endif
(
9
)分区参数
#define MTDIDS_DEFAULT "nand0=nandflash0"
#define MTDPARTS_DEFAULT "mtdparts=nandflash0:384k(bootloader)," \
"128k(params)," \
"
"-(root)"
(10)对
YAFFS的支持
#define ENABLE_CMD_NAND_YAFFS 1
#define ENABLE_CMD_NAND_YAFFS_SKIPFB 1
(11)GPIO B口的设置
# if defined(CONFIG_MINI2440_LED)
/* GPIO */
#define GPIO_CTL_BASE 0x56000000
#define oGPIO_B 0x10
#define oGPIO_CON 0x0 /* R/W, Configures the pins of the port */
#define oGPIO_DAT 0x4 /* R/W, Data register for port */
#define oGPIO_UP 0x8 /* R/W, Pull-up disable register */
#endif
#endif /* __CONFIG_H */