From patchwork Thu Sep 18 05:47:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alison Wang X-Patchwork-Id: 390649 X-Patchwork-Delegate: albert.aribaud@free.fr 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 4DC521400E2 for ; Thu, 18 Sep 2014 16:40:46 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EF7F2A7C2D; Thu, 18 Sep 2014 08:40:42 +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 CMOAX3XPegi4; Thu, 18 Sep 2014 08:40:42 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7BFCEA7C24; Thu, 18 Sep 2014 08:40:40 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 86D88A7C23 for ; Thu, 18 Sep 2014 08:40:34 +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 vnVygKQbtMy5 for ; Thu, 18 Sep 2014 08:40:32 +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 na01-by2-obe.outbound.protection.outlook.com (mail-by2on0117.outbound.protection.outlook.com [207.46.100.117]) by theia.denx.de (Postfix) with ESMTPS id 7A0DAA78F5 for ; Thu, 18 Sep 2014 08:40:28 +0200 (CEST) Received: from BLUPR03MB376.namprd03.prod.outlook.com (10.141.75.150) by BLUPR03MB357.namprd03.prod.outlook.com (10.141.75.151) with Microsoft SMTP Server (TLS) id 15.0.1034.13; Thu, 18 Sep 2014 06:40:22 +0000 Received: from DM2PR03CA0032.namprd03.prod.outlook.com (10.141.96.31) by BLUPR03MB376.namprd03.prod.outlook.com (10.141.75.150) with Microsoft SMTP Server (TLS) id 15.0.1019.16; Thu, 18 Sep 2014 06:40:20 +0000 Received: from BL2FFO11FD016.protection.gbl (2a01:111:f400:7c09::173) by DM2PR03CA0032.outlook.office365.com (2a01:111:e400:2428::31) with Microsoft SMTP Server (TLS) id 15.0.1029.13 via Frontend Transport; Thu, 18 Sep 2014 06:40:19 +0000 Received: from tx30smr01.am.freescale.net (192.88.168.50) by BL2FFO11FD016.mail.protection.outlook.com (10.173.160.224) with Microsoft SMTP Server (TLS) id 15.0.1029.15 via Frontend Transport; Thu, 18 Sep 2014 06:40:19 +0000 Received: from rock.ap.freescale.net (rock.ap.freescale.net [10.193.20.106]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id s8I6e7aA000575; Wed, 17 Sep 2014 23:40:17 -0700 From: Alison Wang To: , , , Date: Thu, 18 Sep 2014 13:47:13 +0800 Message-ID: <1411019239-12360-2-git-send-email-b18965@freescale.com> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1411019239-12360-1-git-send-email-b18965@freescale.com> References: <1411019239-12360-1-git-send-email-b18965@freescale.com> X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:CAL; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(189002)(199003)(64706001)(87936001)(105606002)(97736003)(99396002)(83072002)(229853001)(4396001)(68736004)(50226001)(47776003)(20776003)(107046002)(89996001)(85306004)(31966008)(19580405001)(87286001)(90102001)(77982003)(92726001)(26826002)(77156001)(85852003)(575784001)(104016003)(83322001)(46102003)(104166001)(93916002)(74662003)(107886001)(88136002)(92566001)(21056001)(33646002)(74502003)(76176999)(76482002)(81342003)(2201001)(36756003)(95666004)(6806004)(84676001)(48376002)(81542003)(80022003)(44976005)(79102003)(62966002)(106466001)(50466002)(19580395003)(50986999)(102836001)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR03MB376; H:tx30smr01.am.freescale.net; FPR:; MLV:ovrnspm; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;UriScan:;UriScan:; X-Forefront-PRVS: 033857D0BD Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=alison.wang@freescale.com; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB357; X-OriginatorOrg: freescale.com Subject: [U-Boot] [PATCH 1/7] spl: pbl: Add new SPL image for pblimage tool 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 For the pblimage tool, the SPL image is splitted into 64 byte chunks, and PBL needs a command for each piece. In current pblimage structure, the size of the SPL image should be a fixed value. Well, for LS102xA and some other ARM platforms, the size of the SPL image is changeable. So a new image spl/u-boot-spl-pbl-pad.bin is built, and the size of it is a fixed value "CONFIG_SPL_MAX_SIZE". Use it instead of spl/u-boot-spl.bin for LS102xA. CONFIG_SPL_PBL_PAD is used to enable this function. Signed-off-by: Alison Wang --- Makefile | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1fccd0b..6af424e 100644 --- a/Makefile +++ b/Makefile @@ -730,6 +730,7 @@ ALL-y += u-boot.srec u-boot.bin System.map binary_size_check ALL-$(CONFIG_ONENAND_U_BOOT) += u-boot-onenand.bin ifeq ($(CONFIG_SPL_FSL_PBL),y) ALL-$(CONFIG_RAMBOOT_PBL) += u-boot-with-spl-pbl.bin +ALL-$(CONFIG_SPL_PBL_PAD) += spl/u-boot-spl-pbl-pad.bin else ALL-$(CONFIG_RAMBOOT_PBL) += u-boot.pbl endif @@ -774,6 +775,8 @@ cmd_cat = cat $(filter-out $(PHONY), $^) > $@ append = cat $(filter-out $< $(PHONY), $^) >> $@ +cmd_pad = $(cmd_objcopy) + quiet_cmd_pad_cat = CAT $@ cmd_pad_cat = $(cmd_objcopy) && $(append) || rm -f $@ @@ -962,15 +965,27 @@ endif u-boot-img.bin: spl/u-boot-spl.bin u-boot.img FORCE $(call if_changed,cat) +ifdef CONFIG_SPL_PBL_PAD +SPLPBL_BINLOAD := spl/u-boot-spl-pbl-pad.bin +else +SPLPBL_BINLOAD := spl/u-boot-spl.bin +endif + #Add a target to create boot binary having SPL binary in PBI format #concatenated with u-boot binary. It is need by PowerPC SoC having #internal SRAM <= 512KB. MKIMAGEFLAGS_u-boot-spl.pbl = -n $(srctree)/$(CONFIG_SYS_FSL_PBL_RCW:"%"=%) \ -R $(srctree)/$(CONFIG_SYS_FSL_PBL_PBI:"%"=%) -T pblimage -spl/u-boot-spl.pbl: spl/u-boot-spl.bin FORCE +spl/u-boot-spl.pbl: $(SPLPBL_BINLOAD) FORCE $(call if_changed,mkimage) +OBJCOPYFLAGS_u-boot-spl-pbl-pad.bin = -I binary -O binary --pad-to=$(CONFIG_SPL_MAX_SIZE) \ + --gap-fill=0xff + +spl/u-boot-spl-pbl-pad.bin: spl/u-boot-spl.bin FORCE + $(call if_changed,pad) + OBJCOPYFLAGS_u-boot-with-spl-pbl.bin = -I binary -O binary --pad-to=$(CONFIG_SPL_PAD_TO) \ --gap-fill=0xff