]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
env: avoid build error for boards without CONFIG_SYS_{CPU, BOARD}
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 17 Jun 2016 05:24:07 +0000 (14:24 +0900)
committerTom Rini <trini@konsulko.com>
Fri, 24 Jun 2016 21:23:11 +0000 (17:23 -0400)
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

index 3096576836addf602971e6ea492c9588d55d9a31..ea6704a97299295a2e6113c00ec64fcd735c150f 100644 (file)
@@ -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