summaryrefslogtreecommitdiff
path: root/include/env_default.h
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2016-06-17 14:24:07 +0900
committerTom Rini <trini@konsulko.com>2016-06-24 17:23:11 -0400
commit96044745cb8c086d47215f4aa7b4defb1d1fec57 (patch)
tree3e9f00e13c797353e21a9eaa650b8650e8c7f2cf /include/env_default.h
parent5847084f6bbd0778afb29f0574085d4210ea8cff (diff)
env: avoid build error for boards without CONFIG_SYS_{CPU, BOARD}
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>
Diffstat (limited to 'include/env_default.h')
-rw-r--r--include/env_default.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/env_default.h b/include/env_default.h
index 3096576836..ea6704a972 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