Commit e020c88a3cd7018112af18a7d3f73fca8a3beb1e

Authored by Simon Glass
1 parent 5efa28139c

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 <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

Showing 2 changed files with 7 additions and 3 deletions Side-by-side Diff

... ... @@ -780,8 +780,14 @@
780 780 LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE)
781 781 endif
782 782  
  783 +# Normally we fill empty space with 0xff
783 784 quiet_cmd_objcopy = OBJCOPY $@
784   -cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@
  785 +cmd_objcopy = $(OBJCOPY) --gap-fill=0xff $(OBJCOPYFLAGS) \
  786 + $(OBJCOPYFLAGS_$(@F)) $< $@
  787 +
  788 +# Provide a version which does not do this, for use by EFI
  789 +quiet_cmd_zobjcopy = OBJCOPY $@
  790 +cmd_zobjcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@
785 791  
786 792 quiet_cmd_mkimage = MKIMAGE $@
787 793 cmd_mkimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -d $< $@ \
... ... @@ -73,8 +73,6 @@
73 73  
74 74 RELFLAGS := $(PLATFORM_RELFLAGS)
75 75  
76   -OBJCOPYFLAGS += --gap-fill=0xff
77   -
78 76 PLATFORM_CPPFLAGS += $(RELFLAGS)
79 77 PLATFORM_CPPFLAGS += -pipe
80 78