
2008/5/16 Stefan Roese sr@denx.de:
On Friday 16 May 2008, 甜瓜 wrote:
I know it is a newbie question. Any hint from you are welcome.
In default, u-boot 1.1.5, "make walut_config && make all" will generate a 256KB bin. The last 4 bytes of the bin is a jump instruction to the entry point of u-boot.Is that right?
Yes, this is correct.
But my ppc405GP walnut board has 512KB flash for holding u-boot.
All Walnut boards have 512k of NOR FLASH. Do you really have an original IBM/AMCC Walnut or a different custom 405GP board?
Yes, my board is a custom board DHT-Walut with 32MB SDRAM and 512k of boot flash AMD 29LV040B. Details are listed in: http://elinux.org/DHT-Walnut
I wonder how to build a 512KB bin?
Generally this is possible. You need to change CONFIG_MONITOR_LEN & CFG_MONITOR_BASE in include/configs/walnut.h. And TEXT_BASE in board/amcc/walnut/config.mk.
Thank you very much. That's exact what I need!
Is there any OPTION/SETTING targeting this problem? Anything else I should take care?
But please don't forget that the environment is also stored in the NOR FLASH. And by changing the U-Boot size to 512k you leave no space for the environment.
Do you mean that environment settings (eg: ip_addr, ethaddr...) are stored sperately from the bin? In my mind (with guess :p), env should be defined in bin code or data section, and it will be compiled together with other codes to form a single bin.
So why exactly do you want to change the U-Boot image size?
Well. The reason is: 1. Both default config of u-boot and a DHT-Walut-patched config generate 256KB bin, but the flash on board is 512KB. So I think I should get a 512KB bin for flash writing. 2. The contents in the flash on my board is totally corrupted by accident. It means the important last-4-bytes should be rewritten to a proper state. 3. Currenly, I have to use special hardware to write bin into flash. Therefore 256KB bin will only overwrite the first half. The last-4-bytes in the end of flash is still the old value. Booting will definitely fail.
Best regards, Stefan
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de =====================================================================
Thank you for your reply. --- ShenLei