View Issue Details

IDProjectCategoryView StatusLast Update
0001272UBootU-Bootpublic2014-01-28 11:31
ReporterKeller Assigned To 
PrioritynormalSeverityminorReproducibilityN/A
Status resolvedResolutionfixed 
Product VersionarmStoneA8-V1.1 
Target Versionfss5pv210-V2.0Fixed in Versionfss5pv210-V2.0 
Summary0001272: Allow a dynamic environment size depending on NAND flash type
DescriptionThe 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

Activities

Keller

2012-08-24 17:07

manager   ~0000776

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.