From 6113d3f27ca1414c98ffee90ed8f287898b73322 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Th=C3=A9baudeau?= Date: Thu, 11 Apr 2013 09:35:49 +0000 Subject: Makefile: Change CONFIG_SPL_PAD_TO to image offset MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change CONFIG_SPL_PAD_TO from a link address to an image offset since this is more handy and closer to the purpose of this config. Automatically define CONFIG_SPL_PAD_TO to CONFIG_SPL_MAX_SIZE (or 0 without CONFIG_SPL_MAX_SIZE). Test that CONFIG_SPL_PAD_TO >= CONFIG_SPL_MAX_SIZE if CONFIG_SPL_PAD_TO is non-zero. Signed-off-by: Benoît Thébaudeau --- Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 4ede9379d1..8d0e2b8552 100644 --- a/Makefile +++ b/Makefile @@ -486,9 +486,8 @@ $(obj)u-boot.dis: $(obj)u-boot $(obj)u-boot-with-spl.bin: $(obj)spl/u-boot-spl.bin $(obj)u-boot.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 + $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(CONFIG_SPL_PAD_TO) \ + -I binary -O binary $< $(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 -- cgit v1.2.1