From patchwork Thu Dec 6 23:33:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Wood X-Patchwork-Id: 204345 X-Patchwork-Delegate: kim.phillips@freescale.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 4E98A2C00C4 for ; Fri, 7 Dec 2012 10:33:42 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D1DB24A0FD; Fri, 7 Dec 2012 00:33:38 +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 oGHfQeYDJzRs; Fri, 7 Dec 2012 00:33:38 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 284AE4A0FF; Fri, 7 Dec 2012 00:33:35 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A62BC4A0ED for ; Fri, 7 Dec 2012 00:33:32 +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 kRz3De7DOPOo for ; Fri, 7 Dec 2012 00:33:30 +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 co1outboundpool.messaging.microsoft.com (co1ehsobe006.messaging.microsoft.com [216.32.180.189]) by theia.denx.de (Postfix) with ESMTPS id 6360F4A0EC for ; Fri, 7 Dec 2012 00:33:28 +0100 (CET) Received: from mail125-co1-R.bigfish.com (10.243.78.252) by CO1EHSOBE001.bigfish.com (10.243.66.64) with Microsoft SMTP Server id 14.1.225.23; Thu, 6 Dec 2012 23:33:25 +0000 Received: from mail125-co1 (localhost [127.0.0.1]) by mail125-co1-R.bigfish.com (Postfix) with ESMTP id CE222540250 for ; Thu, 6 Dec 2012 23:33:24 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzzz1de0h1202h1d1ah1d2ahzz8275bhz2dh2a8h668h839hd24he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1155h) Received: from mail125-co1 (localhost.localdomain [127.0.0.1]) by mail125-co1 (MessageSwitch) id 1354836802895311_1257; Thu, 6 Dec 2012 23:33:22 +0000 (UTC) Received: from CO1EHSMHS005.bigfish.com (unknown [10.243.78.254]) by mail125-co1.bigfish.com (Postfix) with ESMTP id D83A5A80075 for ; Thu, 6 Dec 2012 23:33:22 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CO1EHSMHS005.bigfish.com (10.243.66.15) with Microsoft SMTP Server (TLS) id 14.1.225.23; Thu, 6 Dec 2012 23:33:22 +0000 Received: from az84smr01.freescale.net (10.64.34.197) by 039-SN1MMR1-003.039d.mgd.msft.net (10.84.1.16) with Microsoft SMTP Server (TLS) id 14.2.318.3; Thu, 6 Dec 2012 23:33:21 +0000 Received: from snotra.am.freescale.net ([10.214.82.25]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id qB6NXINX019447; Thu, 6 Dec 2012 16:33:20 -0700 From: Scott Wood To: Date: Thu, 6 Dec 2012 17:33:16 -0600 Message-ID: <1354836798-17441-1-git-send-email-scottwood@freescale.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-OriginatorOrg: freescale.com Cc: Scott Wood Subject: [U-Boot] [PATCH 1/3] spl: Change PAD_TO to CONFIG_SPL_PAD_TO 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: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de This was already used by some SPL targets, and allows the pad amount to be specified by board config headers rather than only in makefile fragments. Also supply a pad-to of zero if the variable is undefined. It works without this, but this avoids relying on undocumented behavior. Signed-off-by: Scott Wood --- Makefile | 6 +++++- README | 4 ++++ board/ait/cam_enc_4xx/config.mk | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2132ebf..090e3ff 100644 --- a/Makefile +++ b/Makefile @@ -485,8 +485,12 @@ $(obj)u-boot.sha1: $(obj)u-boot.bin $(obj)u-boot.dis: $(obj)u-boot $(OBJDUMP) -d $< > $@ + + $(obj)u-boot-with-spl.bin: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin - $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $(obj)spl/u-boot-spl $(obj)spl/u-boot-spl-pad.bin + $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(or $(CONFIG_SPL_PAD_TO),0) \ + -O binary $(obj)spl/u-boot-spl \ + $(obj)spl/u-boot-spl-pad.bin cat $(obj)spl/u-boot-spl-pad.bin $(obj)u-boot.bin > $@ rm $(obj)spl/u-boot-spl-pad.bin diff --git a/README b/README index ed7d270..3c3de4f 100644 --- a/README +++ b/README @@ -2784,6 +2784,10 @@ FIT uImage format: CONFIG_SPL_LIBGENERIC_SUPPORT Support for lib/libgeneric.o in SPL binary + CONFIG_SPL_PAD_TO + Linker address to which the SPL should be padded before + appending the SPL payload. + CONFIG_SPL_TARGET Final target image containing SPL and payload. Some SPLs use an arch-specific makefile fragment instead, for diff --git a/board/ait/cam_enc_4xx/config.mk b/board/ait/cam_enc_4xx/config.mk index 744b927..c280029 100644 --- a/board/ait/cam_enc_4xx/config.mk +++ b/board/ait/cam_enc_4xx/config.mk @@ -8,7 +8,7 @@ # #Provide at least 16MB spacing between us and the Linux Kernel image -PAD_TO := 12320 +CONFIG_SPL_PAD_TO := 12320 UBL_CONFIG = $(SRCTREE)/board/$(BOARDDIR)/ublimage.cfg ifndef CONFIG_SPL_BUILD ALL-y += $(obj)u-boot.ubl