From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Wed, 19 Sep 2012 17:39:45 -0500 Subject: [U-Boot] [PATCH v4 10/11] Add u-boot-pad.bin target to the Makefile In-Reply-To: <1348053927-16021-11-git-send-email-jose.goncalves@inov.pt> (from jose.goncalves@inov.pt on Wed Sep 19 06:25:26 2012) References: <1348053927-16021-1-git-send-email-jose.goncalves@inov.pt> <1348053927-16021-11-git-send-email-jose.goncalves@inov.pt> Message-ID: <1348094385.22800.13@snotra> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 09/19/2012 06:25:26 AM, Jos? Miguel Gon?alves wrote: > Samsung's S3C24XX SoCs need this in order to generate a binary image > with a padded SPL concatenated with U-Boot. > > Signed-off-by: Jos? Miguel Gon?alves > --- > Changes for v2: > - None > > Changes for v3: > - Changed new binary target name from u-boot-ubl.bin to > u-boot-pad.bin > > Changes for v4: > - None > --- > Makefile | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/Makefile b/Makefile > index 8738d55..86dedca 100644 > --- a/Makefile > +++ b/Makefile > @@ -433,14 +433,15 @@ $(obj)u-boot.sha1: $(obj)u-boot.bin > $(obj)u-boot.dis: $(obj)u-boot > $(OBJDUMP) -d $< > $@ > > -$(obj)u-boot.ubl: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin > +$(obj)u-boot-pad.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 > - cat $(obj)spl/u-boot-spl-pad.bin $(obj)u-boot.bin > > $(obj)u-boot-ubl.bin > - $(obj)tools/mkimage -n $(UBL_CONFIG) -T ublimage \ > - -e $(CONFIG_SYS_TEXT_BASE) -d $(obj)u-boot-ubl.bin > $(obj)u-boot.ubl > - rm $(obj)u-boot-ubl.bin > + cat $(obj)spl/u-boot-spl-pad.bin $(obj)u-boot.bin > > $(obj)u-boot-pad.bin > rm $(obj)spl/u-boot-spl-pad.bin This rule lists u-boot-spl.bin as a prerequisite, but it doesn't appear to use it -- it uses u-boot-spl instead. It seems that either spl/Makefile should produce u-boot-spl rather than u-boot-spl.bin and let the toplevel Makefile deal with converting it to a binary, or spl/Makefile should take care of adding any needed padding for the target and the final rule should just be a concatenation. -Scott