[U-Boot-Users] How to specify the size of bin?

甜瓜 littlesweetmelon at gmail.com
Fri May 16 08:26:17 CEST 2008


2008/5/16 Wolfgang Denk <wd at denx.de>:
> In message <cdb837ea0805152231w72340d28r4ee31ee5d4d51654 at mail.gmail.com> you wrote:
>> 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.
>
> Why?
>
> Do you think on devices with 128 MB flash memory  we  should  have  a
> 128MB U-Boot image?
>
> Do you see any problem with having a U-Boot image that is smaller than
> your flash device?
>
>> 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.
>
> Agreed.
>
>> 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.
>
> That's your problem, tehn. Most people use a noremal JTAG debugger
> which can prgram the image to any address in the flash.
>
> You got to add 256k of ramdom data in front of the 256 k image,  then
> [memory filled with 0xFF recommended].
haha! Great minds seem alike. Actually, if no solution, I will try this method.
Well. As you mentioned, using JTAG we can put bin in any place of flash.
Does it means we should manually set the last-4-bytes? How to determine
the exact entry point of bin? I can only see the hex value of last-4-bytes, and
it definitely does not simply jump to the beginning of bin. It should jump to
some location like "start:" in, for example, start.asm. Therefore the JTAG
user should translate "jmp start+offset" to machine code by hand. Am I right?

Last, let me tell you why I cannot use JTAG. The recommend method by u-boot
is using BDI2000. But it is really expensive. I don't have enough money. hehe.
I have tried many home-made wiggler JTAG connectors with OCD commander, but
all failed. Finally I give up for finding low-cost PPC JTAG. Currently
I give the
precompiled bin to some one with special flash writer, and let them burn.

  Best regards,
--
ShenLei




More information about the U-Boot mailing list