X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=include%2Fenv_internal.h;h=174c3b1a79fc0ac339e579e906022b2c36e61732;hb=64cfeda8ae2e95751c5d2dfa4dc4a906478ae2f6;hp=66550434c3f97a8423e21b3dc8623f1c957e3c5e;hpb=3773028fced4795d52f02b387496395ec387f3bb;p=platform%2Fkernel%2Fu-boot.git diff --git a/include/env_internal.h b/include/env_internal.h index 6655043..174c3b1 100644 --- a/include/env_internal.h +++ b/include/env_internal.h @@ -54,7 +54,6 @@ # error "is set" # endif extern unsigned long nand_env_oob_offset; -# define CONFIG_ENV_OFFSET nand_env_oob_offset # endif /* CONFIG_ENV_OFFSET_OOB */ #endif /* CONFIG_ENV_IS_IN_NAND */ @@ -111,7 +110,11 @@ typedef struct environment_s { extern env_t embedded_environment; #endif /* ENV_IS_EMBEDDED */ -extern const unsigned char default_environment[]; +#ifdef DEFAULT_ENV_IS_RW +extern char default_environment[]; +#else +extern const char default_environment[]; +#endif #ifndef DO_DEPS_ONLY @@ -154,8 +157,7 @@ struct env_driver { /** * load() - Load the environment from storage * - * This method is optional. If not provided, no environment will be - * loaded. + * This method is required for loading environment * * @return 0 if OK, -ve on error */ @@ -208,10 +210,31 @@ struct env_driver { #endif #define ENV_SAVE_PTR(x) (CONFIG_IS_ENABLED(SAVEENV) ? (x) : NULL) +#define ENV_ERASE_PTR(x) (CONFIG_IS_ENABLED(CMD_ERASEENV) ? (x) : NULL) extern struct hsearch_data env_htab; /** + * env_ext4_get_intf() - Provide the interface for env in EXT4 + * + * It is a weak function allowing board to overidde the default interface for + * U-Boot env in EXT4: CONFIG_ENV_EXT4_INTERFACE + * + * @return string of interface, empty if not supported + */ +const char *env_ext4_get_intf(void); + +/** + * env_ext4_get_dev_part() - Provide the device and partition for env in EXT4 + * + * It is a weak function allowing board to overidde the default device and + * partition used for U-Boot env in EXT4: CONFIG_ENV_EXT4_DEVICE_AND_PART + * + * @return string of device and partition + */ +const char *env_ext4_get_dev_part(void); + +/** * env_get_location()- Provide the best location for the U-Boot environment * * It is a weak function allowing board to overidde the environment location