linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] riscv: move the (z)install rules to arch/riscv/Makefile
@ 2021-07-29 14:21 Masahiro Yamada
  2021-08-14  5:00 ` Palmer Dabbelt
  0 siblings, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2021-07-29 14:21 UTC (permalink / raw)
  To: Paul Walmsley, Palmer Dabbelt, Albert Ou, linux-riscv
  Cc: Masahiro Yamada, Kefeng Wang, Tobias Klauser, Vitaly Wool, linux-kernel

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.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 arch/riscv/Makefile      | 7 +++++--
 arch/riscv/boot/Makefile | 8 --------
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
index bc74afdbf31e..3c437fb09a07 100644
--- a/arch/riscv/Makefile
+++ b/arch/riscv/Makefile
@@ -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)
diff --git a/arch/riscv/boot/Makefile b/arch/riscv/boot/Makefile
index 6bf299f70c27..becd0621071c 100644
--- a/arch/riscv/boot/Makefile
+++ b/arch/riscv/boot/Makefile
@@ -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)"
-- 
2.27.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] riscv: move the (z)install rules to arch/riscv/Makefile
  2021-07-29 14:21 [PATCH] riscv: move the (z)install rules to arch/riscv/Makefile Masahiro Yamada
@ 2021-08-14  5:00 ` Palmer Dabbelt
  2021-08-14 23:49   ` Masahiro Yamada
  0 siblings, 1 reply; 4+ messages in thread
From: Palmer Dabbelt @ 2021-08-14  5:00 UTC (permalink / raw)
  To: masahiroy
  Cc: Paul Walmsley, aou, linux-riscv, masahiroy, wangkefeng.wang,
	tklauser, vitaly.wool, linux-kernel

On Thu, 29 Jul 2021 07:21:47 PDT (-0700), masahiroy@kernel.org wrote:
> 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.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
>  arch/riscv/Makefile      | 7 +++++--
>  arch/riscv/boot/Makefile | 8 --------
>  2 files changed, 5 insertions(+), 10 deletions(-)
>
> diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
> index bc74afdbf31e..3c437fb09a07 100644
> --- a/arch/riscv/Makefile
> +++ b/arch/riscv/Makefile
> @@ -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)
> diff --git a/arch/riscv/boot/Makefile b/arch/riscv/boot/Makefile
> index 6bf299f70c27..becd0621071c 100644
> --- a/arch/riscv/boot/Makefile
> +++ b/arch/riscv/boot/Makefile
> @@ -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)"

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?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] riscv: move the (z)install rules to arch/riscv/Makefile
  2021-08-14  5:00 ` Palmer Dabbelt
@ 2021-08-14 23:49   ` Masahiro Yamada
  2021-09-11  6:46     ` Palmer Dabbelt
  0 siblings, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2021-08-14 23:49 UTC (permalink / raw)
  To: Palmer Dabbelt
  Cc: Paul Walmsley, Albert Ou, open list:SIFIVE DRIVERS, Kefeng Wang,
	Tobias Klauser, vitaly.wool, Linux Kernel Mailing List

On Sat, Aug 14, 2021 at 2:00 PM Palmer Dabbelt <palmer@dabbelt.com> wrote:
>
> On Thu, 29 Jul 2021 07:21:47 PDT (-0700), masahiroy@kernel.org wrote:
> > 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.
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > ---
> >
> >  arch/riscv/Makefile      | 7 +++++--
> >  arch/riscv/boot/Makefile | 8 --------
> >  2 files changed, 5 insertions(+), 10 deletions(-)
> >
> > diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
> > index bc74afdbf31e..3c437fb09a07 100644
> > --- a/arch/riscv/Makefile
> > +++ b/arch/riscv/Makefile
> > @@ -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)
> > diff --git a/arch/riscv/boot/Makefile b/arch/riscv/boot/Makefile
> > index 6bf299f70c27..becd0621071c 100644
> > --- a/arch/riscv/boot/Makefile
> > +++ b/arch/riscv/boot/Makefile
> > @@ -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)"
>
> 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?

Yes.


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] riscv: move the (z)install rules to arch/riscv/Makefile
  2021-08-14 23:49   ` Masahiro Yamada
@ 2021-09-11  6:46     ` Palmer Dabbelt
  0 siblings, 0 replies; 4+ messages in thread
From: Palmer Dabbelt @ 2021-09-11  6:46 UTC (permalink / raw)
  To: masahiroy
  Cc: Paul Walmsley, aou, linux-riscv, wangkefeng.wang, tklauser,
	vitaly.wool, linux-kernel

On Sat, 14 Aug 2021 16:49:14 PDT (-0700), masahiroy@kernel.org wrote:
> On Sat, Aug 14, 2021 at 2:00 PM Palmer Dabbelt <palmer@dabbelt.com> wrote:
>>
>> On Thu, 29 Jul 2021 07:21:47 PDT (-0700), masahiroy@kernel.org wrote:
>> > 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.
>> >
>> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
>> > ---
>> >
>> >  arch/riscv/Makefile      | 7 +++++--
>> >  arch/riscv/boot/Makefile | 8 --------
>> >  2 files changed, 5 insertions(+), 10 deletions(-)
>> >
>> > diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
>> > index bc74afdbf31e..3c437fb09a07 100644
>> > --- a/arch/riscv/Makefile
>> > +++ b/arch/riscv/Makefile
>> > @@ -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)
>> > diff --git a/arch/riscv/boot/Makefile b/arch/riscv/boot/Makefile
>> > index 6bf299f70c27..becd0621071c 100644
>> > --- a/arch/riscv/boot/Makefile
>> > +++ b/arch/riscv/boot/Makefile
>> > @@ -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)"
>>
>> 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?
>
> Yes.

Great, thanks.  This is on for-next.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-09-11  6:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-29 14:21 [PATCH] riscv: move the (z)install rules to arch/riscv/Makefile Masahiro Yamada
2021-08-14  5:00 ` Palmer Dabbelt
2021-08-14 23:49   ` Masahiro Yamada
2021-09-11  6:46     ` Palmer Dabbelt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).