View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001272 | UBoot | U-Boot | public | 2012-08-24 15:57 | 2014-01-28 11:31 |
Reporter | Keller | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | N/A |
Status | resolved | Resolution | fixed | ||
Product Version | armStoneA8-V1.1 | ||||
Target Version | fss5pv210-V2.0 | Fixed in Version | fss5pv210-V2.0 | ||
Summary | 0001272: Allow a dynamic environment size depending on NAND flash type | ||||
Description | The environment should use at least two blocks in NAND to allow for at least one bad block. This requires to know the NAND blocksize. So the environment size depends on the NAND blocksize. However in standard U-Boot, the environment assumes to be configured with a constant size. So we'll need quite a few changes to fix this. | ||||
Forum Link | |||||
|
We solve this by adding three board-specific functions: get_env_size(), get_env_range(), get_env_offset(). They return the values that reflect the current NAND setup. Before the environment can be read from NAND, the default environment is used as temporary environment. To avoid calls to our three functions this early (this is before the .bss area even is cleared), we store the environment size in the new entry env_size in the global data during this phase. We also have to modify env_t so that it does not include the data part anymore. This requires changes to env_embedded.c. The host-side tool envcrc can't be built with such a dynamic environment size, so we have excluded it from built if the environment is in NAND as in our case. This commit only changes the environment in those parts that affect the F&S boards. To fully support all possible settings for the environment would require quite a few more changes. |