summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2013-12-18 19:00:51 +0900
committerTom Rini <trini@ti.com>2013-12-18 10:23:37 -0500
commit57270260adc6076facd284107be463f9beebb153 (patch)
tree280514e031d822df024ff6c32f69ad89f677f144 /Makefile
parentace8f506423458c172e2baeb9f858928872cc744 (diff)
downloadu-boot-imx-57270260adc6076facd284107be463f9beebb153.zip
u-boot-imx-57270260adc6076facd284107be463f9beebb153.tar.gz
u-boot-imx-57270260adc6076facd284107be463f9beebb153.tar.bz2
Makefile: fix broken pipe error for lcd4_lwmon5 board
Before this commit, a broken pipe error sometimes happened when building lcd4_lwmon5 board with Buildman. This commit re-writes build rules of u-boot.spr and u-boot-img-spl-at-end.bin more simply without using a pipe. Besides fixing a broken pipe error, this commit gives us other advantages: - Do not generate intermidiate files, spl/u-boot-spl.img and spl/u-boot-spl-pad.img for creating u-boot.spr - Do not generate an intermidiate file, u-boot-pad.img for creating u-boot-img-spl-at-end.bin Such intermidiate files were not deleted by "make clean" or "make mrpropr". Nor u-boot-pad.img was ignored by git. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 7 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index de36187..cbd45a7 100644
--- a/Makefile
+++ b/Makefile
@@ -471,12 +471,10 @@ $(obj)u-boot.sb: $(obj)u-boot.bin $(obj)spl/u-boot-spl.bin
$(obj)u-boot.spr: $(obj)u-boot.img $(obj)spl/u-boot-spl.bin
$(obj)tools/mkimage -A $(ARCH) -T firmware -C none \
-a $(CONFIG_SPL_TEXT_BASE) -e $(CONFIG_SPL_TEXT_BASE) -n XLOADER \
- -d $(obj)spl/u-boot-spl.bin $(obj)spl/u-boot-spl.img
- tr "\000" "\377" < /dev/zero | dd ibs=1 count=$(CONFIG_SPL_PAD_TO) \
- of=$(obj)spl/u-boot-spl-pad.img 2>/dev/null
- dd if=$(obj)spl/u-boot-spl.img of=$(obj)spl/u-boot-spl-pad.img \
- conv=notrunc 2>/dev/null
- cat $(obj)spl/u-boot-spl-pad.img $(obj)u-boot.img > $@
+ -d $(obj)spl/u-boot-spl.bin $@
+ $(OBJCOPY) -I binary -O binary \
+ --pad-to=$(CONFIG_SPL_PAD_TO) --gap-fill=0xff $@
+ cat $(obj)u-boot.img >> $@
ifneq ($(CONFIG_TEGRA),)
$(obj)u-boot-nodtb-tegra.bin: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
@@ -499,11 +497,9 @@ $(obj)u-boot-img.bin: $(obj)spl/u-boot-spl.bin $(obj)u-boot.img
# at the start padded up to the start of the SPL image. And then concat
# the SPL image to the end.
$(obj)u-boot-img-spl-at-end.bin: $(obj)spl/u-boot-spl.bin $(obj)u-boot.img
- tr "\000" "\377" < /dev/zero | dd ibs=1 count=$(CONFIG_UBOOT_PAD_TO) \
- of=$(obj)u-boot-pad.img 2>/dev/null
- dd if=$(obj)u-boot.img of=$(obj)u-boot-pad.img \
- conv=notrunc 2>/dev/null
- cat $(obj)u-boot-pad.img $(obj)spl/u-boot-spl.bin > $@
+ $(OBJCOPY) -I binary -O binary --pad-to=$(CONFIG_UBOOT_PAD_TO) \
+ --gap-fill=0xff $(obj)u-boot.img $@
+ cat $(obj)spl/u-boot-spl.bin >> $@
ifeq ($(CONFIG_SANDBOX),y)
GEN_UBOOT = \