[U-Boot] Question related to flash organisation

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 ?
Christophe

Dear Christophe,
In message 31268795-2370-e5b2-5326-a5e5c41cec1a@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

Dear Christophe,
In message 20180303165059.A03CF2401B3@gemini.denx.de I wrote:
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.
The term we used for this configuration was "embedded environment".
Best regards,
Wolfgang Denk
participants (2)
-
Christophe LEROY
-
Wolfgang Denk