[U-Boot] [PATCH 3/5] kbuild: use $(call cmd, ) rather than $(call if_changed, ) where possible
Masahiro Yamada
yamada.masahiro at socionext.com
Wed Feb 3 13:05:12 CET 2016
These build commands are constant (mostly, just concatenating images,
or just copying). No need to use $(call if_changed,...) for them.
Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
---
Makefile | 26 +++++++++++++-------------
scripts/Makefile.spl | 4 ++--
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/Makefile b/Makefile
index 430dd4f..aaa5b44 100644
--- a/Makefile
+++ b/Makefile
@@ -827,8 +827,8 @@ quiet_cmd_copy = COPY $@
cmd_copy = cp $< $@
ifeq ($(CONFIG_OF_SEPARATE),y)
-u-boot-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE
- $(call if_changed,cat)
+u-boot-dtb.bin: u-boot-nodtb.bin dts/dt.dtb
+ $(call cmd,cat)
u-boot.bin: u-boot-dtb.bin FORCE
$(call if_changed,copy)
@@ -847,8 +847,8 @@ OBJCOPYFLAGS_u-boot.hex := -O ihex
OBJCOPYFLAGS_u-boot.srec := -O srec
-u-boot.hex u-boot.srec: u-boot FORCE
- $(call if_changed,objcopy)
+u-boot.hex u-boot.srec: u-boot
+ $(call cmd,objcopy)
OBJCOPYFLAGS_u-boot-nodtb.bin := -O binary \
$(if $(CONFIG_X86_RESET_VECTOR),-R .start16 -R .resetvec)
@@ -881,8 +881,8 @@ OBJCOPYFLAGS_u-boot.ldr.hex := -I binary -O ihex
OBJCOPYFLAGS_u-boot.ldr.srec := -I binary -O srec
-u-boot.ldr.hex u-boot.ldr.srec: u-boot.ldr FORCE
- $(call if_changed,objcopy)
+u-boot.ldr.hex u-boot.ldr.srec: u-boot.ldr
+ $(call cmd,objcopy)
#
# U-Boot entry point, needed for booting of full-blown U-Boot
@@ -954,7 +954,7 @@ lpc32xx-boot-1.bin: lpc32xx-spl.img
$(call if_changed,objcopy)
lpc32xx-full.bin: lpc32xx-boot-0.bin lpc32xx-boot-1.bin u-boot.img
- $(call if_changed,cat)
+ $(call cmd,cat)
CLEAN_FILES += lpc32xx-*
@@ -1060,8 +1060,8 @@ u-boot.rom: u-boot-x86-16bit.bin u-boot.bin
$(call if_changed,ifdtool)
OBJCOPYFLAGS_u-boot-x86-16bit.bin := -O binary -j .start16 -j .resetvec
-u-boot-x86-16bit.bin: u-boot FORCE
- $(call if_changed,objcopy)
+u-boot-x86-16bit.bin: u-boot
+ $(call cmd,objcopy)
endif
ifneq ($(CONFIG_SUNXI),)
@@ -1080,8 +1080,8 @@ OBJCOPYFLAGS_u-boot-tegra.bin = -O binary --pad-to=$(CONFIG_SYS_TEXT_BASE)
u-boot-tegra.bin: spl/u-boot-spl u-boot.bin FORCE
$(call if_changed,pad_cat)
-u-boot-dtb-tegra.bin: u-boot-tegra.bin FORCE
- $(call if_changed,copy)
+u-boot-dtb-tegra.bin: u-boot-tegra.bin
+ $(call cmd,copy)
endif
OBJCOPYFLAGS_u-boot-app.efi := $(OBJCOPYFLAGS_EFI)
@@ -1108,8 +1108,8 @@ OBJCOPYFLAGS_u-boot-payload.efi := $(OBJCOPYFLAGS_EFI)
u-boot-payload.efi: u-boot-payload FORCE
$(call if_changed,zobjcopy)
-u-boot-img.bin: spl/u-boot-spl.bin u-boot.img FORCE
- $(call if_changed,cat)
+u-boot-img.bin: spl/u-boot-spl.bin u-boot.img
+ $(call cmd,cat)
#Add a target to create boot binary having SPL binary in PBI format
#concatenated with u-boot binary. It is need by PowerPC SoC having
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
index d8b3947..2668ef3 100644
--- a/scripts/Makefile.spl
+++ b/scripts/Makefile.spl
@@ -167,8 +167,8 @@ quiet_cmd_copy = COPY $@
ifeq ($(CONFIG_SPL_OF_CONTROL),y)
$(obj)/$(SPL_BIN)-dtb.bin: $(obj)/$(SPL_BIN)-nodtb.bin $(obj)/$(SPL_BIN)-pad.bin \
- $(obj)/$(SPL_BIN).dtb FORCE
- $(call if_changed,cat)
+ $(obj)/$(SPL_BIN).dtb
+ $(call cmd,cat)
$(obj)/$(SPL_BIN).bin: $(obj)/$(SPL_BIN)-dtb.bin FORCE
$(call if_changed,copy)
--
1.9.1
More information about the U-Boot
mailing list