summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAlbert Schwarzkopf <a.schwarzkopf@phytec.de>2019-12-09 11:49:28 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-12-11 09:47:29 +0100
commitfa5b6ff16f38db14116690fbbdf031613dcc2272 (patch)
tree04d833b3b061479b86abdb73faabbb339e5fd30b /scripts
parent15e92d72c79da0453933f3d321c38697f089b32f (diff)
downloadbarebox-fa5b6ff16f38db14116690fbbdf031613dcc2272.tar.gz
barebox-fa5b6ff16f38db14116690fbbdf031613dcc2272.tar.xz
Allow usage of default environment without environment file storage
Currently, the default environment is only used when the barebox environment on the persistent store is not valid or when ENVFS_FLAGS_FORCE_BUILT_IN is set in the super block. However, ENVFS_FLAGS_FORCE_BUILT_IN can be cleared and the environmnet variables in the persistent store will be used again. This may not be desirable. This patch allows building CONFIG_DEFAULT_ENVIRONMENT independent of CONFIG_ENV_HANDLING. This can be useful if you never want to load or write values from the persistent store and you only need to read environment variables from your default environment. If CONFIG_ENV_HANDLING is not set, a message will be printed to the user indicating that changes to non-volatile variables won't be persisted. Move envfs functions that are needed when CONFIG_DEFAULT_ENVIRONMENT and/or CONFIG_ENV_HANDLING is set to a new file common/envfs-core.c. Signed-off-by: Albert Schwarzkopf <a.schwarzkopf@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/bareboxenv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/bareboxenv.c b/scripts/bareboxenv.c
index c512a105ef..d1cf33a4d9 100644
--- a/scripts/bareboxenv.c
+++ b/scripts/bareboxenv.c
@@ -104,6 +104,7 @@ static char *concat_subpath_file(const char *path, const char *f)
#include "../include/envfs.h"
#include "../crypto/crc32.c"
#include "../lib/make_directory.c"
+#include "../common/envfs-core.c"
#include "../common/environment.c"
static void usage(char *prgname)