+/**
+ * eth_env_get_enetaddr() - Get an ethernet address from the environmnet
+ *
+ * @name: Environment variable to get (e.g. "ethaddr")
+ * @enetaddr: Place to put MAC address (6 bytes)
+ * Return: 0 if OK, 1 on error
+ */
+int eth_env_get_enetaddr(const char *name, uint8_t *enetaddr);
+
+/**
+ * eth_env_set_enetaddr() - Set an ethernet address in the environmnet
+ *
+ * @name: Environment variable to set (e.g. "ethaddr")
+ * @enetaddr: Pointer to MAC address to put into the variable (6 bytes)
+ * Return: 0 if OK, 1 on error
+ */
+int eth_env_set_enetaddr(const char *name, const uint8_t *enetaddr);
+
+/**
+ * env_fix_drivers() - Updates envdriver as per relocation
+ */
+void env_fix_drivers(void);
+
+/**
+ * env_set_default_vars() - reset variables to their default value
+ *
+ * This resets individual variables to their value in the default environment
+ *
+ * @nvars: Number of variables to set/reset
+ * @vars: List of variables to set/reset
+ * @flags: Flags controlling matching (H_... - see search.h)
+ */
+int env_set_default_vars(int nvars, char *const vars[], int flags);
+
+/**
+ * env_load() - Load the environment from storage
+ *
+ * Return: 0 if OK, -ve on error
+ */
+int env_load(void);
+
+/**
+ * env_reload() - Re-Load the environment from current storage
+ *
+ * Return: 0 if OK, -ve on error
+ */
+int env_reload(void);
+
+/**
+ * env_save() - Save the environment to storage
+ *
+ * Return: 0 if OK, -ve on error
+ */
+int env_save(void);
+
+/**
+ * env_erase() - Erase the environment on storage
+ *
+ * Return: 0 if OK, -ve on error
+ */
+int env_erase(void);
+
+/**
+ * env_select() - Select the environment storage
+ *
+ * Return: 0 if OK, -ve on error
+ */
+int env_select(const char *name);
+
+/**
+ * env_import() - Import from a binary representation into hash table
+ *
+ * This imports the environment from a buffer. The format for each variable is
+ * var=value\0 with a double \0 at the end of the buffer.
+ *
+ * @buf: Buffer containing the environment (struct environemnt_s *)
+ * @check: non-zero to check the CRC at the start of the environment, 0 to
+ * ignore it
+ * @flags: Flags controlling matching (H_... - see search.h)
+ * Return: 0 if imported successfully, -ENOMSG if the CRC was bad, -EIO if
+ * something else went wrong
+ */
+int env_import(const char *buf, int check, int flags);
+
+/**
+ * env_export() - Export the environment to a buffer
+ *
+ * Export from hash table into binary representation
+ *
+ * @env_out: Buffer to contain the environment (must be large enough!)
+ * Return: 0 if OK, 1 on error
+ */
+int env_export(struct environment_s *env_out);
+
+/**
+ * env_check_redund() - check the two redundant environments
+ * and find out, which is the valid one.
+ *
+ * @buf1: First environment (struct environemnt_s *)
+ * @buf1_read_fail: 0 if buf1 is valid, non-zero if invalid
+ * @buf2: Second environment (struct environemnt_s *)
+ * @buf2_read_fail: 0 if buf2 is valid, non-zero if invalid
+ * Return: 0 if OK,
+ * -EIO if no environment is valid,
+ * -ENOMSG if the CRC was bad
+ */
+
+int env_check_redund(const char *buf1, int buf1_read_fail,
+ const char *buf2, int buf2_read_fail);
+
+/**
+ * env_import_redund() - Select and import one of two redundant environments
+ *
+ * @buf1: First environment (struct environemnt_s *)
+ * @buf1_read_fail: 0 if buf1 is valid, non-zero if invalid
+ * @buf2: Second environment (struct environemnt_s *)
+ * @buf2_read_fail: 0 if buf2 is valid, non-zero if invalid
+ * @flags: Flags controlling matching (H_... - see search.h)
+ * Return: 0 if OK, -EIO if no environment is valid, -ENOMSG if the CRC was bad
+ */
+int env_import_redund(const char *buf1, int buf1_read_fail,
+ const char *buf2, int buf2_read_fail,
+ int flags);
+
+/**
+ * env_get_default() - Look up a variable from the default environment
+ *
+ * @name: Variable to look up
+ * Return: value if found, NULL if not found in default environment
+ */
+char *env_get_default(const char *name);
+
+/* [re]set to the default environment */
+void env_set_default(const char *s, int flags);
+
+/**
+ * env_reloc() - Relocate the 'env' sub-commands
+ *
+ * This is used for those unfortunate archs with crappy toolchains
+ */
+void env_reloc(void);
+
+
+/**
+ * env_import_fdt() - Import environment values from device tree blob
+ *
+ * This uses the value of the environment variable "env_fdt_path" as a
+ * path to an fdt node, whose property/value pairs are added to the
+ * environment.
+ */
+#ifdef CONFIG_ENV_IMPORT_FDT
+void env_import_fdt(void);
+#else
+static inline void env_import_fdt(void) {}
+#endif
+