From patchwork Tue Oct 9 07:32:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 190234 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 8AD722C00D2 for ; Tue, 9 Oct 2012 18:34:00 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 518CF280A6; Tue, 9 Oct 2012 09:33:44 +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 X-Lh3D6kHGL9; Tue, 9 Oct 2012 09:33:44 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 596D3280BF; Tue, 9 Oct 2012 09:33:18 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 039DF28091 for ; Tue, 9 Oct 2012 09:33:15 +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 XgLwVuuJZ1O0 for ; Tue, 9 Oct 2012 09:33:14 +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 mo-p05-ob.rzone.de (mo-p05-ob.rzone.de [81.169.146.181]) by theia.denx.de (Postfix) with ESMTPS id C23C428098 for ; Tue, 9 Oct 2012 09:32:53 +0200 (CEST) X-RZG-AUTH: :IW0NeWC7b/q2i6W/qstXb1SBUuFnrGohdvpEkce+Ub4+ReKfHD+mCZKG5kE89A== X-RZG-CLASS-ID: mo05 Received: from ubuntu-2012.fritz.box (p57B9407E.dip.t-dialin.net [87.185.64.126]) by smtp.strato.de (jored mo39) (RZmta 30.20 DYNA|AUTH) with ESMTPA id q06aado99713BJ ; Tue, 9 Oct 2012 09:32:50 +0200 (CEST) From: Stefan Roese To: u-boot@lists.denx.de Date: Tue, 9 Oct 2012 09:32:32 +0200 Message-Id: <1349767953-25321-7-git-send-email-sr@denx.de> X-Mailer: git-send-email 1.7.12.2 In-Reply-To: <1349767953-25321-1-git-send-email-sr@denx.de> References: <1349767953-25321-1-git-send-email-sr@denx.de> Cc: Tom Rini Subject: [U-Boot] [PATCH v4 6/7] Makefile: Add possibility to set entry-point for u-boot.img 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 patch enabled boards using the SPL framework to set an entry point in the U-Boot mkimage image "u-boot.img". Until now the entry point in the header has been set to 0. By setting CONFIG_SYS_UBOOT_START in the board header, boards can override this default location. This will be used by the upcoming a3m071 MPC5200 board port. Signed-off-by: Stefan Roese --- Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 90e99af..0dc24d2 100644 --- a/Makefile +++ b/Makefile @@ -423,9 +423,18 @@ $(obj)u-boot.ldr.hex: $(obj)u-boot.ldr $(obj)u-boot.ldr.srec: $(obj)u-boot.ldr $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@ -I binary +# +# U-Boot entry point, needed for booting of full-blown U-Boot +# from the SPL U-Boot version. +# +ifndef CONFIG_SYS_UBOOT_START +CONFIG_SYS_UBOOT_START := 0 +endif + $(obj)u-boot.img: $(obj)u-boot.bin $(obj)tools/mkimage -A $(ARCH) -T firmware -C none \ - -O u-boot -a $(CONFIG_SYS_TEXT_BASE) -e 0 \ + -O u-boot -a $(CONFIG_SYS_TEXT_BASE) \ + -e $(CONFIG_SYS_UBOOT_START) \ -n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' $(VERSION_FILE) | \ sed -e 's/"[ ]*$$/ for $(BOARD) board"/') \ -d $< $@