From: Stefan Roese Date: Thu, 28 Jan 2016 16:34:40 +0000 (+0100) Subject: autoboot.c: Fill env vars in process_fdt_options() only if TEXT_BASE is set X-Git-Tag: v2016.03-rc2~129 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9f73690cebfd57ff713098da8604738dbaa688ce;p=u-boot autoboot.c: Fill env vars in process_fdt_options() only if TEXT_BASE is set The x86 build target "efi-x86" has no TEXT_BASE configured. And with the introduction of CONFIG_BOOTDELAY for x86, this function is now called for this board as well. Resulting in compile errors for this target. Without TEXT_BASE it makes no sense to fill these values. So lets only configure the env variable if TEXT_BASE is defined. Signed-off-by: Stefan Roese Cc: Simon Glass Cc: Bin Meng Cc: Tom Rini Reviewed-by: Simon Glass Reviewed-by: Bin Meng --- diff --git a/common/autoboot.c b/common/autoboot.c index c11fb31236..223e062740 100644 --- a/common/autoboot.c +++ b/common/autoboot.c @@ -287,7 +287,7 @@ static int abortboot(int bootdelay) static void process_fdt_options(const void *blob) { -#if defined(CONFIG_OF_CONTROL) +#if defined(CONFIG_OF_CONTROL) && defined(CONFIG_SYS_TEXT_BASE) ulong addr; /* Add an env variable to point to a kernel payload, if available */ @@ -299,7 +299,7 @@ static void process_fdt_options(const void *blob) addr = fdtdec_get_config_int(gd->fdt_blob, "rootdisk-offset", 0); if (addr) setenv_addr("rootaddr", (void *)(CONFIG_SYS_TEXT_BASE + addr)); -#endif /* CONFIG_OF_CONTROL */ +#endif /* CONFIG_OF_CONTROL && CONFIG_SYS_TEXT_BASE */ } const char *bootdelay_process(void)