Some more env fixes
PATCH 2/14 env: sf: Use ENV_VALID enum names instead of literals
In reply to Marek BehúnFrom: Marek Behún <[email protected]>
The function env_sf_init_addr() assigns number literals (1) instead of ENV_VALID to gd->env_valid. Fix this.
--- env/sf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
env/sf.c +2 -2
@@ -339,10 +339,10 @@ static int env_sf_init_addr(void)if (crc32 (0 , env_ptr->data,ENV_SIZE ) == env_ptr->crc) { gd->env_addr = (ulong)&(env_ptr->data); - gd->env_valid =1 ; + gd->env_valid =ENV_VALID ; }else { gd->env_addr = (ulong)&default_environment[0 ]; - gd->env_valid =1 ; + gd->env_valid =ENV_VALID ; }return 0 ;
Signature · 1 line
2.32.0
cover Some more env fixes
From: Marek Behún <[email protected]>
Hello Tom, Simon and others,
here are some various fixes for env. More are to follow after this, the code is horrible and I want to implement something there.
Marek Behún (14):
env: sf: Cosmetic fix in env_sf_init_addr()
env: sf: Use ENV_VALID enum names instead of literals
env: sf: Put ENV_INVALID into gd->env_valid on CRC failure
env: nand: Put ENV_INVALID into gd->env_valid if default environment
env: nvram: Let generic env_init() assign default environment
env: nvram: Cosmetic fix in env_nvram_init()
env: nowhere: Let generic env_init() assign default environment
env: nowhere: Cosmetic fix
env: flash: Let generic env_init() assign default environment
env: flash: Cosmetic fix
board: synquacer: developerbox: Don't set gd->env_addr to
default_environment
board: freescale: various boards: Let env subsystem set gd->env_addr
env: Always use char for default_environment
env: Use static_assert() to check if default_environment is too large
board/Marvell/mvebu_armada-37xx/board.c | 2 +- board/freescale/ls1012afrdm/ls1012afrdm.c | 4 ---- board/freescale/ls1012aqds/ls1012aqds.c | 4 ---- board/freescale/ls1012ardb/ls1012ardb.c | 4 ---- board/freescale/ls1028a/ls1028a.c | 4 ---- board/freescale/ls1088a/ls1088a.c | 4 ---- board/freescale/ls2080aqds/ls2080aqds.c | 3 --- board/freescale/ls2080ardb/ls2080ardb.c | 3 --- board/freescale/lx2160a/lx2160a.c | 3 --- board/socionext/developerbox/developerbox.c | 2 -- env/common.c | 11 +++-------- env/flash.c | 5 +---- env/nand.c | 3 +-- env/nowhere.c | 5 ++--- env/nvram.c | 7 +++---- env/sf.c | 7 +++---- include/env_default.h | 10 ++++++++-- include/env_internal.h | 4 ++-- 18 files changed, 24 insertions(+), 61 deletions(-)
Signature · 1 line
2.32.0
PATCH 1/14 env: sf: Cosmetic fix in env_sf_init_addr()
From: Marek Behún <[email protected]>
In the if clause we use tabs and in the else clause spaces. Let's use spaces in the if clause too.
--- env/sf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
env/sf.c +2 -2
@@ -338,8 +338,8 @@ static int env_sf_init_addr(void)env_t *env_ptr = (env_t *)env_sf_get_env_addr ();if (crc32 (0 , env_ptr->data,ENV_SIZE ) == env_ptr->crc) { - gd->env_addr = (ulong)&(env_ptr->data); - gd->env_valid =1 ; + gd->env_addr = (ulong)&(env_ptr->data); + gd->env_valid =1 ; }else { gd->env_addr = (ulong)&default_environment[0 ]; gd->env_valid =1 ;
Signature · 1 line
2.32.0
PATCH 3/14 env: sf: Put ENV_INVALID into gd->env_valid on CRC failure
In reply to Marek BehúnFrom: Marek Behún <[email protected]>
env_sf_init_addr() says the environment is valid even if it is assigning default environment due to CRC failure. Change this to ENV_INVALID and let the generic env_init() function, which calls this initializer, assign the default environment.
--- env/sf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
env/sf.c +1 -2
@@ -341,8 +341,7 @@ static int env_sf_init_addr(void) gd->env_addr = (ulong)&(env_ptr->data); gd->env_valid =ENV_VALID ; }else { - gd->env_addr = (ulong)&default_environment[0 ]; - gd->env_valid =ENV_VALID ; + gd->env_valid =ENV_INVALID ; }return 0 ;
Signature · 1 line
2.32.0
PATCH 4/14 env: nand: Put ENV_INVALID into gd->env_valid if default environment
In reply to Marek BehúnFrom: Marek Behún <[email protected]>
env_nand_init() says the environment is valid even if it is assigning default environment due to not being able to access nand pre-reloaction (determined by macro values). Change this to ENV_INVALID and let the generic env_init() function, which calls this initializer, assign the default environment.
--- env/nand.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
env/nand.c +1 -2
@@ -107,8 +107,7 @@ static int env_nand_init(void) gd->env_addr = (ulong )env_ptr->data;#else /* ENV_IS_EMBEDDED || CONFIG_NAND_ENV_DST */ - gd->env_addr = (ulong)&default_environment[0 ]; - gd->env_valid =ENV_VALID ; + gd->env_valid =ENV_INVALID ;#endif /* ENV_IS_EMBEDDED || CONFIG_NAND_ENV_DST */ return 0 ;
Signature · 1 line
2.32.0
PATCH 5/14 env: nvram: Let generic env_init() assign default environment
In reply to Marek BehúnFrom: Marek Behún <[email protected]>
env_nvram_init() assigns default environment if ENV_INVALID, but this is done in the generic env_init() function, which calls this initializer, so drop it from here.
--- env/nvram.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
env/nvram.c +1 -2
@@ -94,8 +94,7 @@ static int env_nvram_init(void)#endif gd->env_valid =ENV_VALID ; }else { - gd->env_addr = (ulong)&default_environment[0 ]; - gd->env_valid =ENV_INVALID ; + gd->env_valid =ENV_INVALID ; }return 0 ;
Signature · 1 line
2.32.0
PATCH 9/14 env: flash: Let generic env_init() assign default environment
In reply to Marek BehúnFrom: Marek Behún <[email protected]>
env_flash_init() (both implementations) assigns default environment if ENV_INVALID, but this is done in the generic env_init() function, which calls this initializer, so drop it from here.
--- env/flash.c | 3 --- 1 file changed, 3 deletions(-)
env/flash.c +0 -3
@@ -77,7 +77,6 @@ static int env_flash_init(void)uchar flag1 = flash_addr->flags;uchar flag2 = flash_addr_new->flags; -ulong addr_default = (ulong)&default_environment[0 ];ulong addr1 = (ulong)&(flash_addr->data);ulong addr2 = (ulong)&(flash_addr_new->data);
@@ -92,7 +91,6 @@ static int env_flash_init(void) gd->env_addr = addr2; gd->env_valid =ENV_VALID ; }else if (!crc1_ok && !crc2_ok) { - gd->env_addr = addr_default; gd->env_valid =ENV_INVALID ; }else if (flag1 ==ENV_REDUND_ACTIVE && flag2 ==ENV_REDUND_OBSOLETE ) {
@@ -231,7 +229,6 @@ static int env_flash_init(void)return 0 ; } - gd->env_addr = (ulong)&default_environment[0 ]; gd->env_valid =ENV_INVALID ;return 0 ; }
Signature · 1 line
2.32.0
PATCH 6/14 env: nvram: Cosmetic fix in env_nvram_init()
In reply to Marek BehúnFrom: Marek Behún <[email protected]>
Use spaces consistently in assignments instead of tabs.
--- env/nvram.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
env/nvram.c +2 -2
@@ -87,10 +87,10 @@ static int env_nvram_init(void)nvram_read (data,CONFIG_ENV_ADDR +sizeof (ulong),ENV_SIZE );if (crc32 (0 , data,ENV_SIZE ) == crc) { - gd->env_addr = (ulong )CONFIG_ENV_ADDR +sizeof (long ); + gd->env_addr = (ulong )CONFIG_ENV_ADDR +sizeof (long );#else if (crc32 (0 , env_ptr->data,ENV_SIZE ) == env_ptr->crc) { - gd->env_addr = (ulong)&env_ptr->data; + gd->env_addr = (ulong)&env_ptr->data;#endif gd->env_valid =ENV_VALID ; }else {
Signature · 1 line
2.32.0
PATCH 7/14 env: nowhere: Let generic env_init() assign default environment
In reply to Marek BehúnFrom: Marek Behún <[email protected]>
env_nowhere_init() assigns default environment if ENV_INVALID, but this is done in the generic env_init() function, which calls this initializer, so drop it from here.
--- env/nowhere.c | 1 - 1 file changed, 1 deletion(-)
env/nowhere.c +0 -1
@@ -22,7 +22,6 @@ DECLARE_GLOBAL_DATA_PTR;*/ static int env_nowhere_init (void ) { - gd->env_addr = (ulong)&default_environment[0 ]; gd->env_valid =ENV_INVALID ;return 0 ;
Signature · 1 line
2.32.0
PATCH 8/14 env: nowhere: Cosmetic fix
In reply to Marek BehúnFrom: Marek Behún <[email protected]>
Use spaces instead of tabs in assignments, since there are no lines to align assignment values to.
--- env/nowhere.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
env/nowhere.c +2 -2
@@ -22,7 +22,7 @@ DECLARE_GLOBAL_DATA_PTR;*/ static int env_nowhere_init (void ) { - gd->env_valid =ENV_INVALID ; + gd->env_valid =ENV_INVALID ;return 0 ; }
@@ -37,7 +37,7 @@ static int env_nowhere_load(void)if (!IS_ENABLED (CONFIG_SPL_BUILD ))env_set_default (NULL ,0 ); - gd->env_valid =ENV_INVALID ; + gd->env_valid =ENV_INVALID ;return 0 ; }
Signature · 1 line
2.32.0
PATCH 10/14 env: flash: Cosmetic fix
In reply to Marek BehúnFrom: Marek Behún <[email protected]>
Change tab to space in env_flash_init().
--- env/flash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
env/flash.c +1 -1
@@ -229,7 +229,7 @@ static int env_flash_init(void) return 0; } - gd->env_valid =ENV_INVALID ; + gd->env_valid =ENV_INVALID ;return 0 ; }#endif
Signature · 1 line
2.32.0
PATCH 11/14 board: synquacer: developerbox: Don't set gd->env_addr to default_environment
In reply to Marek BehúnFrom: Marek Behún <[email protected]>
This board sets gd->env_addr to default_environment in board_init(), but the board has environment in SPI flash according to defconfig. Let the env API handle environment automatically.
--- board/socionext/developerbox/developerbox.c | 2 -- 1 file changed, 2 deletions(-)
board/socionext/developerbox/developerbox.c +0 -2
@@ -82,8 +82,6 @@ int board_init(void) { gd->bd->bi_boot_params =CONFIG_SYS_LOAD_ADDR +LOAD_OFFSET ; - gd->env_addr = (ulong)&default_environment[0 ]; -synquacer_setup_scbm_smmu ();return 0 ;
Signature · 1 line
2.32.0
PATCH 12/14 board: freescale: various boards: Let env subsystem set gd->env_addr
In reply to Marek BehúnFrom: Marek Behún <[email protected]>
Various freescale boards set gd->env_addr to default_environment in board_init(), conditional on CONFIG_ENV_IS_NOWHERE, but this is redundant, since it is done by env_init() before board_init() is called.
Let the env subsystem handle this.
--- board/freescale/ls1012afrdm/ls1012afrdm.c | 4 ---- board/freescale/ls1012aqds/ls1012aqds.c | 4 ---- board/freescale/ls1012ardb/ls1012ardb.c | 4 ---- board/freescale/ls1028a/ls1028a.c | 4 ---- board/freescale/ls1088a/ls1088a.c | 4 ---- board/freescale/ls2080aqds/ls2080aqds.c | 3 --- board/freescale/ls2080ardb/ls2080ardb.c | 3 --- board/freescale/lx2160a/lx2160a.c | 3 --- 8 files changed, 29 deletions(-)
board/freescale/ls1012afrdm/ls1012afrdm.c +0 -4
@@ -172,10 +172,6 @@ int board_init(void)if (current_el () ==3 )out_le32 (&cci->ctrl_ord,CCI400_CTRLORD_EN_BARRIER ); -#ifdef CONFIG_ENV_IS_NOWHERE - gd->env_addr = (ulong)&default_environment[0 ]; -#endif -#ifdef CONFIG_FSL_CAAM sec_init ();#endif
board/freescale/ls1012aqds/ls1012aqds.c +0 -4
@@ -150,10 +150,6 @@ int board_init(void)erratum_a010315 ();#endif -#ifdef CONFIG_ENV_IS_NOWHERE - gd->env_addr = (ulong)&default_environment[0 ]; -#endif -#ifdef CONFIG_FSL_CAAM sec_init ();#endif
board/freescale/ls1012ardb/ls1012ardb.c +0 -4
@@ -173,10 +173,6 @@ int board_init(void)erratum_a010315 ();#endif -#ifdef CONFIG_ENV_IS_NOWHERE - gd->env_addr = (ulong)&default_environment[0 ]; -#endif -#ifdef CONFIG_FSL_CAAM sec_init ();#endif
board/freescale/ls1028a/ls1028a.c +0 -4
@@ -73,10 +73,6 @@ u32 get_lpuart_clk(void)int board_init (void ) { -#ifdef CONFIG_ENV_IS_NOWHERE - gd->env_addr = (ulong)&default_environment[0 ]; -#endif -#ifdef CONFIG_FSL_CAAM sec_init ();#endif
board/freescale/ls1088a/ls1088a.c +0 -4
@@ -810,10 +810,6 @@ int board_init(void)select_i2c_ch_pca9547 (I2C_MUX_CH_DEFAULT ,0 );board_retimer_init (); -#ifdef CONFIG_ENV_IS_NOWHERE - gd->env_addr = (ulong)&default_environment[0 ]; -#endif -#if defined(CONFIG_TARGET_LS1088ARDB ) && defined(CONFIG_FSL_MC_ENET )/* invert AQR105 IRQ pins polarity */ out_le32 (irq_ccsr +IRQCR_OFFSET /4 ,AQR105_IRQ_MASK );
board/freescale/ls2080aqds/ls2080aqds.c +0 -3
@@ -211,9 +211,6 @@ int board_init(void) FSL_QIXIS_BRDCFG9_QSPI);#endif -#ifdef CONFIG_ENV_IS_NOWHERE - gd->env_addr = (ulong)&default_environment[0 ]; -#endif select_i2c_ch_pca9547 (I2C_MUX_CH_DEFAULT ,0 );#ifdef CONFIG_RTC_ENABLE_32KHZ_OUTPUT
board/freescale/ls2080ardb/ls2080ardb.c +0 -3
@@ -281,9 +281,6 @@ int board_init(void)init_final_memctl_regs (); -#ifdef CONFIG_ENV_IS_NOWHERE - gd->env_addr = (ulong)&default_environment[0 ]; -#endif select_i2c_ch_pca9547 (I2C_MUX_CH_DEFAULT ,0 );#ifdef CONFIG_FSL_QIXIS
board/freescale/lx2160a/lx2160a.c +0 -3
@@ -588,9 +588,6 @@ int board_init(void)#if defined(CONFIG_FSL_MC_ENET ) && defined(CONFIG_TARGET_LX2160ARDB )u32 __iomem *irq_ccsr = (u32 __iomem *)ISC_BASE ;#endif -#ifdef CONFIG_ENV_IS_NOWHERE - gd->env_addr = (ulong)&default_environment[0 ]; -#endif select_i2c_ch_pca9547 (I2C_MUX_CH_DEFAULT ,0 );
Signature · 1 line
2.32.0
PATCH 13/14 env: Always use char for default_environment
In reply to Marek BehúnFrom: Marek Behún <[email protected]>
Sometimes we use uchar and sometimes char for the default environment array. By always using char, we can get rid of some explicit casts.
--- board/Marvell/mvebu_armada-37xx/board.c | 2 +- env/common.c | 6 +++--- include/env_default.h | 4 ++-- include/env_internal.h | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-)
board/Marvell/mvebu_armada-37xx/board.c +1 -1
@@ -87,7 +87,7 @@ int board_init(void)#ifdef CONFIG_BOARD_LATE_INIT int board_late_init (void ) { -char *ptr = (char *)&default_environment[0 ]; +char *ptr = &default_environment[0 ];struct udevice *dev;struct mmc *mmc_dev;bool ddr4, emmc;
env/common.c +3 -3
@@ -162,7 +162,7 @@ int env_get_f(const char *name, char *buf, unsigned len) name_len =strlen (name);if (gd->env_valid ==ENV_INVALID ) - env = (const char *)default_environment; + env = default_environment;else env = (const char *)gd->env_addr;
@@ -264,7 +264,7 @@ void env_set_default(const char *s, int flags) } flags |=H_DEFAULT ; -if (himport_r (&env_htab, (char *)default_environment, +if (himport_r (&env_htab, default_environment,sizeof (default_environment),'\0' , flags,0 ,0 ,NULL ) ==0 ) pr_err("## Error: Environment import failed: errno = %d\n",
@@ -283,7 +283,7 @@ int env_set_default_vars(int nvars, char * const vars[], int flags)* (and use \0 as a separator) */ flags |=H_NOCLEAR |H_DEFAULT ; -return himport_r (&env_htab, (const char *)default_environment, +return himport_r (&env_htab, default_environment,sizeof (default_environment),'\0' , flags,0 , nvars, vars); }
include/env_default.h +2 -2
@@ -20,9 +20,9 @@ env_t embedded_environment __UBOOT_ENV_SECTION__(environment) = {#elif defined(DEFAULT_ENV_INSTANCE_STATIC ) static char default_environment[] = {#elif defined(DEFAULT_ENV_IS_RW ) -uchar default_environment[] = { +char default_environment[] = {#else -const uchar default_environment[] = { +const char default_environment[] = {#endif #ifndef CONFIG_USE_DEFAULT_ENV_FILE #ifdef CONFIG_ENV_CALLBACK_LIST_DEFAULT
include/env_internal.h +2 -2
@@ -112,9 +112,9 @@ extern env_t embedded_environment;#endif /* ENV_IS_EMBEDDED */ #ifdef DEFAULT_ENV_IS_RW -extern unsigned char default_environment[]; +extern char default_environment[];#else -extern const unsigned char default_environment[]; +extern const char default_environment[];#endif #ifndef DO_DEPS_ONLY
Signature · 1 line
2.32.0
PATCH 14/14 env: Use static_assert() to check if default_environment is too large
In reply to Marek BehúnFrom: Marek Behún <[email protected]>
Check sizeof(default_environment) against ENV_SIZE in a static_assert() instead of runtime.
Only check if !USE_HOSTCC (for in fw_env tool ENV_SIZE expands to a variable, and cannot be checked statically) nad !DEFAULT_ENV_INSTANCE_EMBEDDED, for in that case the default_environment variable is not set.
--- env/common.c | 5 ----- include/env_default.h | 6 ++++++ 2 files changed, 6 insertions(+), 5 deletions(-)
env/common.c +0 -5
@@ -247,11 +247,6 @@ char *env_get_default(const char *name)void env_set_default (const char *s,int flags) { -if (sizeof (default_environment) >ENV_SIZE ) { -puts ("*** Error - default environment is too large\n\n" ); -return ; - } -if (s) {if ((flags &H_INTERACTIVE ) ==0 ) { printf("*** Warning - %s, "
include/env_default.h +6 -0
@@ -121,3 +121,9 @@ const char default_environment[] = { }#endif }; + +#if !defined(USE_HOSTCC ) && !defined(DEFAULT_ENV_INSTANCE_EMBEDDED ) +#include <env_internal.h> +static_assert (sizeof (default_environment) <=ENV_SIZE , +"Default environment is too large" ); +#endif
Signature · 1 line
2.32.0
Re: [PATCH 01/14] env: sf: Cosmetic fix in env_sf_init_addr()
In reply to Marek BehúnQuoted 10 lines · Marek Behún
From: Marek Behún <[email protected]>
In the if clause we use tabs and in the else clause spaces. Let's use spaces in the if clause too.
Signed-off-by Marek Behún <[email protected]>--- env/sf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Re: [PATCH 08/14] env: nowhere: Cosmetic fix
In reply to Marek BehúnQuoted 10 lines · Marek Behún
From: Marek Behún <[email protected]>
Use spaces instead of tabs in assignments, since there are no lines to align assignment values to.
Signed-off-by Marek Behún <[email protected]>--- env/nowhere.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Re: [PATCH 04/14] env: nand: Put ENV_INVALID into gd->env_valid if default environment
In reply to Marek BehúnQuoted 9 lines · Marek Behún
From: Marek Behún <[email protected]>
env_nand_init()says the environment is valid even if it is assigning default environment due to not being able to access nand pre-reloaction (determined by macro values). Change this toENV_INVALIDand let the genericenv_init()function, which calls this initializer, assign the default environment.
Quoted 5 lines
Signed-off-by Marek Behún <[email protected]>--- env/nand.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Re: [PATCH 10/14] env: flash: Cosmetic fix
In reply to Marek BehúnQuoted 10 lines · Marek Behún
From: Marek Behún <[email protected]>
Change tab to space in
env_flash_init().Signed-off-by Marek Behún <[email protected]>--- env/flash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Feel free to do these code-style all in one patch in the future.
Re: [PATCH 11/14] board: synquacer: developerbox: Don't set gd->env_addr to default_environment
In reply to Marek BehúnQuoted 7 lines · Marek Behún
From: Marek Behún <[email protected]>
This board sets
gd->env_addrtodefault_environmentinboard_init(), but the board has environment in SPI flash according to defconfig. Let the env API handle environment automatically.
Quoted 5 lines
Signed-off-by Marek Behún <[email protected]>Cc Masami Hiramatsu <[email protected]>--- board/socionext/developerbox/developerbox.c | 2 -- 1 file changed, 2 deletions(-)
Re: [PATCH 12/14] board: freescale: various boards: Let env subsystem set gd->env_addr
In reply to Marek BehúnQuoted 13 lines · Marek Behún
From: Marek Behún <[email protected]>
Various freescale boards set
gd->env_addrtodefault_environmentinboard_init(), conditional onCONFIG_ENV_IS_NOWHERE, but this is redundant, since it is done byenv_init()beforeboard_init()is called.Let the env subsystem handle this.
Signed-off-by Marek Behún <[email protected]>Cc Ramon Fried <[email protected]>Cc Priyanka Jain <[email protected]>Cc Mian Yousaf Kaukab <[email protected]>
Quoted 10 lines
--- board/freescale/ls1012afrdm/ls1012afrdm.c | 4 ---- board/freescale/ls1012aqds/ls1012aqds.c | 4 ---- board/freescale/ls1012ardb/ls1012ardb.c | 4 ---- board/freescale/ls1028a/ls1028a.c | 4 ---- board/freescale/ls1088a/ls1088a.c | 4 ---- board/freescale/ls2080aqds/ls2080aqds.c | 3 --- board/freescale/ls2080ardb/ls2080ardb.c | 3 --- board/freescale/lx2160a/lx2160a.c | 3 --- 8 files changed, 29 deletions(-)
Re: [PATCH 13/14] env: Always use char for default_environment
In reply to Marek BehúnQuoted 6 lines · Marek Behún
From: Marek Behún <[email protected]>
Sometimes we use uchar and sometimes char for the default environment array. By always using char, we can get rid of some explicit casts.
Quoted 7 lines
Signed-off-by Marek Behún <[email protected]>--- board/Marvell/mvebu_armada-37xx/board.c | 2 +- env/common.c | 6 +++--- include/env_default.h | 4 ++-- include/env_internal.h | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-)
Re: [PATCH 09/14] env: flash: Let generic env_init() assign default environment
In reply to Marek BehúnQuoted 12 lines · Marek Behún
From: Marek Behún <[email protected]>
env_flash_init()(both implementations) assigns default environment ifENV_INVALID, but this is done in the genericenv_init()function, which calls this initializer, so drop it from here.Signed-off-by Marek Behún <[email protected]>--- env/flash.c | 3 --- 1 file changed, 3 deletions(-)
Re: [PATCH 14/14] env: Use static_assert() to check if default_environment is too large
In reply to Marek BehúnQuoted 10 lines · Marek Behún
From: Marek Behún <[email protected]>
Check
sizeof(default_environment)againstENV_SIZEin astatic_assert()instead of runtime.
Only check if !USE_HOSTCC (for infw_envtoolENV_SIZEexpands to a variable, and cannot be checked statically) nad !DEFAULT_ENV_INSTANCE_EMBEDDED, for in that case thedefault_environmentvariable is not set.
Quoted 5 lines
Signed-off-by Marek Behún <[email protected]>--- env/common.c | 5 ----- include/env_default.h | 6 ++++++ 2 files changed, 6 insertions(+), 5 deletions(-)
Re: [PATCH 07/14] env: nowhere: Let generic env_init() assign default environment
In reply to Marek BehúnQuoted 12 lines · Marek Behún
From: Marek Behún <[email protected]>
env_nowhere_init()assigns default environment ifENV_INVALID, but this is done in the genericenv_init()function, which calls this initializer, so drop it from here.Signed-off-by Marek Behún <[email protected]>--- env/nowhere.c | 1 - 1 file changed, 1 deletion(-)
Re: [PATCH 03/14] env: sf: Put ENV_INVALID into gd->env_valid on CRC failure
In reply to Marek BehúnQuoted 8 lines · Marek Behún
From: Marek Behún <[email protected]>
env_sf_init_addr()says the environment is valid even if it is assigning default environment due to CRC failure. Change this toENV_INVALIDand let the genericenv_init()function, which calls this initializer, assign the default environment.
Quoted 4 lines
Signed-off-by Marek Behún <[email protected]>--- env/sf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Re: [PATCH 05/14] env: nvram: Let generic env_init() assign default environment
In reply to Marek BehúnQuoted 12 lines · Marek Behún
From: Marek Behún <[email protected]>
env_nvram_init()assigns default environment ifENV_INVALID, but this is done in the genericenv_init()function, which calls this initializer, so drop it from here.Signed-off-by Marek Behún <[email protected]>--- env/nvram.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Re: [PATCH 02/14] env: sf: Use ENV_VALID enum names instead of literals
In reply to Marek BehúnQuoted 11 lines · Marek Behún
From: Marek Behún <[email protected]>
The function
env_sf_init_addr()assigns number literals (1) instead ofENV_VALIDtogd->env_valid. Fix this.Signed-off-by Marek Behún <[email protected]>--- env/sf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Re: [PATCH 06/14] env: nvram: Cosmetic fix in env_nvram_init()
In reply to Marek BehúnQuoted 10 lines · Marek Behún
From: Marek Behún <[email protected]>
Use spaces consistently in assignments instead of tabs.
Signed-off-by Marek Behún <[email protected]>--- env/nvram.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Simon Glass
Reviewed-byRe: [PATCH 14/14] env: Use static_assert() to check if default_environment is too large
In reply to Simon GlassQuoted 10 lines · Marek Behún
From: Marek Behún <[email protected]>
Check
sizeof(default_environment)againstENV_SIZEin astatic_assert()instead of runtime.
Only check if !USE_HOSTCC (for infw_envtoolENV_SIZEexpands to a variable, and cannot be checked statically) nad !DEFAULT_ENV_INSTANCE_EMBEDDED, for in that case thedefault_environmentvariable is not set.
Quoted 5 lines
Signed-off-by Marek Behún <[email protected]>--- env/common.c | 5 ----- include/env_default.h | 6 ++++++ 2 files changed, 6 insertions(+), 5 deletions(-)
Applied to u-boot-dm, thanks!
Simon Glass
Reviewed-byRe: [PATCH 13/14] env: Always use char for default_environment
In reply to Simon GlassQuoted 6 lines · Marek Behún
From: Marek Behún <[email protected]>
Sometimes we use uchar and sometimes char for the default environment array. By always using char, we can get rid of some explicit casts.
Quoted 7 lines
Signed-off-by Marek Behún <[email protected]>--- board/Marvell/mvebu_armada-37xx/board.c | 2 +- env/common.c | 6 +++--- include/env_default.h | 4 ++-- include/env_internal.h | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-)
Applied to u-boot-dm, thanks!
Simon Glass
Reviewed-byRe: [PATCH 12/14] board: freescale: various boards: Let env subsystem set gd->env_addr
In reply to Simon GlassQuoted 13 lines · Marek Behún
From: Marek Behún <[email protected]>
Various freescale boards set
gd->env_addrtodefault_environmentinboard_init(), conditional onCONFIG_ENV_IS_NOWHERE, but this is redundant, since it is done byenv_init()beforeboard_init()is called.Let the env subsystem handle this.
Signed-off-by Marek Behún <[email protected]>Cc Ramon Fried <[email protected]>Cc Priyanka Jain <[email protected]>Cc Mian Yousaf Kaukab <[email protected]>
Quoted 10 lines
--- board/freescale/ls1012afrdm/ls1012afrdm.c | 4 ---- board/freescale/ls1012aqds/ls1012aqds.c | 4 ---- board/freescale/ls1012ardb/ls1012ardb.c | 4 ---- board/freescale/ls1028a/ls1028a.c | 4 ---- board/freescale/ls1088a/ls1088a.c | 4 ---- board/freescale/ls2080aqds/ls2080aqds.c | 3 --- board/freescale/ls2080ardb/ls2080ardb.c | 3 --- board/freescale/lx2160a/lx2160a.c | 3 --- 8 files changed, 29 deletions(-)
Applied to u-boot-dm, thanks!
Simon Glass
Reviewed-byRe: [PATCH 10/14] env: flash: Cosmetic fix
In reply to Simon GlassQuoted 10 lines · Marek Behún
From: Marek Behún <[email protected]>
Change tab to space in
env_flash_init().Signed-off-by Marek Behún <[email protected]>--- env/flash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Feel free to do these code-style all in one patch in the future.
Applied to u-boot-dm, thanks!
Simon Glass
Reviewed-byRe: [PATCH 08/14] env: nowhere: Cosmetic fix
In reply to Simon GlassQuoted 10 lines · Marek Behún
From: Marek Behún <[email protected]>
Use spaces instead of tabs in assignments, since there are no lines to align assignment values to.
Signed-off-by Marek Behún <[email protected]>--- env/nowhere.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Applied to u-boot-dm, thanks!
Simon Glass
Reviewed-byRe: [PATCH 07/14] env: nowhere: Let generic env_init() assign default environment
In reply to Simon GlassQuoted 12 lines · Marek Behún
From: Marek Behún <[email protected]>
env_nowhere_init()assigns default environment ifENV_INVALID, but this is done in the genericenv_init()function, which calls this initializer, so drop it from here.Signed-off-by Marek Behún <[email protected]>--- env/nowhere.c | 1 - 1 file changed, 1 deletion(-)
Applied to u-boot-dm, thanks!
Simon Glass
Reviewed-byRe: [PATCH 05/14] env: nvram: Let generic env_init() assign default environment
In reply to Simon GlassQuoted 12 lines · Marek Behún
From: Marek Behún <[email protected]>
env_nvram_init()assigns default environment ifENV_INVALID, but this is done in the genericenv_init()function, which calls this initializer, so drop it from here.Signed-off-by Marek Behún <[email protected]>--- env/nvram.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Applied to u-boot-dm, thanks!
Simon Glass
Reviewed-byRe: [PATCH 04/14] env: nand: Put ENV_INVALID into gd->env_valid if default environment
In reply to Simon GlassQuoted 9 lines · Marek Behún
From: Marek Behún <[email protected]>
env_nand_init()says the environment is valid even if it is assigning default environment due to not being able to access nand pre-reloaction (determined by macro values). Change this toENV_INVALIDand let the genericenv_init()function, which calls this initializer, assign the default environment.
Quoted 5 lines
Signed-off-by Marek Behún <[email protected]>--- env/nand.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Applied to u-boot-dm, thanks!
Simon Glass
Reviewed-byRe: [PATCH 01/14] env: sf: Cosmetic fix in env_sf_init_addr()
In reply to Simon GlassQuoted 10 lines · Marek Behún
From: Marek Behún <[email protected]>
In the if clause we use tabs and in the else clause spaces. Let's use spaces in the if clause too.
Signed-off-by Marek Behún <[email protected]>--- env/sf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Applied to u-boot-dm, thanks!
Simon Glass
Reviewed-byRe: [PATCH 02/14] env: sf: Use ENV_VALID enum names instead of literals
In reply to Simon GlassQuoted 11 lines · Marek Behún
From: Marek Behún <[email protected]>
The function
env_sf_init_addr()assigns number literals (1) instead ofENV_VALIDtogd->env_valid. Fix this.Signed-off-by Marek Behún <[email protected]>--- env/sf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Applied to u-boot-dm, thanks!
Simon Glass
Reviewed-byRe: [PATCH 06/14] env: nvram: Cosmetic fix in env_nvram_init()
In reply to Simon GlassQuoted 10 lines · Marek Behún
From: Marek Behún <[email protected]>
Use spaces consistently in assignments instead of tabs.
Signed-off-by Marek Behún <[email protected]>--- env/nvram.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Applied to u-boot-dm, thanks!
Simon Glass
Reviewed-byRe: [PATCH 11/14] board: synquacer: developerbox: Don't set gd->env_addr to default_environment
In reply to Simon GlassQuoted 7 lines · Marek Behún
From: Marek Behún <[email protected]>
This board sets
gd->env_addrtodefault_environmentinboard_init(), but the board has environment in SPI flash according to defconfig. Let the env API handle environment automatically.
Quoted 5 lines
Signed-off-by Marek Behún <[email protected]>Cc Masami Hiramatsu <[email protected]>--- board/socionext/developerbox/developerbox.c | 2 -- 1 file changed, 2 deletions(-)
Applied to u-boot-dm, thanks!
Re: [PATCH 11/14] board: synquacer: developerbox: Don't set gd->env_addr to default_environment
In reply to Marek BehúnHi Marek,
I found this cause a synchronous abort on boot on the developerbox when the env_vars on SPI flash is corrupted. See below log. Can we revert it? I confirmed that reverting this patch fixes the problem.
Thank you,
[2021-11-17 13:49:19] U-Boot 2021.10-01018-g535870f3b0 (Nov 17 2021 - 13:45:48 +0900)
[2021-11-17 13:49:19]
[2021-11-17 13:49:19] CPU: SC2A11:Cortex-A53 MPCore 24cores
[2021-11-17 13:49:19] Model: Socionext Developer Box [2021-11-17 13:49:19] DRAM: 3.9 GiB
[2021-11-17 13:49:20] MMC: sdhci@52300000: 0
[2021-11-17 13:49:20] Loading Environment from SPIFlash... SF:
Detected mx66u51235f with page size 2
56 Bytes, erase size 4 KiB, total 64 MiB
[2021-11-17 13:49:20] *** Warning - bad CRC, using default environment [2021-11-17 13:49:20]
[2021-11-17 13:49:20] "Synchronous Abort" handler, esr 0x96000210 [2021-11-17 13:49:20] elr: 0000000008245cbc lr : 0000000008245ca4 (reloc) [2021-11-17 13:49:20] elr: 00000000fbf5acbc lr : 00000000fbf5aca4 [2021-11-17 13:49:20] x0 : 000000000000000a x1 : 0000000000000001 [2021-11-17 13:49:20] x2 : 0000000000000000 x3 : 0000000000010301 [2021-11-17 13:49:20] x4 : 0000000000000000 x5 : 0000000000000000 [2021-11-17 13:49:20] x6 : 0000000000000000 x7 : 0000000000000000 [2021-11-17 13:49:20] x8 : 0000000000000004 x9 : 0000000000000008 [2021-11-17 13:49:20] x10: 00000000000186a0 x11: 00000000ffffffd0 [2021-11-17 13:49:20] x12: 0000000000000006 x13: 000000000001869f [2021-11-17 13:49:20] x14: 00000000faee0b00 x15: 0000000000000000 [2021-11-17 13:49:20] x16: 00000000fbf52b24 x17: 0000000000000000 [2021-11-17 13:49:20] x18: 00000000faee4d80 x19: 00000000faf1aad8 [2021-11-17 13:49:20] x20: 000000000828eadf x21: 000000000000000a [2021-11-17 13:49:20] x22: 0000000000000020 x23: 00000000fbfaa016 [2021-11-17 13:49:20] x24: 00000000faee4e70 x25: 000000000828eadf [2021-11-17 13:49:20] x26: 0000000000000400 x27: 000000000002ffff [2021-11-17 13:49:20] x28: 0000000000000000 x29: 00000000faee06b0 [2021-11-17 13:49:20]
2021年10月22日(金) 22:47 Marek Behún <[email protected]>:
Quoted 29 lines
From: Marek Behún <[email protected]>
This board sets
gd->env_addrtodefault_environmentinboard_init(), but the board has environment in SPI flash according to defconfig. Let the env API handle environment automatically.Signed-off-by Marek Behún <[email protected]>Cc Masami Hiramatsu <[email protected]>--- board/socionext/developerbox/developerbox.c | 2 -- 1 file changed, 2 deletions(-)board/socionext/developerbox/developerbox.c +0
-3@@ -82,8 +82,6 @@ int board_init(void) { gd->bd->bi_boot_params =CONFIG_SYS_LOAD_ADDR +LOAD_OFFSET ; - gd->env_addr = (ulong)&default_environment[0 ]; -synquacer_setup_scbm_smmu ();return 0 ; --2.32.0
Signature · 1 line
Masami Hiramatsu
Re: [PATCH 11/14] board: synquacer: developerbox: Don't set gd->env_addr to default_environment
Hi Masami,
Quoted 7 lines · Masami Hiramatsu
Hi Marek,
I found this cause a synchronous abort on boot on the developerbox when the
env_varson SPI flash is corrupted. See below log. Can we revert it? I confirmed that reverting this patch fixes the problem.
Yes, can you send a patch?
Marek, I think you are working on respinning the rest of your series. Can you take a look at this problem? It would be nice if we could repeat it on sandbox.
Regardds,
SImon
Quoted 68 lines
Thank you,
[2021-11-17 13:49:19] U-Boot 2021.10-01018-g535870f3b0 (Nov 17 2021 - 13:45:48 +0900)
[2021-11-17 13:49:19]
[2021-11-17 13:49:19] CPU: SC2A11:Cortex-A53 MPCore 24cores
[2021-11-17 13:49:19] Model: Socionext Developer Box [2021-11-17 13:49:19] DRAM: 3.9 GiB
[2021-11-17 13:49:20] MMC: sdhci@52300000: 0
[2021-11-17 13:49:20] Loading Environment from SPIFlash... SF:
Detected mx66u51235f with page size 2
56 Bytes, erase size 4 KiB, total 64 MiB
[2021-11-17 13:49:20] *** Warning - bad CRC, using default environment [2021-11-17 13:49:20]
[2021-11-17 13:49:20] "Synchronous Abort" handler, esr0x96000210[2021-11-17 13:49:20] elr:0000000008245cbclr :0000000008245ca4(reloc) [2021-11-17 13:49:20] elr:00000000fbf5acbclr :00000000fbf5aca4[2021-11-17 13:49:20] x0 :000000000000000ax1 : 0000000000000001 [2021-11-17 13:49:20] x2 : 0000000000000000 x3 : 0000000000010301 [2021-11-17 13:49:20] x4 : 0000000000000000 x5 : 0000000000000000 [2021-11-17 13:49:20] x6 : 0000000000000000 x7 : 0000000000000000 [2021-11-17 13:49:20] x8 : 0000000000000004 x9 : 0000000000000008 [2021-11-17 13:49:20] x10:00000000000186a0x11:00000000ffffffd0[2021-11-17 13:49:20] x12: 0000000000000006 x13:000000000001869f[2021-11-17 13:49:20] x14:00000000faee0b00x15: 0000000000000000 [2021-11-17 13:49:20] x16:00000000fbf52b24x17: 0000000000000000 [2021-11-17 13:49:20] x18:00000000faee4d80x19:00000000faf1aad8[2021-11-17 13:49:20] x20:000000000828eadfx21:000000000000000a[2021-11-17 13:49:20] x22: 0000000000000020 x23:00000000fbfaa016[2021-11-17 13:49:20] x24:00000000faee4e70x25:000000000828eadf[2021-11-17 13:49:20] x26: 0000000000000400 x27:000000000002ffff[2021-11-17 13:49:20] x28: 0000000000000000 x29:00000000faee06b0[2021-11-17 13:49:20]2021年10月22日(金) 22:47 Marek Behún <[email protected]>:
Quoted 27 lines
From: Marek Behún <[email protected]>
This board sets
gd->env_addrtodefault_environmentinboard_init(), but the board has environment in SPI flash according to defconfig. Let the env API handle environment automatically.Signed-off-by Marek Behún <[email protected]>Cc Masami Hiramatsu <[email protected]>--- board/socionext/developerbox/developerbox.c | 2 -- 1 file changed, 2 deletions(-)board/socionext/developerbox/developerbox.c +0
-3@@ -82,8 +82,6 @@ int board_init(void) { gd->bd->bi_boot_params =CONFIG_SYS_LOAD_ADDR +LOAD_OFFSET ; - gd->env_addr = (ulong)&default_environment[0 ]; -synquacer_setup_scbm_smmu ();return 0 ; --Quoted 2 lines
2.32.0
--
Masami Hiramatsu
Re: [PATCH 11/14] board: synquacer: developerbox: Don't set gd->env_addr to default_environment
Hi Simon,
2021年11月18日(木) 5:36 Simon Glass <[email protected]>:
Quoted 6 lines
Hi Masami,
Quoted 1 line · Masami Hiramatsu
Quoted 8 lines
Quoted 6 lines
Hi Marek,
I found this cause a synchronous abort on boot on the developerbox when the
env_varson SPI flash is corrupted. See below log. Can we revert it? I confirmed that reverting this patch fixes the problem.Yes, can you send a patch?
OK, I'll send it soon.
Thank you!
Quoted 78 lines
Marek, I think you are working on respinning the rest of your series. Can you take a look at this problem? It would be nice if we could repeat it on sandbox.
Regardds,
SImonQuoted 68 lines
Thank you,
[2021-11-17 13:49:19] U-Boot 2021.10-01018-g535870f3b0 (Nov 17 2021 - 13:45:48 +0900)
[2021-11-17 13:49:19]
[2021-11-17 13:49:19] CPU: SC2A11:Cortex-A53 MPCore 24cores
[2021-11-17 13:49:19] Model: Socionext Developer Box [2021-11-17 13:49:19] DRAM: 3.9 GiB
[2021-11-17 13:49:20] MMC: sdhci@52300000: 0
[2021-11-17 13:49:20] Loading Environment from SPIFlash... SF:
Detected mx66u51235f with page size 2
56 Bytes, erase size 4 KiB, total 64 MiB
[2021-11-17 13:49:20] *** Warning - bad CRC, using default environment [2021-11-17 13:49:20]
[2021-11-17 13:49:20] "Synchronous Abort" handler, esr0x96000210[2021-11-17 13:49:20] elr:0000000008245cbclr :0000000008245ca4(reloc) [2021-11-17 13:49:20] elr:00000000fbf5acbclr :00000000fbf5aca4[2021-11-17 13:49:20] x0 :000000000000000ax1 : 0000000000000001 [2021-11-17 13:49:20] x2 : 0000000000000000 x3 : 0000000000010301 [2021-11-17 13:49:20] x4 : 0000000000000000 x5 : 0000000000000000 [2021-11-17 13:49:20] x6 : 0000000000000000 x7 : 0000000000000000 [2021-11-17 13:49:20] x8 : 0000000000000004 x9 : 0000000000000008 [2021-11-17 13:49:20] x10:00000000000186a0x11:00000000ffffffd0[2021-11-17 13:49:20] x12: 0000000000000006 x13:000000000001869f[2021-11-17 13:49:20] x14:00000000faee0b00x15: 0000000000000000 [2021-11-17 13:49:20] x16:00000000fbf52b24x17: 0000000000000000 [2021-11-17 13:49:20] x18:00000000faee4d80x19:00000000faf1aad8[2021-11-17 13:49:20] x20:000000000828eadfx21:000000000000000a[2021-11-17 13:49:20] x22: 0000000000000020 x23:00000000fbfaa016[2021-11-17 13:49:20] x24:00000000faee4e70x25:000000000828eadf[2021-11-17 13:49:20] x26: 0000000000000400 x27:000000000002ffff[2021-11-17 13:49:20] x28: 0000000000000000 x29:00000000faee06b0[2021-11-17 13:49:20]2021年10月22日(金) 22:47 Marek Behún <[email protected]>:
Quoted 27 lines
From: Marek Behún <[email protected]>
This board sets
gd->env_addrtodefault_environmentinboard_init(), but the board has environment in SPI flash according to defconfig. Let the env API handle environment automatically.Signed-off-by Marek Behún <[email protected]>Cc Masami Hiramatsu <[email protected]>--- board/socionext/developerbox/developerbox.c | 2 -- 1 file changed, 2 deletions(-)board/socionext/developerbox/developerbox.c +0
-3@@ -82,8 +82,6 @@ int board_init(void) { gd->bd->bi_boot_params =CONFIG_SYS_LOAD_ADDR +LOAD_OFFSET ; - gd->env_addr = (ulong)&default_environment[0 ]; -synquacer_setup_scbm_smmu ();return 0 ; --Quoted 2 lines
2.32.0
--
Masami Hiramatsu
Signature · 1 line
Masami Hiramatsu
PATCH 1/1 Revert "board: synquacer: developerbox: Don't set gd->env_addr to default_environment"
Without default setting of gd->env_addr, U-Boot will cause a synchronous abort if the env-variables on the SPI flash is broken or not saved corectly. Set gd->env_addr correctly.
This reverts commit 535870f3b0fb09ee9b2885409f05304111464643.
--- board/socionext/developerbox/developerbox.c | 2 ++ 1 file changed, 2 insertions(+)
board/socionext/developerbox/developerbox.c +2 -0
@@ -82,6 +82,8 @@ int board_init(void) { gd->bd->bi_boot_params =CONFIG_SYS_LOAD_ADDR +LOAD_OFFSET ; + gd->env_addr = (ulong)&default_environment[0 ]; +synquacer_setup_scbm_smmu ();return 0 ;
Re: [PATCH] Revert "board: synquacer: developerbox: Don't set gd->env_addr to default_environment"
Quoted 17 lines · On Thu, 18 Nov 2021 14:45:25 +0900 Masami Hiramatsu…
Without default setting of
gd->env_addr, U-Boot will cause a synchronous abort if the env-variables on the SPI flash is broken or not saved corectly. Setgd->env_addrcorrectly.This reverts commit
535870f3b0fb09ee9b2885409f05304111464643.Signed-off-by Masami Hiramatsu <[email protected]>--- board/socionext/developerbox/developerbox.c | 2 ++ 1 file changed, 2 insertions(+)board/socionext/developerbox/developerbox.c +0
-0
board/socionext/developerbox/developerbox.c int board_init(void) · line 89
Quoted 8 lines
board/socionext/developerbox/developerbox.c +2
-0@@ -82,6 +82,8 @@ int board_init(void) { gd->bd->bi_boot_params =CONFIG_SYS_LOAD_ADDR +LOAD_OFFSET ; + gd->env_addr = (ulong)&default_environment[0 ]; +synquacer_setup_scbm_smmu ();return 0 ;
I will look into this when I respin the default environment series.
Marek
Re: [PATCH] Revert "board: synquacer: developerbox: Don't set gd->env_addr to default_environment"
In reply to Masami HiramatsuQuoted 8 lines · Masami Hiramatsu
Without default setting of
gd->env_addr, U-Boot will cause a synchronous abort if the env-variables on the SPI flash is broken or not saved corectly. Setgd->env_addrcorrectly.This reverts commit
535870f3b0fb09ee9b2885409f05304111464643.Signed-off-by Masami Hiramatsu <[email protected]>Reviewed-by Marek Behún <[email protected]>
Applied to u-boot/master, thanks!
Signature · 1 line
Tom