Skip to content

Commit

Permalink
Revert "startup: Load default environment earlier"
Browse files Browse the repository at this point in the history
Several boards use defaultenv_append_directory() to append a board
specific envfs snippet during runtime. This only works when
defaultenv_append_directory() is called before defaultenv_load() is
exectuted. Since that was executed at the end of the start process
every initcall level could be used to append a env directory. With this
patch only initcall levels earlier than fsdevice_initcall work and
most boards do not cope with this.

Revert this patch until a better solution is found.

Reported-by: Alexander Kurz <[email protected]>

This reverts commit 5b92cfc.
  • Loading branch information
saschahauer committed Mar 19, 2018
1 parent d7dacc1 commit f9c96e2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions common/startup.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ static int mount_root(void)
mount("none", "pstore", "/pstore", NULL);
}

if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT))
defaultenv_load("/env", 0);

return 0;
}
fs_initcall(mount_root);
Expand All @@ -82,6 +79,9 @@ static int load_environment(void)

default_environment_path = default_environment_path_get();

if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT))
defaultenv_load("/env", 0);

envfs_load(default_environment_path, "/env", 0);
nvvar_load();

Expand Down

0 comments on commit f9c96e2

Please sign in to comment.