From patchwork Tue Aug 28 08:50:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 180382 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 4843A2C0099 for ; Tue, 28 Aug 2012 18:51:11 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9B4E4280AD; Tue, 28 Aug 2012 10:51:09 +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 n9wqSPdK5iWt; Tue, 28 Aug 2012 10:51:09 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 96E39280A9; Tue, 28 Aug 2012 10:51:08 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6D73C280A9 for ; Tue, 28 Aug 2012 10:51:07 +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 HDHvNGAgP3dV for ; Tue, 28 Aug 2012 10:51:05 +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 76522280A8 for ; Tue, 28 Aug 2012 10:51:03 +0200 (CEST) X-RZG-AUTH: :IW0NeWC7b/q2i6W/qstXb1SBUuFnrGohdvpEkce+Ub4+ReKfHD+mB0GMrenTvA== X-RZG-CLASS-ID: mo05 Received: from ubuntu-2012.fritz.box (p57B950F5.dip.t-dialin.net [87.185.80.245]) by smtp.strato.de (jored mo43) (RZmta 30.12 DYNA|AUTH) with ESMTPA id Q014fbo7S8KAQF ; Tue, 28 Aug 2012 10:51:00 +0200 (CEST) From: Stefan Roese To: u-boot@lists.denx.de Date: Tue, 28 Aug 2012 10:50:59 +0200 Message-Id: <1346143859-26733-1-git-send-email-sr@denx.de> X-Mailer: git-send-email 1.7.12 Cc: trini@ti.com Subject: [U-Boot] [PATCH] SPL: Enable use of custom defined U-Boot entry point 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 By setting CONFIG_SYS_UBOOT_START boards can now use a different entry point for their U-Boot image. So the U-Boot entry point is not fixed to CONFIG_SYS_TEXT_BASE any more. Signed-off-by: Stefan Roese --- common/spl/spl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index 7b5656a..26526f3 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -35,6 +35,9 @@ DECLARE_GLOBAL_DATA_PTR; +#ifndef CONFIG_SYS_UBOOT_START +#define CONFIG_SYS_UBOOT_START CONFIG_SYS_TEXT_BASE +#endif #ifndef CONFIG_SYS_MONITOR_LEN #define CONFIG_SYS_MONITOR_LEN (200 * 1024) #endif @@ -103,7 +106,7 @@ void spl_parse_image_header(const struct image_header *header) header->ih_magic); /* Let's assume U-Boot will not be more than 200 KB */ spl_image.size = CONFIG_SYS_MONITOR_LEN; - spl_image.entry_point = CONFIG_SYS_TEXT_BASE; + spl_image.entry_point = CONFIG_SYS_UBOOT_START; spl_image.load_addr = CONFIG_SYS_TEXT_BASE; spl_image.os = IH_OS_U_BOOT; spl_image.name = "U-Boot";