mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2025-12-10 07:44:53 +01:00
ipq806x: Customized environment size handling
To save space in NOR flash, environment loading from flash is handled differently for NOR and NAND. The size for NOR flash environment is taken from partition size itself. Change-Id: I588471b679fad0e96b836d43dc1a0136c5400fc1 Signed-off-by: Antony Arun T <antothom@codeaurora.org>
This commit is contained in:
parent
e703375fa3
commit
1279dad923
2 changed files with 9 additions and 0 deletions
|
|
@ -633,6 +633,11 @@ char *getenv(const char *name)
|
|||
hsearch_r(e, FIND, &ep, &env_htab, 0);
|
||||
|
||||
return ep ? ep->data : NULL;
|
||||
} else {
|
||||
#ifdef CONFIG_ENV_SIZE_MAX
|
||||
/* for first time set maximum */
|
||||
#define CONFIG_ENV_SIZE CONFIG_ENV_SIZE_MAX
|
||||
#endif
|
||||
}
|
||||
|
||||
/* restricted capabilities before import */
|
||||
|
|
|
|||
|
|
@ -153,6 +153,10 @@ extern char *env_name_spec;
|
|||
#define ENV_SIZE (CONFIG_ENV_RANGE - ENV_HEADER_SIZE)
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_ENV_SIZE_MAX
|
||||
#define CONFIG_ENV_SIZE_MAX CONFIG_ENV_SIZE
|
||||
#endif
|
||||
|
||||
typedef struct environment_s {
|
||||
uint32_t crc; /* CRC32 over data bytes */
|
||||
#ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue