c5d548a9 | 24-Jun-2018 |
Yaniv Levinsky <yaniv.levinsky@compulab.co.il> |
env: common: accept flags on reset to default env
The function set_default_env() sets the hashtable flags for import_r(). Formally set_default_env() doesn't accept flags from its callers. In practic
env: common: accept flags on reset to default env
The function set_default_env() sets the hashtable flags for import_r(). Formally set_default_env() doesn't accept flags from its callers. In practice the caller can (un)set the H_INTERACTIVE flag, but it has to be done using the first character of the function's string argument. Other flags like H_FORCE can't be set by the caller.
Change the function to accept flags argument. The benefits are: 1. The caller will have to explicitly set the H_INTERACTIVE flag, instead of un-setting it using a special char in a string. 2. Add the ability to propagate flags from the caller to himport(), especially the H_FORCE flag from do_env_default() in nvedit.c that currently gets ignored for "env default -a -f" commands. 3. Flags and messages will not be coupled together. A caller will be able to set flags without passing a string and vice versa.
Please note: The propagation of H_FORCE from do_env_default() does not introduce any functional changes, because currently himport_r() is set to destroy the old environment regardless if H_FORCE flag is set or not. More changes are needed to utilize the propagation of H_FORCE.
Signed-off-by: Yaniv Levinsky <yaniv.levinsky@compulab.co.il> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
show more ...
|
5a04264e | 24-Jun-2018 |
Yaniv Levinsky <yaniv.levinsky@compulab.co.il> |
cmd: nvedit: set H_INTERACTIVE in do_env_default
The function set_default_vars() in common.c adds H_INTERACTIVE to the h_import() flag, but the function has no way of telling if the command actually
cmd: nvedit: set H_INTERACTIVE in do_env_default
The function set_default_vars() in common.c adds H_INTERACTIVE to the h_import() flag, but the function has no way of telling if the command actually was user directed like this flag suggest. The flag should be set by the calling function do_env_default() in nvedit.c instead, where the command is certainty user directed.
Move the H_INTERACTIVE flag from set_default_vars() to do_env_default().
Signed-off-by: Yaniv Levinsky <yaniv.levinsky@compulab.co.il> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
show more ...
|
8df430d0 | 08-Jun-2018 |
Alex Kiernan <alex.kiernan@gmail.com> |
env: Add !ENV_IS_IN_EXT4 dependency to ENV_IS_NOWHERE
If ENV_IS_IN_EXT4 is set you shouldn't be able to select ENV_IS_NOWHERE.
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Reviewed-by: Simo
env: Add !ENV_IS_IN_EXT4 dependency to ENV_IS_NOWHERE
If ENV_IS_IN_EXT4 is set you shouldn't be able to select ENV_IS_NOWHERE.
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Petr Vorel <petr.vorel@gmail.com>
show more ...
|
95058fbb | 14-Apr-2018 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
env: mmc/fat/ext4: undefined reference to `mmc_initialize'
For CONFIG_ENV_FAT_INTERFACE != 'mmc' a link error env/fat.c:93: undefined reference to `mmc_initialize' occurs if CONFIG_MMC_SUPPORT is no
env: mmc/fat/ext4: undefined reference to `mmc_initialize'
For CONFIG_ENV_FAT_INTERFACE != 'mmc' a link error env/fat.c:93: undefined reference to `mmc_initialize' occurs if CONFIG_MMC_SUPPORT is not enabled.
Fixes: 26862b4a40c3 ("env: mmc/fat/ext4: make sure that the MMC sub-system is initialized before using it") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
show more ...
|
b2cdef48 | 09-Feb-2018 |
Goldschmidt Simon <sgoldschmidt@de.pepperl-fuchs.com> |
env: restore old env_get_char() behaviour
With multiple environments, the 'get_char' callback for env drivers does not really make sense any more because it is only supported by two drivers (eeprom
env: restore old env_get_char() behaviour
With multiple environments, the 'get_char' callback for env drivers does not really make sense any more because it is only supported by two drivers (eeprom and nvram).
To restore single character loading for these drivers, override 'env_get_char_spec'.
Signed-off-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
show more ...
|
80719938 | 31-Jan-2018 |
Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com> |
env: sf: use env_import_redund to simplify env_sf_load
For the redundant environment configuration, env_sf_load still contained duplicate code instead of using env_import_redund().
Simplify the cod
env: sf: use env_import_redund to simplify env_sf_load
For the redundant environment configuration, env_sf_load still contained duplicate code instead of using env_import_redund().
Simplify the code by only executing the load twice and delegating everything else to env_import_redund.
Signed-off-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
show more ...
|
2166ebf7 | 31-Jan-2018 |
Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com> |
env: make env drivers propagate env_import return value
For multiple env drivers to correctly implement fallback when one environment fails to load (e.g. crc error), the return value of env_import h
env: make env drivers propagate env_import return value
For multiple env drivers to correctly implement fallback when one environment fails to load (e.g. crc error), the return value of env_import has to be propagated by all env driver's load function.
Without this change, the first driver that succeeds to load an environment with an invalid CRC return 0 (success) and no other drivers are checked.
Signed-off-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
show more ...
|
31f044bd | 31-Jan-2018 |
Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com> |
env: move more common code to env_import_redund
There is more common code in mmc, nand and ubi env drivers that can be shared by moving to env_import_redund.
For this, a status/error value whether
env: move more common code to env_import_redund
There is more common code in mmc, nand and ubi env drivers that can be shared by moving to env_import_redund.
For this, a status/error value whether the buffers were loaded are passed as additional parameters to env_import_redund. Ideally, these are already returned to the env driver by the storage driver. This is the case for mmc, nand and ubi, so for this change, code deduplicated.
Signed-off-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
show more ...
|