
Thanks Scott, that helped alot... i think I understand a bit more..
I have tried to change the value of TEXT_BASE to (xFFF8_0000) in the config.mk file(and other entries) but I must not be doing something else right..
What specifically happened when you tried changing TEXT_BASE?
ok, I set TEXT_BASE to 0xFFF8_000 and it creates the 512kB u-boot.bin image just fine...
You should write it to the end of flash.
Yep, I think that was my issue all along.. I was always writing images to the beginning of the flash.. If I write the file to the last 512KB of the flash, it boots fine now...
The size of your image is going to be RESET_VECTOR_ADDRESS - TEXT_BASE
- Note that TEXT_BASE/RESET_VECTOR_ADDRESS should be set to the
appropriate offset from where u-boot puts the flash. This isn't necessarily where the hardware maps the flash on power-on, though from your board config it doesn't look like you move it.
#define CONFIG_SYS_FLASH_BASE 0xfe000000 /* start of FLASH 8M */
4M flash or 8M?
yep it is just 4M... I moved the BASE to 0xFFC0_0000 and will correct comments.. (wasn't worried about comments yet...)
#define CONFIG_SYS_LBC_FLASH_BASE CONFIG_SYS_FLASH_BASE
/*Chip select 0 - Flash*/ #define CONFIG_SYS_BR0_PRELIM 0xfe001001 #define CONFIG_SYS_OR0_PRELIM 0xfe006ff7
This is configuring the flash window for 32M... It should be harmless, though -- the flash contents should just repeat within that window.
Changed these to 0xFFCxxxxxxx so it is just 4M now...
SET_LAW(CONFIG_SYS_LBC_FLASH_BASE, LAW_SIZE_16M,
LAW_TRGT_IF_LBC),
This looks like a problem -- you're setting the flash LAW to be only 16M, but the window is 32M... Either change TEXT_BASE/RESET_VECTOR_ADDRESS to be within the LAW, or extend/move the LAW.
Flash base is at 0xFFC0_0000 now, so I changed it to 4M law size...
with these changes, it seems to work just fine if I put the u-boot image in the last 512kB of the 4M flash..... which is great, thanks!!
Is it possible to change TEXT_BASE and RESET_VECTOR_ADDRESS in such a way that I can put the 512kB uboot image at the beginning of the 4M flash instead of the end??
Bob