From: Simon Glass Date: Fri, 31 Jul 2015 15:31:23 +0000 (-0600) Subject: Allow objcopy to work without filling gaps with 0xff X-Git-Tag: KARO-TX6-2015-09-18~926 X-Git-Url: https://git.kernelconcepts.de/?a=commitdiff_plain;h=04aad3893bec16934972ab7a9662ee85aa530ad6;p=karo-tx-uboot.git Allow objcopy to work without filling gaps with 0xff This is currently done for all targets, since 0xff is the default erased value for most flash devices. In some cases this is not what we want (e.g. for EFI images) so provide a command to do a vanilla objcopy. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- diff --git a/Makefile b/Makefile index 2996a0dbf3..7b13470de5 100644 --- a/Makefile +++ b/Makefile @@ -780,8 +780,14 @@ ifneq ($(CONFIG_SYS_TEXT_BASE),) LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE) endif +# Normally we fill empty space with 0xff quiet_cmd_objcopy = OBJCOPY $@ -cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@ +cmd_objcopy = $(OBJCOPY) --gap-fill=0xff $(OBJCOPYFLAGS) \ + $(OBJCOPYFLAGS_$(@F)) $< $@ + +# Provide a version which does not do this, for use by EFI +quiet_cmd_zobjcopy = OBJCOPY $@ +cmd_zobjcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@ quiet_cmd_mkimage = MKIMAGE $@ cmd_mkimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -d $< $@ \ diff --git a/config.mk b/config.mk index 6282919482..b77d58903c 100644 --- a/config.mk +++ b/config.mk @@ -73,8 +73,6 @@ endif RELFLAGS := $(PLATFORM_RELFLAGS) -OBJCOPYFLAGS += --gap-fill=0xff - PLATFORM_CPPFLAGS += $(RELFLAGS) PLATFORM_CPPFLAGS += -pipe