From patchwork Tue Aug 5 06:25: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: 376562 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 85E9A14009C for ; Tue, 5 Aug 2014 16:25:33 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2329DB3788; Tue, 5 Aug 2014 08:25:30 +0200 (CEST) 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 YpSrpH4GYqKV; Tue, 5 Aug 2014 08:25:29 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 59A90B3790; Tue, 5 Aug 2014 08:25:28 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BEF5DB3790 for ; Tue, 5 Aug 2014 08:25:22 +0200 (CEST) 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 d897335g2Bcd for ; Tue, 5 Aug 2014 08:25:19 +0200 (CEST) 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 8E123B3788 for ; Tue, 5 Aug 2014 08:25:14 +0200 (CEST) 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 s756PAgk014360 for ; Tue, 5 Aug 2014 15:25:10 +0900 (JST) Received: from epochmail.jp.panasonic.com ([157.8.1.130]) by mail.jp.panasonic.com (8.11.6p2/3.7W/kc-maili13) with ESMTP id s756PAJ14638 for ; Tue, 5 Aug 2014 15:25:10 +0900 Received: by epochmail.jp.panasonic.com (8.12.11.20060308/3.7W/lomi11) id s756PAwe020236; Tue, 5 Aug 2014 15:25:10 +0900 Received: from poodle by lomi11.jp.panasonic.com (8.12.11.20060308/3.7W) with ESMTP id s756PA40020222; Tue, 5 Aug 2014 15:25:10 +0900 Received: from beagle.diag.org (beagle.diag.org [10.184.179.16]) by poodle (Postfix) with ESMTP id 9F8E92743A5C; Tue, 5 Aug 2014 15:25:10 +0900 (JST) From: Masahiro Yamada To: u-boot@lists.denx.de Date: Tue, 5 Aug 2014 15:25:06 +0900 Message-Id: <1407219906-26056-1-git-send-email-yamada.m@jp.panasonic.com> X-Mailer: git-send-email 1.9.1 Subject: [U-Boot] [PATCH] doc: README.SPL: adjust for Kbuild and Kconfig 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 Reflect the latest build system to doc/README.SPL. Signed-off-by: Masahiro Yamada --- doc/README.SPL | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/doc/README.SPL b/doc/README.SPL index 2b4b0b8..c283dcf 100644 --- a/doc/README.SPL +++ b/doc/README.SPL @@ -13,34 +13,29 @@ can be reused. No code duplication or symlinking is necessary anymore. How it works ------------ -There is a new directory $(srctree)/spl which contains only a Makefile. -The object files are built separately for SPL and placed in this directory. +The object files for SPL are built separately and placed in the "spl" directory. The final binaries which are generated are u-boot-spl, u-boot-spl.bin and u-boot-spl.map. -During the SPL build a variable named CONFIG_SPL_BUILD is exported -in the make environment and also appended to CPPFLAGS with -DCONFIG_SPL_BUILD. +A config option named CONFIG_SPL_BUILD is enabled by Kconfig for SPL. Source files can therefore be compiled for SPL with different settings. -ARM-based boards have previously used the option CONFIG_PRELOADER for it. For example: ifeq ($(CONFIG_SPL_BUILD),y) -COBJS-y += board_spl.o +obj-y += board_spl.o else -COBJS-y += board.o +obj-y += board.o endif -COBJS-$(CONFIG_SPL_BUILD) += foo.o +obj-$(CONFIG_SPL_BUILD) += foo.o #ifdef CONFIG_SPL_BUILD foo(); #endif -The building of SPL images can be with: - -#define CONFIG_SPL 1 +The building of SPL images can be enabled by CONFIG_SPL option in Kconfig. Because SPL images normally have a different text base, one has to be configured by defining CONFIG_SPL_TEXT_BASE. The linker script has to be @@ -70,17 +65,6 @@ CONFIG_SPL_SPI_LOAD (drivers/mtd/spi/spi_spl_load.o) CONFIG_SPL_RAM_DEVICE (common/spl/spl.c) CONFIG_SPL_WATCHDOG_SUPPORT (drivers/watchdog/libwatchdog.o) -Normally CPU is assumed to be the same between the SPL and normal -u-boot build. However it is possible to specify a different CPU for -the SPL build for cases where the SPL is expected to run on a -different CPU model from the main u-boot. This is done by specifying -an SPL CPU in boards.cfg as follows: - - normal_cpu:spl_cpu - -This case CPU will be set to "normal_cpu" during the main u-boot -build and "spl_cpu" during the SPL build. - Debugging ---------