All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alison Wang <b18965@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/7] spl: pbl: Add new SPL image for pblimage tool
Date: Thu, 18 Sep 2014 13:47:13 +0800	[thread overview]
Message-ID: <1411019239-12360-2-git-send-email-b18965@freescale.com> (raw)
In-Reply-To: <1411019239-12360-1-git-send-email-b18965@freescale.com>

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 <alison.wang@freescale.com>
---
 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
 
-- 
1.8.0

  reply	other threads:[~2014-09-18  5:47 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-18  5:47 [U-Boot] [PATCH 0/7] Add SD boot support for LS1021AQDS/TWR board Alison Wang
2014-09-18  5:47 ` Alison Wang [this message]
2014-09-18  9:37   ` [U-Boot] [PATCH 1/7] spl: pbl: Add new SPL image for pblimage tool Albert ARIBAUD
2014-09-19  5:07     ` Huan Wang
2014-09-20  7:47       ` Albert ARIBAUD
2014-09-22  6:17         ` Huan Wang
2014-09-22 15:49           ` York Sun
2014-09-23  2:43             ` Huan Wang
2014-09-23  3:40               ` York Sun
2014-09-25  6:33                 ` Huan Wang
2014-09-18  5:47 ` [U-Boot] [PATCH 2/7] ls102xa: pblimage: Add pblimage tool support for LS102xA Alison Wang
2014-09-18  9:57   ` Albert ARIBAUD
2014-09-22  6:22     ` Huan Wang
2014-09-24  7:55       ` [U-Boot] [OT] " Albert ARIBAUD
2014-09-24  8:00         ` Huan Wang
2014-09-18  5:47 ` [U-Boot] [PATCH 3/7] spl: Use u-boot.img instead of u-boot.bin when CONFIG_SPL_PBL_PAD is enabled Alison Wang
2014-09-18  5:47 ` [U-Boot] [PATCH 4/7] ls102xa: qixis: Add CONFIG_QIXIS_I2C_ACCESS macro Alison Wang
2014-09-18  5:47 ` [U-Boot] [PATCH 5/7] common: spl: Add interactive DDR debugger support for SPL Alison Wang
2014-09-18  5:47 ` [U-Boot] [PATCH 6/7] arm: ls102xa: Add SD boot support for LS1021AQDS board Alison Wang
2014-09-18 11:20   ` Albert ARIBAUD
2014-09-19  3:40     ` Alison Wang
2014-09-19  5:10     ` Huan Wang
     [not found]     ` <1411053355745.66856@freescale.com>
2014-09-19 15:56       ` Albert ARIBAUD
2014-09-22  6:46         ` Huan Wang
2014-09-22 11:01           ` Albert ARIBAUD
2014-09-25  6:45             ` Huan Wang
2014-10-01 18:08               ` Albert ARIBAUD
2014-10-08  9:53                 ` Huan Wang
2014-10-11 11:30                   ` Albert ARIBAUD
2014-10-15  6:56                     ` Huan Wang
2014-10-15 10:30                       ` Albert ARIBAUD
2014-09-18  5:47 ` [U-Boot] [PATCH 7/7] arm: ls102xa: Add SD boot support for LS1021ATWR board Alison Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1411019239-12360-2-git-send-email-b18965@freescale.com \
    --to=b18965@freescale.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.