[PATCH 1/3] hwconfig: Allow to compile it without env support
Pali Rohár
pali at kernel.org
Sun Apr 3 00:24:25 CEST 2022
When env support is disabled then usage of env_get() generates linker
errors. So do not compile env_get() when env support is disabled (for
example when disabled only in SPL).
Signed-off-by: Pali Rohár <pali at kernel.org>
---
common/hwconfig.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/common/hwconfig.c b/common/hwconfig.c
index 63b3ccaf84e2..43566b81bd48 100644
--- a/common/hwconfig.c
+++ b/common/hwconfig.c
@@ -83,7 +83,9 @@ static const char *__hwconfig(const char *opt, size_t *arglen,
"and before environment is ready\n");
return NULL;
}
+#if CONFIG_IS_ENABLED(ENV_SUPPORT)
env_hwconfig = env_get("hwconfig");
+#endif
}
if (env_hwconfig) {
--
2.20.1
More information about the U-Boot
mailing list