diff mbox

env: avoid build error for boards without CONFIG_SYS_{CPU, BOARD}

Message ID 1466141047-23521-1-git-send-email-yamada.masahiro@socionext.com
State Accepted
Commit 96044745cb8c086d47215f4aa7b4defb1d1fec57
Headers show

Commit Message

Masahiro Yamada June 17, 2016, 5:24 a.m. UTC
If CONFIG_ENV_VARS_UBOOT_CONFIG is enabled (it is by distro), this
code causes build error for boards without CONFIG_SYS_{CPU,_BOARD}.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

---

 include/env_default.h | 4 ++++
 1 file changed, 4 insertions(+)

-- 
1.9.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
diff mbox

Patch

diff --git a/include/env_default.h b/include/env_default.h
index 3096576..ea6704a 100644
--- a/include/env_default.h
+++ b/include/env_default.h
@@ -90,9 +90,13 @@  const uchar default_environment[] = {
 #endif
 #ifdef	CONFIG_ENV_VARS_UBOOT_CONFIG
 	"arch="		CONFIG_SYS_ARCH			"\0"
+#ifdef CONFIG_SYS_CPU
 	"cpu="		CONFIG_SYS_CPU			"\0"
+#endif
+#ifdef CONFIG_SYS_BOARD
 	"board="	CONFIG_SYS_BOARD		"\0"
 	"board_name="	CONFIG_SYS_BOARD		"\0"
+#endif
 #ifdef CONFIG_SYS_VENDOR
 	"vendor="	CONFIG_SYS_VENDOR		"\0"
 #endif