riscv: move the (z)install rules to arch/riscv/Makefile
PATCH 1/1 riscv: move the (z)install rules to arch/riscv/Makefile
Currently, the (z)install targets in arch/riscv/Makefile descend into arch/riscv/boot/Makefile to invoke the shell script, but there is no good reason to do so.
arch/riscv/Makefile can run the shell script directly.
---
arch/riscv/Makefile | 7 +++++-- arch/riscv/boot/Makefile | 8 -------- 2 files changed, 5 insertions(+), 10 deletions(-)
arch/riscv/Makefile +5 -2
@@ -126,8 +126,11 @@ $(BOOT_TARGETS): vmlinux Image.%: Image $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ -zinstall install: - $(Q)$(MAKE) $(build)=$(boot) $@ +install: install-image = Image +zinstall: install-image = Image.gz +install zinstall: + $(CONFIG_SHELL) $(srctree)/$(boot)/install.sh $(KERNELRELEASE) \ + $(boot)/$(install-image) System.map "$(INSTALL_PATH)" archclean: $(Q)$(MAKE) $(clean)=$(boot)
arch/riscv/boot/Makefile +0 -8
@@ -58,11 +58,3 @@ $(obj)/Image.lzo: $(obj)/Image FORCE $(obj)/loader.bin: $(obj)/loader FORCE $(call if_changed,objcopy) - -install: - $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ - $(obj)/Image System.map "$(INSTALL_PATH)" - -zinstall: - $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ - $(obj)/Image.gz System.map "$(INSTALL_PATH)"
Signature · 1 line
2.27.0
Palmer Dabbelt
maintainerQuoted 37 lines · On Thu, 29 Jul 2021 07:21:47 PDT (-0700), [email protected] wrote:
Currently, the (z)install targets in
arch/riscv/Makefiledescend intoarch/riscv/boot/Makefileto invoke the shell script, but there is no good reason to do so.
arch/riscv/Makefilecan run the shell script directly.Signed-off-by Masahiro Yamada <[email protected]>---
arch/riscv/Makefile | 7 +++++-- arch/riscv/boot/Makefile | 8 -------- 2 files changed, 5 insertions(+), 10 deletions(-)arch/riscv/Makefile +5
-2@@ -126,8 +126,11 @@ $(BOOT_TARGETS): vmlinux Image.%: Image $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ -zinstall install: - $(Q)$(MAKE) $(build)=$(boot) $@ +install: install-image = Image +zinstall: install-image = Image.gz +install zinstall: + $(CONFIG_SHELL) $(srctree)/$(boot)/install.sh $(KERNELRELEASE) \ + $(boot)/$(install-image) System.map "$(INSTALL_PATH)" archclean: $(Q)$(MAKE) $(clean)=$(boot)arch/riscv/boot/Makefile +0
-0@@ -58,11 +58,3 @@ $(obj)/Image.lzo: $(obj)/Image FORCE
arch/riscv/boot/Makefile $(obj)/Image.lzo: $(obj)/Image FORCE · line 68
Quoted 10 lines
arch/riscv/boot/Makefile +0
-8$(obj)/loader.bin: $(obj)/loader FORCE $(call if_changed,objcopy) - -install: - $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ - $(obj)/Image System.map "$(INSTALL_PATH)" - -zinstall: - $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ - $(obj)/Image.gz System.map "$(INSTALL_PATH)"
Admittidly I don't see a reason to do it this way either, but it looks like the other common ports (I checked arm64 and x86) are doing things this way. I don't really care that much about which way we do it, but it'd be better to keep everyone aligned.
Are you converting the other ports over as well?
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Quoted 55 lines · Palmer Dabbelt
Quoted 37 lines · On Thu, 29 Jul 2021 07:21:47 PDT (-0700), [email protected] wrote:
Currently, the (z)install targets in
arch/riscv/Makefiledescend intoarch/riscv/boot/Makefileto invoke the shell script, but there is no good reason to do so.
arch/riscv/Makefilecan run the shell script directly.Signed-off-by Masahiro Yamada <[email protected]>---
arch/riscv/Makefile | 7 +++++-- arch/riscv/boot/Makefile | 8 -------- 2 files changed, 5 insertions(+), 10 deletions(-)arch/riscv/Makefile +5
-2@@ -126,8 +126,11 @@ $(BOOT_TARGETS): vmlinux Image.%: Image $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ -zinstall install: - $(Q)$(MAKE) $(build)=$(boot) $@ +install: install-image = Image +zinstall: install-image = Image.gz +install zinstall: + $(CONFIG_SHELL) $(srctree)/$(boot)/install.sh $(KERNELRELEASE) \ + $(boot)/$(install-image) System.map "$(INSTALL_PATH)" archclean: $(Q)$(MAKE) $(clean)=$(boot)arch/riscv/boot/Makefile +0
-0@@ -58,11 +58,3 @@ $(obj)/Image.lzo: $(obj)/Image FORCEarch/riscv/boot/Makefile $(obj)/Image.lzo: $(obj)/Image FORCE · line 68
Quoted 10 lines
arch/riscv/boot/Makefile +0
-8$(obj)/loader.bin: $(obj)/loader FORCE $(call if_changed,objcopy) - -install: - $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ - $(obj)/Image System.map "$(INSTALL_PATH)" - -zinstall: - $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ - $(obj)/Image.gz System.map "$(INSTALL_PATH)"Admittidly I don't see a reason to do it this way either, but it looks like the other common ports (I checked arm64 and x86) are doing things this way. I don't really care that much about which way we do it, but it'd be better to keep everyone aligned.
Quoted 1 line
Are you converting the other ports over as well?
Yes.
Signature · 7 lines
Best Regards Masahiro Yamada _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
Palmer Dabbelt
maintainerQuoted 56 lines · On Sat, 14 Aug 2021 16:49:14 PDT (-0700), [email protected] wrote:
Quoted 55 lines · Palmer Dabbelt
Quoted 37 lines · On Thu, 29 Jul 2021 07:21:47 PDT (-0700), [email protected] wrote:
Currently, the (z)install targets in
arch/riscv/Makefiledescend intoarch/riscv/boot/Makefileto invoke the shell script, but there is no good reason to do so.
arch/riscv/Makefilecan run the shell script directly.Signed-off-by Masahiro Yamada <[email protected]>---
arch/riscv/Makefile | 7 +++++-- arch/riscv/boot/Makefile | 8 -------- 2 files changed, 5 insertions(+), 10 deletions(-)arch/riscv/Makefile +5
-2@@ -126,8 +126,11 @@ $(BOOT_TARGETS): vmlinux Image.%: Image $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ -zinstall install: - $(Q)$(MAKE) $(build)=$(boot) $@ +install: install-image = Image +zinstall: install-image = Image.gz +install zinstall: + $(CONFIG_SHELL) $(srctree)/$(boot)/install.sh $(KERNELRELEASE) \ + $(boot)/$(install-image) System.map "$(INSTALL_PATH)" archclean: $(Q)$(MAKE) $(clean)=$(boot)arch/riscv/boot/Makefile +0
-0@@ -58,11 +58,3 @@ $(obj)/Image.lzo: $(obj)/Image FORCEarch/riscv/boot/Makefile $(obj)/Image.lzo: $(obj)/Image FORCE · line 68
Quoted 10 lines
arch/riscv/boot/Makefile +0
-8$(obj)/loader.bin: $(obj)/loader FORCE $(call if_changed,objcopy) - -install: - $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ - $(obj)/Image System.map "$(INSTALL_PATH)" - -zinstall: - $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ - $(obj)/Image.gz System.map "$(INSTALL_PATH)"Admittidly I don't see a reason to do it this way either, but it looks like the other common ports (I checked arm64 and x86) are doing things this way. I don't really care that much about which way we do it, but it'd be better to keep everyone aligned.
Quoted 3 lines
Quoted 1 line
Are you converting the other ports over as well?
Yes.
Great, thanks. This is on for-next.