xilinx: zynqmp: Allow multiboot environment write even in saved environment
PATCH v2 1/1 xilinx: zynqmp: Allow multiboot environment write even in saved environment
Once the environment was saved, the current multiboot image information became unreachable. When dealing with firmware updates, this information is necessary alongside the saved environment to know the booted image.
Move the multiboot environment set operation before the saved environment check to ensure this information is always available.
---
Change in v2:
- Fix nit in the commit message
--- board/xilinx/zynqmp/zynqmp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
board/xilinx/zynqmp/zynqmp.c +4 -4
@@ -519,6 +519,10 @@ int board_late_init(void)usb_ether_init ();#endif + multiboot =multi_boot (); +if (multiboot >=0 ) +env_set_hex ("multiboot" , multiboot); +if (!(gd->flags &GD_FLG_ENV_DEFAULT )) {debug ("Saved variables - Skipping\n" );return 0 ;
@@ -531,10 +535,6 @@ int board_late_init(void)if (ret)return ret; - multiboot =multi_boot (); -if (multiboot >=0 ) -env_set_hex ("multiboot" , multiboot); -if (IS_ENABLED (CONFIG_DISTRO_DEFAULTS )) { ret =boot_targets_setup ();if (ret)
Signature · 1 line
2.34.1
Quoted 32 lines · Kory Maincent
Once the environment was saved, the current multiboot image information became unreachable. When dealing with firmware updates, this information is necessary alongside the saved environment to know the booted image.
Move the multiboot environment set operation before the saved environment check to ensure this information is always available.
Signed-off-by Kory Maincent <[email protected]>---
Change in v2:
- Fix nit in the commit message--- board/xilinx/zynqmp/zynqmp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)board/xilinx/zynqmp/zynqmp.c +4
-0@@ -519,6 +519,10 @@ int board_late_init(void)usb_ether_init ();#endif + multiboot =multi_boot (); +if (multiboot >=0 ) +env_set_hex ("multiboot" , multiboot); +if (!(gd->flags &GD_FLG_ENV_DEFAULT )) {debug ("Saved variables - Skipping\n" );return 0 ;
board/xilinx/zynqmp/zynqmp.c int board_late_init(void) · line 540
Quoted 10 lines
board/xilinx/zynqmp/zynqmp.c +0
-4@@ -531,10 +535,6 @@ int board_late_init(void)if (ret)return ret; - multiboot =multi_boot (); -if (multiboot >=0 ) -env_set_hex ("multiboot" , multiboot); -if (IS_ENABLED (CONFIG_DISTRO_DEFAULTS )) { ret =boot_targets_setup ();if (ret)
Applied.
M