1. 下载skyeye-1.2.4,解压
1.1 进入skyeye-1.2.4目录,执行命令 make distclean 清除以前配置。
1.2 执行make 命令编译,中间会出现一些警,不影响系统编译。当出现"The binary file located at 'binary/skyeye' ,enjoy it"语句时则编译成功,生成的可执行文件为skyeye目录下的skyeye。
2. 下载u-boot-1.1.6,解压,进入U-boot-1.1.6目录
2.1 配置板子SDROM和FLASH参数为板子实际大小,找到u-boot-1.1.6/include/configs/smdk2410.h,修改其中的PHYS_SDRAM_1_SIZE为板子实际SDRAM大小,
CFG_MAX_FLASH_SECT为128,修改PHYS_FLASH_SIZE为板子实际FLASH大小。并保存。
如下所示
*-----------------------------------------------------------------------
* Physical Memory Map
*/
#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */
#define PHYS_SDRAM_1 0x30000000 /* SDRAM Bank #1 */
#define PHYS_SDRAM_1_SIZE 0x04000000 /* 64 MB */
#define PHYS_FLASH_1 0x00000000 /* Flash Bank #1 */
#define CFG_FLASH_BASE PHYS_FLASH_1
/*-----------------------------------------------------------------------
* FLASH and environment organization
*/
#define CONFIG_AMD_LV400 1 /* uncomment this if you have a LV400 flash */
#if 0
#define CONFIG_AMD_LV800 1 /* uncomment this if you have a LV800 flash */
#endif
#define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */
#ifdef CONFIG_AMD_LV800
#define PHYS_FLASH_SIZE 0x04000000 /* 64MB */
#define CFG_MAX_FLASH_SECT (128) /* max number of sectors on one chip */
#define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x020000) /* addr of environment */
#endif
#ifdef CONFIG_AMD_LV400
#define PHYS_FLASH_SIZE 0x04000000 /* 64MB */
#define CFG_MAX_FLASH_SECT (128) /* max number of sectors on one chip */
#define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x020000) /* addr of environment */
#endif
2.2 配置并编译:
make distclean
make smdk2410_config
make
经过以上命令则生成两个文件:u-boot和u-boot.bin。
3. 创建一个目录用于存放相关文件。
3.1 如创建TestArm目录:mkdir TestArm
3.2 将前面生成的u-boot文件放在TestArm目录下。
3.3 新建文件命名为skyeye.conf并放在TestArm目录下,文件内容如下
cpu: arm920t
mach: s3c2410x
mem_bank:map=I,type=RW,addr=0x48000000,size=0x20000000
#注意此处的addr一定要与上面smdk2410.h配置的SDRAM和FLASH的大小与基地址一定要相同,否则启动不起来,卡在那里。
#下面这一句和FLASH一样
mem_bank:map=M,type=RW,addr=0x00000000,size=0x04000000,file=u-boot,boot=yes
#下面这一句和SDRAM一样
mem_bank:map=M,type=RW,addr=0x30000000,size=0x04000000
4. 运行命令./skyeye如下所示
[Filter@zhoub TestArm]$ skyeye
**************************** WARNING **********************************
If you want to run ELF image, you should use -e option to indicate
your elf-format image filename. Or you only want to run binary image,
you need to set the filename of the image and its entry in skyeye.conf.
***********************************************************************
big_endian is false.
arch: arm
cpu info: armv4, arm920t, 41009200, ff00fff0, 2
mach info: name s3c2410x, mach_init addr 0x8067f58
flash: dump nand.dump
uart_mod:0, desc_in:, desc_out:, converter:
SKYEYE: use arm920t mmu ops
Loaded RAM u-boot
ERROR: s3c2410x_io_write_word(0x4c000000) = 0x00ffffff
ERROR: s3c2410x_io_write_word(0x4c000008) = 0x00048032
U-Boot 1.1.6 (Jun 10 2008 - 08:40:29)
DRAM: 64 MB
Flash: 64 MB
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
SMDK2410
表明已经运行起来了,上面显示有一个警靠我两个ERROR,不知为何,正在查原因。
执行help命令查看帮助如下
SMDK2410 # go
Usage:
go - start application at address 'addr'
SMDK2410 # help
? - alias for 'help'
autoscr - run script from memory
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
cp - memory copy
crc32 - checksum calculation
date - get/set/reset date & time
dcache - enable or disable data cache
echo - echo args to console
erase - erase FLASH memory
flinfo - print FLASH memory information
go - start application at address 'addr'
help - print online help
icache - enable or disable instruction cache
iminfo - print header information for application image
imls - list all images found in flash
itest - return true/false on integer compare
loadb - load binary file over serial line (kermit mode)
loads - load S-Record file over serial line
loady - load binary file over serial line (ymodem mode)
loop - infinite loop on address range
md - memory display
mm - memory modify (auto-incrementing)
mtest - simple RAM test
mw - memory write (fill)
nfs - boot image via network using NFS protocol
nm - memory modify (constant address)
printenv- print environment variables
protect - enable or disable FLASH write protection
rarpboot- boot image via network using RARP/TFTP protocol
reset - Perform RESET of the CPU
run - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv - set environment variables
sleep - delay execution for some time
tftpboot- boot image via network using TFTP protocol
version - print monitor version
在上面的skyeye.conf文件中,将u-boot放到
mem_bank:map=M,type=RW,addr=0x30000000,size=0x04000000,file=u-boot,boot=yes
同样可以运行
[@more@]来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8318835/viewspace-1005590/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/8318835/viewspace-1005590/