[U-Boot] [PATCH v2 09/40] env: Move env_relocate() to env.h

Simon Glass sjg at chromium.org
Thu Aug 1 15:46:44 UTC 2019


Move env_relocate() over to the new header file.

Signed-off-by: Simon Glass <sjg at chromium.org>
Acked-by: Joe Hershberger <joe.hershberger at ni.com>
---

Changes in v2: None

 common/board_r.c | 1 +
 env/common.c     | 1 +
 include/common.h | 1 -
 include/env.h    | 8 ++++++++
 4 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/common/board_r.c b/common/board_r.c
index 84aec7fc71..99b128571e 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -18,6 +18,7 @@
 #include <command.h>
 #include <console.h>
 #include <dm.h>
+#include <env.h>
 #include <environment.h>
 #include <fdtdec.h>
 #include <ide.h>
diff --git a/env/common.c b/env/common.c
index bd340fe9d5..1fbc4a874d 100644
--- a/env/common.c
+++ b/env/common.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <env.h>
 #include <environment.h>
 #include <linux/stddef.h>
 #include <search.h>
diff --git a/include/common.h b/include/common.h
index 55cbe1f97d..cb6b584b70 100644
--- a/include/common.h
+++ b/include/common.h
@@ -146,7 +146,6 @@ int do_fat_fsload(cmd_tbl_t *, int, int, char * const []);
 int do_ext2load(cmd_tbl_t *, int, int, char * const []);
 
 /* common/cmd_nvedit.c */
-void	env_relocate (void);
 int	envmatch     (uchar *, int);
 
 /**
diff --git a/include/env.h b/include/env.h
index 5d205ef02d..72980962bf 100644
--- a/include/env.h
+++ b/include/env.h
@@ -31,6 +31,14 @@ int env_get_id(void);
  */
 int env_init(void);
 
+/**
+ * env_relocate() - Set up the post-relocation environment
+ *
+ * This loads the environment into RAM so that it can be modified. This is
+ * called after relocation, before the environment is used
+ */
+void env_relocate(void);
+
 /**
  * env_get_f() - Look up the value of an environment variable (early)
  *
-- 
2.22.0.709.g102302147b-goog



More information about the U-Boot mailing list