[U-Boot-Users] Question about porting u-boot

Hello there,
I got a customized board, which is based on S3C2410. a 2MB NOR flash SST 39xF1601 and a 64M NAND flash K9F1208. In the file include/configs/smd2410.h:
... #ifdef CONFIG_AMD_LV800 #define PHYS_FLASH_SIZE 0x00100000 /* 1MB */ #define CFG_MAX_FLASH_SECT (19) /* max number of sectors on one chip */ #define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x0F0000)
#ifdef CONFIG_AMD_LV400 #define PHYS_FLASH_SIZE 0x00080000 /* 512KB */ #define CFG_MAX_FLASH_SECT (11) /* max number of sectors on one chip */ #define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x070000)
I don't know how to determine CFG_ENV_ADDR. Why does it add 0x0F0000 or 0x070000? Another question is If I save u-boot in NOR flash, can my kernel boot from NAND? or should I save u-boot in NAND?
Thank you very much.
Regards, Joe.

In message 67a3f13e0512120638m41a0cd16gedf89c6347597597@mail.gmail.com you wrote:
I don't know how to determine CFG_ENV_ADDR. Why does it add 0x0F0000 or 0x070000?
You must come up with a sector map of your flash device(s) and define which sector(s) to use for the U-Boot environment. In this case the offset of the used sector chages depending on the size of the used flash chips - it's always 0x10000 = 64 kB from the end.
Another question is If I save u-boot in NOR flash, can my kernel boot from NAND? or should I save u-boot in NAND?
Yes, you can. No, you should not.
Best regards,
Wolfgang Denk

On 12/12/05, Wolfgang Denk wrote:
In message Joe Culler wrote:
I don't know how to determine CFG_ENV_ADDR. Why does it add 0x0F0000 or 0x070000?
You must come up with a sector map of your flash device(s) and define which sector(s) to use for the U-Boot environment. In this case the offset of the used sector chages depending on the size of the used flash chips - it's always 0x10000 = 64 kB from the end.
I see, thank you for your clear explaination.
Another question is If I save u-boot in NOR flash, can my kernel boot from NAND? or should I save u-boot in NAND?
Yes, you can. No, you should not.
If I shouldn't do that, I should save u-boot in NAND instead if I want my kernel boot from NAND. But it seems to add a lot of code in include/configs/smdk2410.h?
Best regards,
Wolfgang Denk
-- Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de If God wanted me to touch my toes, he'd have put them on my knees.
Regards, Joe.
participants (2)
-
Joe Culler
-
Wolfgang Denk