From patchwork Fri Jan 24 10:38:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 313853 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id A4DB42C0089 for ; Fri, 24 Jan 2014 21:50:08 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 148194ACE8; Fri, 24 Jan 2014 11:44:51 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fh+VfMU15PgG; Fri, 24 Jan 2014 11:44:50 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AA11E4AD02; Fri, 24 Jan 2014 11:41:27 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D88CB4AC46 for ; Fri, 24 Jan 2014 11:40:02 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OSkWZLtQAF24 for ; Fri, 24 Jan 2014 11:39:50 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from smtp.mei.co.jp (smtp.mei.co.jp [133.183.100.20]) by theia.denx.de (Postfix) with ESMTP id 4DBA44AC4D for ; Fri, 24 Jan 2014 11:38:48 +0100 (CET) Received: from mail-gw.jp.panasonic.com ([157.8.1.157]) by smtp.mei.co.jp (8.12.11.20060614/3.7W/kc-maile13) with ESMTP id s0OAcPx1019055; Fri, 24 Jan 2014 19:38:25 +0900 (JST) Received: from epochmail.jp.panasonic.com ([157.8.1.130]) by mail.jp.panasonic.com (8.11.6p2/3.7W/kc-maili17) with ESMTP id s0OAcP312685; Fri, 24 Jan 2014 19:38:25 +0900 Received: by epochmail.jp.panasonic.com (8.12.11.20060308/3.7W/lomi17) id s0OAcPCX028744; Fri, 24 Jan 2014 19:38:25 +0900 Received: from poodle by lomi17.jp.panasonic.com (8.12.11.20060308/3.7W) with ESMTP id s0OAcPeg028725; Fri, 24 Jan 2014 19:38:25 +0900 Received: from beagle.diag.org (beagle.diag.org [10.184.179.16]) by poodle (Postfix) with ESMTP id 1F32D2740043; Fri, 24 Jan 2014 19:38:25 +0900 (JST) From: Masahiro Yamada To: u-boot@lists.denx.de Date: Fri, 24 Jan 2014 19:38:06 +0900 Message-Id: <1390559899-31430-26-git-send-email-yamada.m@jp.panasonic.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1390559899-31430-1-git-send-email-yamada.m@jp.panasonic.com> References: <1390559899-31430-1-git-send-email-yamada.m@jp.panasonic.com> Cc: Tom Rini Subject: [U-Boot] [PATCH v7 25/38] kbuild: move include directives of board configuration files X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de This commit changes the location of include directives of board configuration files. The purpose of this change is: - Slim down $(TOPDIR)/config.mk - Prevent $(TOPDIR)/Makefile from including the same configuration file twice - Do not include include/config.mk multiple times because ARCH, CPU, BOARD, VENDOR, SOC are exported Before this commit: - include/autoconf.mk was included from $(TOPDIR)/Makefile and $(TOPDIR)/config.mk (This means $(TOPDIR)/Makefile included include/autoconf.mk twice) - include/{spl,tpl}-autoconf.mk was included from $(TOPDIR)/config.mk - include/config.mk was included from $(TOPDIR)/Makefile and $(TOPDIR)/config.mk (This means $(TOPDIR)/Makefile included include/config.mk twice) After this commit: - include/autoconf.mk is included from $(TOPDIR)/Makefile and $(TOPDIR)/scripts/Makefile.build - include/{spl,tpl}-autoconf.mk is included from $(TOPDIR)/spl/Makefile and $(TOPDIR)/scripts/Makefile.build - include/config.mk is included from $(TOPDIR)/config.mk and $(TOPDIR)/spl/Makefile Signed-off-by: Masahiro Yamada --- Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None config.mk | 15 --------------- scripts/Makefile.build | 11 +++++++++++ spl/Makefile | 8 ++++++++ 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/config.mk b/config.mk index 1336ef8..5b886aa 100644 --- a/config.mk +++ b/config.mk @@ -13,21 +13,6 @@ PLATFORM_LDFLAGS = ######################################################################### -# Load generated board configuration -ifeq ($(CONFIG_TPL_BUILD),y) -# Include TPL autoconf -sinclude include/tpl-autoconf.mk -else -ifeq ($(CONFIG_SPL_BUILD),y) -# Include SPL autoconf -sinclude include/spl-autoconf.mk -else -# Include normal autoconf -sinclude include/autoconf.mk -endif -endif -sinclude $(OBJTREE)/include/config.mk - # Some architecture config.mk files need to know what CPUDIR is set to, # so calculate CPUDIR before including ARCH/SOC/CPU config.mk files. # Check if arch/$ARCH/cpu/$CPU exists, otherwise assume arch/$ARCH/cpu contains diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 921fbbf..f37957f 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -42,6 +42,17 @@ subdir-ccflags-y := # Read auto.conf if it exists, otherwise ignore -include include/config/auto.conf +# Added for U-Boot: Load U-Boot configuration +ifeq ($(CONFIG_TPL_BUILD),y) + -include include/tpl-autoconf.mk +else + ifeq ($(CONFIG_SPL_BUILD),y) + -include include/spl-autoconf.mk + else + -include include/autoconf.mk + endif +endif + include scripts/Kbuild.include # Modified for U-Boot # We must include config.mk after Kbuild.include: diff --git a/spl/Makefile b/spl/Makefile index 705dae3..3fe89cc 100644 --- a/spl/Makefile +++ b/spl/Makefile @@ -38,6 +38,14 @@ else SPL_BIN := u-boot-spl endif +include include/config.mk + +ifeq ($(CONFIG_TPL_BUILD),y) + -include include/tpl-autoconf.mk +else + -include include/spl-autoconf.mk +endif + include $(srctree)/scripts/Kbuild.include include $(TOPDIR)/config.mk