From patchwork Fri Jan 17 11:10:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 312013 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 E72AD2C008F for ; Fri, 17 Jan 2014 22:14:29 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AC47E4B122; Fri, 17 Jan 2014 12:14:23 +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 Z2pt4sIbPgKh; Fri, 17 Jan 2014 12:14:23 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1C81F4B019; Fri, 17 Jan 2014 12:12:02 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F1DEC4AF6C for ; Fri, 17 Jan 2014 12:11:47 +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 lmYfNM5kAnUp for ; Fri, 17 Jan 2014 12:11:41 +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 1F9274AF54 for ; Fri, 17 Jan 2014 12:11:18 +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-maile14) with ESMTP id s0HBBD3Y008271; Fri, 17 Jan 2014 20:11:13 +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 s0HBBD303295; Fri, 17 Jan 2014 20:11:13 +0900 Received: by epochmail.jp.panasonic.com (8.12.11.20060308/3.7W/lomi17) id s0HBBDuD013758; Fri, 17 Jan 2014 20:11:13 +0900 Received: from poodle by lomi17.jp.panasonic.com (8.12.11.20060308/3.7W) with ESMTP id s0HBBDFL013693; Fri, 17 Jan 2014 20:11:13 +0900 Received: from beagle.diag.org (beagle.diag.org [10.184.179.16]) by poodle (Postfix) with ESMTP id 8D0862743A5D; Fri, 17 Jan 2014 20:11:13 +0900 (JST) From: Masahiro Yamada To: u-boot@lists.denx.de Date: Fri, 17 Jan 2014 20:10:54 +0900 Message-Id: <1389957067-951-26-git-send-email-yamada.m@jp.panasonic.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1389957067-951-1-git-send-email-yamada.m@jp.panasonic.com> References: <1389957067-951-1-git-send-email-yamada.m@jp.panasonic.com> Cc: Tom Rini Subject: [U-Boot] [PATCH v5 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 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 659060e..a795cb6 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