Quentin Schulz b1f1b4a5a5 rockchip: puma-rk3399: load environment from same medium as one used to load U-Boot proper
Chances are when one boots U-Boot proper from a given storage medium,
they want the same medium to be used to load and store the environment.

This basically allows to have completely separate U-Boot (TPL/SPL/U-Boot
proper/environment) per storage medium which is convenient when working
with recovery from SD-Card as one would just need to insert a properly
configured SD-Card into the device to have access to their whole debug
setup.

No fallback mechanism is provided as to not dirty other storage medium
environment by mistake. However, since arch_env_get_location() is called
by env_init() which is part of the pre-relocation process, a valid,
non-ENVL_UNKNOWN, value shall be returned otherwise the relocation fails
with the following message:
initcall sequence 00000000002866c0 failed at call 0000000000256b34 (err=-19)

This valid, non-ENVL_UNKNOWN, value is ENVL_NOWHERE which requires to
always select CONFIG_ENV_IS_NOWHERE otherwise this work-around does not
work.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2022-10-19 19:30:49 +08:00
..
2022-09-15 14:22:08 -04:00
2022-08-20 21:18:15 -04:00
2021-11-07 18:36:55 +01:00
2022-09-19 08:38:32 -04:00
2022-08-04 16:18:47 -04:00
2022-07-01 15:55:54 -04:00
2021-10-27 16:38:26 -04:00
2022-08-20 21:18:15 -04:00
2022-04-28 09:26:44 -04:00
2022-10-06 10:13:38 +02:00
2022-08-20 21:18:15 -04:00
2022-07-08 17:57:34 -04:00
2021-09-07 16:22:30 -04:00
2022-08-04 16:18:47 -04:00
2022-09-19 16:07:12 -04:00
2022-04-28 09:26:44 -04:00
2022-04-08 09:05:20 -04:00
2022-07-26 02:30:56 -06:00
2022-08-04 16:18:47 -04:00
2022-08-04 16:18:47 -04:00
2022-04-12 15:36:18 +02:00
2022-10-03 15:39:46 -04:00
2022-09-19 16:07:12 -04:00
2022-01-08 11:16:03 -05:00