summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2013-03-12 06:16:51 +0000
committerTom Rini <trini@ti.com>2013-03-12 14:51:16 -0400
commit2a8b53ad9dc180ef000643da5fba26506508e850 (patch)
treeed8106d7ff77c500b3910ac1c3c793c849b4323e
parent84872d1b632efd0e02f295b7042ee10e68ca0060 (diff)
SPL: Fix build of CONFIG_SPL_NET_SUPPORT
With CONFIG_SPL_NET_SUPPORT set we bring in most of the environment related code. This in turn means that while we discard the callback saftey checks in the environment, we had still needed their __start/__end linker symbols. In most cases this had been working because we generated u-boot.lst for the main U-Boot build prior to creating u-boot-spl.lds. With a sufficiently large machine this is not the case and exposed this latent bug which is that as of f8cfcf1 there are no callback linker entries so not __start/__end symbol was generated. As the environment is not user modifiable in this particular run-time (for any variable that had a callback associated with it) we simply provide an empty env_callback_init in SPL. Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Scott Wood <scottwood@freescale.com> Tested-by: Tom Rini <trini@ti.com> (Ran with am335x_evm_usbspl build) Signed-off-by: Tom Rini <trini@ti.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
-rw-r--r--common/Makefile3
-rw-r--r--common/spl/spl.c12
2 files changed, 12 insertions, 3 deletions
diff --git a/common/Makefile b/common/Makefile
index 54fcc81588..79379de735 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -210,10 +210,7 @@ COBJS-y += cmd_nvedit.o
COBJS-y += env_common.o
COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o
COBJS-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o
-COBJS-$(CONFIG_SPL_NET_SUPPORT) += cmd_nvedit.o
COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_attr.o
-COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_callback.o
-COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_common.o
COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_flags.o
COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_nowhere.o
COBJS-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 6a5a1365a1..4765e41d9c 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -32,6 +32,7 @@
#include <image.h>
#include <malloc.h>
#include <linux/compiler.h>
+#include <env_callback.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -266,3 +267,14 @@ void preloader_console_init(void)
spl_display_print();
#endif
}
+
+/*
+ * When CONFIG_SPL_NET_SUPPORT is set, we bring in and require a large
+ * subset of the environment code. However, as the environment is not
+ * modifable interactively in this case we remove the environment
+ * callback support from the binary. To do so we must provide an empty
+ * env_callback_init function.
+ */
+void env_callback_init(ENTRY *var_entry)
+{
+}