[PATCH 2/4] microblaze: merge build rules for linux.bin and simpleImage.$(DTB)
From: Masahiro Yamada
Date: Tue Jan 14 2025 - 13:16:29 EST
The build rules for $(obj)/linux.bin and $(obj)/simpleImage.$(DTB)
are identical.
The build rules for $(obj)/linux.bin.ub and $(obj)/simpleImage.$(DTB).ub
are also identical.
This commit consolidates the identical build rules.
Signed-off-by: Masahiro Yamada <masahiroy@xxxxxxxxxx>
---
arch/microblaze/boot/Makefile | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/arch/microblaze/boot/Makefile b/arch/microblaze/boot/Makefile
index 2b42c370d574..9e3fec78f084 100644
--- a/arch/microblaze/boot/Makefile
+++ b/arch/microblaze/boot/Makefile
@@ -7,12 +7,6 @@ targets := linux.bin linux.bin.gz linux.bin.ub simpleImage.*
OBJCOPYFLAGS := -R .note -R .comment -R .note.gnu.build-id -O binary
-$(obj)/linux.bin: vmlinux FORCE
- $(call if_changed,objcopy)
-
-$(obj)/linux.bin.ub: $(obj)/linux.bin FORCE
- $(call if_changed,uimage)
-
$(obj)/linux.bin.gz: $(obj)/linux.bin FORCE
$(call if_changed,gzip)
@@ -22,10 +16,10 @@ quiet_cmd_strip = STRIP $< $@$2
UIMAGE_LOADADDR = $(CONFIG_KERNEL_BASE_ADDR)
-$(obj)/simpleImage.$(DTB): vmlinux FORCE
+$(obj)/linux.bin $(obj)/simpleImage.$(DTB): vmlinux FORCE
$(call if_changed,objcopy)
-$(obj)/simpleImage.$(DTB).ub: $(obj)/simpleImage.$(DTB) FORCE
+$(obj)/linux.bin.ub $(obj)/simpleImage.$(DTB).ub: %.ub: % FORCE
$(call if_changed,uimage)
$(obj)/simpleImage.$(DTB).unstrip: vmlinux FORCE
--
2.43.0