[U-Boot] Question related to flash organisation

Wolfgang Denk wd at denx.de
Sat Mar 3 16:50:59 UTC 2018


Dear Christophe,

In message <31268795-2370-e5b2-5326-a5e5c41cec1a at c-s.fr> you wrote:
> On my powerpc 8xx board, I have an AM29LV160DB boot flash which is 
> organised as follows:
> - One 16kb block
> - Two 8kb block
> - One 32kb block
> - Thirty one 64kb blocks
> 
> At the time being, u-boot is a single piece occupying the 320 first 
> kbytes, then the environment is stored in the following 64kb block
> 
> The environment being quite tiny, I would like to store it in one of the 
> first small blocks. Is that feasible to have the startup .text stuff in 
> the first 16k block, then a hole for the environment then the rest of 
> .text after ?

That used to be standard at the beginning of time, i. e. even when
this was still called PPCBoot...  Check out any old version, and
look for example at the configuration of the TQM8xx boards; they all
used this.

You will need a hand-crated linker script to sort code around the
space used for the environment.  Use the TQM8xx ones as starting
point, build, resolve conflicts, study u-boot.map to optimize space
usage, iterate...

With your flash setup, I would use the two 8 KiB sectors for
redundant environment.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Stupidity, like virtue, is its own reward.


More information about the U-Boot mailing list