[Concept,02/15] ulib: Disable environment setup

Message ID 20250905170132.182249-3-sjg@u-boot.org
State New
Headers
Series ulib: Provide test programs and documentation |

Commit Message

Simon Glass Sept. 5, 2025, 5:01 p.m. UTC
  From: Simon Glass <sjg@chromium.org>

The application may not wish to have an environment, so skip this init
with the library.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 common/board_r.c | 3 +++
 1 file changed, 3 insertions(+)
  

Patch

diff --git a/common/board_r.c b/common/board_r.c
index 1bb0eb37e9b..22506effae6 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -417,6 +417,9 @@  static int should_load_env(void)
 
 static int initr_env(void)
 {
+	if (gd_ulib())
+		return 0;
+
 	/* initialize environment */
 	if (should_load_env())
 		env_relocate();