Modify uboot in skyeye to support 2410 boot from nand
Source: Internet
Author: User
Under skyeye modify uboot support 2410 boot from nand my 2440 development board does not norflash, is from nand boot, but yangchuang does not provide the source code of the U-BOOT, so decided to transplant, but there is no good debugging method. It has not been completed yet. I recently saw that skyeye supports n... under skyeye modify uboot support 2410 boot from nand my 2440 development board does not norflash, is from nand boot, but yangchuang does not provide the source code of the U-BOOT, so decided to transplant, but there is no good debugging method. It has not been completed yet. We recently saw that skyeye supports nand boot and u-boot. As soon as you decide to port it, the current initial stage is to Port version 2410, and then Port version 2440 after OK. The main changes are as follows: the following reference (U-BOOT FOR Yang Chu 2410 v2.3 BY wmmwang 8/2 Array/2007), I originally wrote, is directly copy 2440, I thought the same, as a result, I suffered a big loss, and the nand registers were different. I was so annoyed and blamed myself. 1. in cpu/armArray20t/start. modify the value in s as follows: # define STACK_BASE 0x33f00000 # define STACK_SIZE 0x8000DW_STACK_START :. word STACK_BASE + STACK_SIZE-4 # ifndef CONFIG_SKIP_RELOCATE_UBOOTrelocate:/* relocate U-Boot to RAM */adr r0, _ start/* r0 # include "linux/mtd. h "# include" linux/mtd/nand. h "// # define LARGEPAGE_FLASH # define _ REGb (x) (* (volatile unsigned char *) (x) # define _ REGi (x) (* (volatile unsigned int *)( X) # define NF_BASE 0x4e000000 # define NFCONF _ REGi (NF_BASE + 0x0) # define NFCMD _ REGb (NF_BASE + 0x4) # define NFADDR _ REGb (NF_BASE + 0x8) # define NFDATA _ REGb (NF_BASE + 0xc) # define NFSTAT _ REGb (NF_BASE + 0x10) # define BUSY 1 inline void wait_idle (void) {int I; while (! (NFSTAT & BUSY) for (I = 0; I SZ_1M) */) {return-1;/* invalid alignment */}/* chip Enable */NFCONF & = ~ 0x800; for (I = 0; I> Array) & 0xff; NFADDR = (I> 17) & 0xff; NFADDR = (I> 25) & 0xff; # else NFADDR = I & 0xff; NFADDR = (I> 8) & 0x07; NFADDR = (I> 11) & 0xff; NFADDR = (I> 1 Array) & 0xff; NFADDR = (I> 27) & 0x3; NFCMD = nand_assist_readstart; # endif wait_idle (); for (j = 0; j <NAND_SECTOR_SIZE; j ++) {* buf = (NFDATA & 0xff); buf ++;} I + = NAND_SECTOR_SIZE ;} /* chip Disable */NFCONF | = 0x800; /* Chip disable */return 0;} 4. modify the board/smdk2410/Makefile: COBJS: = smdk2410.o flash. o nand_read.o // add nand_read.o to compile. The following describes how to use skyeye for debugging. The first step is to generate the nand. dump file. There is mknandflashdump. c under skyeye-1.2.4 \ device \ nandflash \ tools. Compile gcc mknandflashdump. c under cygwin to generate a.exe copy the u-boot.bin just generated to execute./a.exe u-boot.bin nand. dump 0x0 to generate nand. dump. Modify skyeye. conf file: # skyeye config file for S3C2410Xcpu: armArray20tmach: s3c2410x # physical memorymem_bank: map = M, type = RW, addr = 0x00000000, size = 0x00004000, file =. /u-boot.bin, boot = yesmem_bank: map = M, type = RW, addr = 0x30000000, size = 0x04000000 # mem_bank: map = M, type = RW, addr = 0xC0000000, size = 0x04000000, file =. /vmlinux # mem_bank: map = M, type = RW, addr = 0x30000000, size = 0x03F80000 # mem_bank: map = M, type = RW, Ddr = 0x33F80000, size = 0x00080000, file =. /u-boot.bin, boot = yes # mem_bank: map = M, type = RW, addr = 0xc000000, size = 0x01000000 # all peripherals I/O mapping areamem_bank: map = I, type = RW, addr = 0x48000000, size = 0x200020.mem_bank: map = I, type = RW, addr = 0x1Array000300, size = 0x00000020 # net: type = cs8Array00a, base = 0x1Array000300, size = 0x20, int = Array, mac = 08: 00: 3E: 26: 0A: 5B, ethmod = tuntap, hostip = 10.0.0.1nandflash: Type = s3c2410x, name = KArrayF1208U0B, dump =./nand. dump # LCD: type = s3c2410x, mod = gtkdbct: state = oncygwin input: skyeye is OK. Note: I have failed a verification after copy_myself, and it is still being tested. In the future, I will change to the next step: Port to 2440. Currently, it seems that skyeye does not support 2440 nand startup. check whether you can modify skyeye. Next step: Port ecos to 2440. of course, it is also simulated in skyeye and first simulated in skyeye. It is found that skyeye is really a good software, especially in bootloader porting and operating system porting.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.