From 39bc12ddc36c9e30199471da0f3a929b178a04b2 Mon Sep 17 00:00:00 2001 From: Joel Fernandes Date: Mon, 19 Aug 2013 16:14:14 +0800 Subject: SPL: Makefile: Build a separate autoconf.mk for SPL SPL defines CONFIG_SPL_BUILD but this does not percolate to the autoconf.mk Makefile. As a result the build breaks when CONFIG_SPL_BUILD is used in the board-specific include header file. With this, there is a possibility of having a CONFIG option defined in the header file but not defined in the Makefile causing all kinds of build failure and problems. It also messes things for up, for example, when one might want to undefine options to keep the SPL small and doesn't want to be stuck with the CONFIG options used for U-boot. Lastly, this also avoids defining special CONFIG_SPL_ variables for cases where some options are required in U-boot but not in SPL. We add a spl-autoconf.mk rule that is generated for SPL with the CONFIG_SPL_BUILD flag and conditionally include it for SPL builds. Signed-off-by: Joel Fernandes Signed-off-by: Ying Zhang --- config.mk | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'config.mk') diff --git a/config.mk b/config.mk index 3e84f36d83..54e99f4da3 100644 --- a/config.mk +++ b/config.mk @@ -145,7 +145,13 @@ CHECK = sparse ######################################################################### # Load generated board configuration +ifeq ($(CONFIG_SPL_BUILD),y) +# Include SPL autoconf +sinclude $(OBJTREE)/include/spl-autoconf.mk +else +# Include normal autoconf sinclude $(OBJTREE)/include/autoconf.mk +endif sinclude $(OBJTREE)/include/config.mk # Some architecture config.mk files need to know what CPUDIR is set to, -- cgit v1.2.3