barebox for the Cortex-R5 boot processor doesn't have environment enabled, but still needs the bootsource mounted to /boot. Both steps are behind a #ifdef CONFIG_ENV_HANDLING. Move the mounting of /boot outside the ifdef. Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- arch/arm/mach-k3/common.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c index 13f3f5e169..ee20e23b1a 100644 --- a/arch/arm/mach-k3/common.c +++ b/arch/arm/mach-k3/common.c @@ -188,7 +188,6 @@ static int am625_init(void) } postcore_initcall(am625_init); -#if defined(CONFIG_ENV_HANDLING) static int omap_env_init(void) { char *partname, *cdevname, *envpath; @@ -227,14 +226,17 @@ static int omap_env_init(void) symlink(rootpath, "/boot"); - envpath = xasprintf("%s/barebox.env", rootpath); + if (IS_ENABLED(CONFIG_ENV_HANDLING)) { + envpath = xasprintf("%s/barebox.env", rootpath); - pr_debug("Loading default env from %s on device %s\n", - envpath, partname); + pr_debug("Loading default env from %s on device %s\n", + envpath, partname); - default_environment_path_set(envpath); + default_environment_path_set(envpath); + + free(envpath); + } - free(envpath); out: free(partname); free(cdevname); @@ -242,4 +244,3 @@ static int omap_env_init(void) return 0; } late_initcall(omap_env_init); -#endif -- 2.39.5