Re: [PATCH] env: Leave invalid env for nowhere location

2021-06-10 Thread Marek Vasut
On 6/10/21 10:25 AM, Kunihiko Hayashi wrote: Hi, [...] gd->reloc_off is relocated address offset from zero, however, gd->env_addr has still non-relocated address.   | gd->env_addr += gd->reloc_off; I think the env should be relocated if CONFIG_SYS_RELOC_GD_ENV_ADDR=y. But this code

Re: [PATCH] env: Leave invalid env for nowhere location

2021-06-10 Thread Kunihiko Hayashi
Hi Marek, On 2021/06/10 10:07, Marek Vasut wrote: On 6/8/21 9:54 AM, Kunihiko Hayashi wrote: Hi, [...] I would expect that after relocation, if all you have is env_nowhere driver, the env_nowhere_init() is called again from the first for() loop of env_init() [1], which would set

Re: [PATCH] env: Leave invalid env for nowhere location

2021-06-09 Thread Marek Vasut
On 6/8/21 9:54 AM, Kunihiko Hayashi wrote: Hi, [...] I would expect that after relocation, if all you have is env_nowhere driver, the env_nowhere_init() is called again from the first for() loop of env_init() [1], which would set gd->env_valid to ENV_INVALID [1], and that for() loop would

Re: [PATCH] env: Leave invalid env for nowhere location

2021-06-08 Thread Kunihiko Hayashi
Hi Marek, On 2021/06/08 2:33, Marek Vasut wrote: On 6/7/21 9:54 AM, Kunihiko Hayashi wrote: Hi, [...] I would expect that after relocation, if all you have is env_nowhere driver, the env_nowhere_init() is called again from the first for() loop of env_init() [1], which would set

Re: [PATCH] env: Leave invalid env for nowhere location

2021-06-07 Thread Marek Vasut
On 6/7/21 9:54 AM, Kunihiko Hayashi wrote: Hi, [...] I would expect that after relocation, if all you have is env_nowhere driver, the env_nowhere_init() is called again from the first for() loop of env_init() [1], which would set gd->env_valid to ENV_INVALID [1], and that for() loop would

Re: [PATCH] env: Leave invalid env for nowhere location

2021-06-07 Thread Kunihiko Hayashi
Hi Marek, On 2021/06/07 3:08, Marek Vasut wrote: On 6/3/21 6:15 PM, Kunihiko Hayashi wrote: Hi Marek, Hi, Sorry for rate reply. No worries, same here. On 2021/05/25 16:35, Marek Vasut wrote: On 5/12/21 4:09 PM, Kunihiko Hayashi wrote: When CONFIG_ENV_IS_NOWHERE is enabled,

Re: [PATCH] env: Leave invalid env for nowhere location

2021-06-06 Thread Marek Vasut
On 6/3/21 6:15 PM, Kunihiko Hayashi wrote: Hi Marek, Hi, Sorry for rate reply. No worries, same here. On 2021/05/25 16:35, Marek Vasut wrote: On 5/12/21 4:09 PM, Kunihiko Hayashi wrote: When CONFIG_ENV_IS_NOWHERE is enabled, env_nowhere_init() sets ENV_INVALID to gd->env_valid, and

Re: [PATCH] env: Leave invalid env for nowhere location

2021-06-03 Thread Kunihiko Hayashi
Hi Marek, Sorry for rate reply. On 2021/05/25 16:35, Marek Vasut wrote: On 5/12/21 4:09 PM, Kunihiko Hayashi wrote: When CONFIG_ENV_IS_NOWHERE is enabled, env_nowhere_init() sets ENV_INVALID to gd->env_valid, and sets default_environment before relocation to gd->env_addr. After that,

Re: [PATCH] env: Leave invalid env for nowhere location

2021-05-25 Thread Marek Vasut
On 5/12/21 4:09 PM, Kunihiko Hayashi wrote: When CONFIG_ENV_IS_NOWHERE is enabled, env_nowhere_init() sets ENV_INVALID to gd->env_valid, and sets default_environment before relocation to gd->env_addr. After that, env_init() switches gd->env_valid to ENV_VALID by the previous fix. If

Re: [PATCH] env: Leave invalid env for nowhere location

2021-05-25 Thread Kunihiko Hayashi
Hi Tim, How about this fix? You already tested Marek's patch, and I'd like to hear your comment about this patch, or know whether it occurs the issue with CONFIG_ENV_IS_NOWHERE if possible. Thank you, On 2021/05/17 2:19, Marek Vasut wrote: On 5/12/21 4:09 PM, Kunihiko Hayashi wrote: When

Re: [PATCH] env: Leave invalid env for nowhere location

2021-05-16 Thread Marek Vasut
On 5/12/21 4:09 PM, Kunihiko Hayashi wrote: When CONFIG_ENV_IS_NOWHERE is enabled, env_nowhere_init() sets ENV_INVALID to gd->env_valid, and sets default_environment before relocation to gd->env_addr. After that, env_init() switches gd->env_valid to ENV_VALID by the previous fix. If