From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] How to specify the size of bin?
Date: Fri, 16 May 2008 08:01:25 +0200 [thread overview]
Message-ID: <200805160801.25567.sr@denx.de> (raw)
In-Reply-To: <cdb837ea0805152231w72340d28r4ee31ee5d4d51654@mail.gmail.com>
On Friday 16 May 2008, ?? wrote:
> > 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
OK.
> >> 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!
Noooo! Please wait.
> >> 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?
Most of the boards do it this way, yes.
> 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.
This can be done too. But its not the case on Walnut.
> > 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.
No. You definitely don't need a 512k image for this setup. You just need to
flash the image at the "end" of the FLASH chip. So starting at 256k:
0...256k: Free and environment
256k...512k: U-Boot image
> 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.
See above. Don't increase the image size, but flash it with an offset of 256k.
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 at denx.de
=====================================================================
prev parent reply other threads:[~2008-05-16 6:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-16 3:26 [U-Boot-Users] How to specify the size of bin? 甜瓜
2008-05-16 4:43 ` Stefan Roese
2008-05-16 5:31 ` 甜瓜
2008-05-16 5:48 ` Wolfgang Denk
2008-05-16 6:26 ` 甜瓜
2008-05-16 8:42 ` Wolfgang Denk
2008-05-16 6:01 ` Stefan Roese [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200805160801.25567.sr@denx.de \
--to=sr@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox