diff mbox series

[3/3] powerpc: move the install rule to arch/powerpc/Makefile

Message ID 20210729141937.445051-3-masahiroy@kernel.org (mailing list archive)
State Accepted
Headers show
Series [1/3] powerpc: remove unused zInstall target from arch/powerpc/boot/Makefile | expand

Checks

Context Check Description
snowpatch_ozlabs/github-powerpc_selftests success Successfully ran 8 jobs.
snowpatch_ozlabs/github-powerpc_ppctests success Successfully ran 8 jobs.
snowpatch_ozlabs/github-powerpc_clang success Successfully ran 8 jobs.
snowpatch_ozlabs/github-powerpc_sparse success Successfully ran 4 jobs.
snowpatch_ozlabs/github-powerpc_kernel_qemu success Successfully ran 25 jobs.

Commit Message

Masahiro Yamada July 29, 2021, 2:19 p.m. UTC
Currently, the install target in arch/powerpc/Makefile descends into
arch/powerpc/boot/Makefile to invoke the shell script, but there is no
good reason to do so.

arch/powerpc/Makefile can run the shell script directly.

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

 arch/powerpc/Makefile      | 3 ++-
 arch/powerpc/boot/Makefile | 6 ------
 2 files changed, 2 insertions(+), 7 deletions(-)

Comments

Nick Desaulniers July 30, 2021, 8:29 p.m. UTC | #1
On Thu, Jul 29, 2021 at 7:22 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> Currently, the install target in arch/powerpc/Makefile descends into
> arch/powerpc/boot/Makefile to invoke the shell script, but there is no
> good reason to do so.

Sure, but there are more arch/ subdirs that DO invoke install.sh from
arch/<arch>/boot/Makefile than, not:

arch/<arch>/boot/Makefile:
- parisc
- nios2
- arm
- nds32
- sparc
- riscv
- 390
- ppc (this patch)
- x86
- arm64

arch/<arch>/Makefile:
- ia64
- m68k

Patch is fine, but right now the tree is a bit inconsistent.

>
> arch/powerpc/Makefile can run the shell script directly.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
>  arch/powerpc/Makefile      | 3 ++-
>  arch/powerpc/boot/Makefile | 6 ------
>  2 files changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> index 6505d66f1193..9aaf1abbc641 100644
> --- a/arch/powerpc/Makefile
> +++ b/arch/powerpc/Makefile
> @@ -407,7 +407,8 @@ endef
>
>  PHONY += install
>  install:
> -       $(Q)$(MAKE) $(build)=$(boot) install
> +       sh -x $(srctree)/$(boot)/install.sh "$(KERNELRELEASE)" vmlinux \
> +       System.map "$(INSTALL_PATH)"
>
>  archclean:
>         $(Q)$(MAKE) $(clean)=$(boot)
> diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
> index 0d165bd98b61..10c0fb306f15 100644
> --- a/arch/powerpc/boot/Makefile
> +++ b/arch/powerpc/boot/Makefile
> @@ -444,12 +444,6 @@ $(obj)/zImage:             $(addprefix $(obj)/, $(image-y))
>  $(obj)/zImage.initrd:  $(addprefix $(obj)/, $(initrd-y))
>         $(Q)rm -f $@; ln $< $@
>
> -# Only install the vmlinux
> -install:
> -       sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)"
> -
> -PHONY += install
> -
>  # anything not in $(targets)
>  clean-files += $(image-) $(initrd-) cuImage.* dtbImage.* treeImage.* \
>         zImage zImage.initrd zImage.chrp zImage.coff zImage.holly \
> --
> 2.27.0
>
Masahiro Yamada Aug. 18, 2021, 1:58 p.m. UTC | #2
On Sat, Jul 31, 2021 at 5:30 AM Nick Desaulniers
<ndesaulniers@google.com> wrote:
>
> On Thu, Jul 29, 2021 at 7:22 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
> >
> > Currently, the install target in arch/powerpc/Makefile descends into
> > arch/powerpc/boot/Makefile to invoke the shell script, but there is no
> > good reason to do so.
>
> Sure, but there are more arch/ subdirs that DO invoke install.sh from
> arch/<arch>/boot/Makefile than, not:
>
> arch/<arch>/boot/Makefile:
> - parisc
> - nios2
> - arm
> - nds32
> - sparc
> - riscv
> - 390
> - ppc (this patch)
> - x86
> - arm64

I sent patches for these architectures.

Check LKML.






> arch/<arch>/Makefile:
> - ia64
> - m68k
>
> Patch is fine, but right now the tree is a bit inconsistent.
>
> >
> > arch/powerpc/Makefile can run the shell script directly.
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > ---
> >
> >  arch/powerpc/Makefile      | 3 ++-
> >  arch/powerpc/boot/Makefile | 6 ------
> >  2 files changed, 2 insertions(+), 7 deletions(-)
> >
> > diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> > index 6505d66f1193..9aaf1abbc641 100644
> > --- a/arch/powerpc/Makefile
> > +++ b/arch/powerpc/Makefile
> > @@ -407,7 +407,8 @@ endef
> >
> >  PHONY += install
> >  install:
> > -       $(Q)$(MAKE) $(build)=$(boot) install
> > +       sh -x $(srctree)/$(boot)/install.sh "$(KERNELRELEASE)" vmlinux \
> > +       System.map "$(INSTALL_PATH)"
> >
> >  archclean:
> >         $(Q)$(MAKE) $(clean)=$(boot)
> > diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
> > index 0d165bd98b61..10c0fb306f15 100644
> > --- a/arch/powerpc/boot/Makefile
> > +++ b/arch/powerpc/boot/Makefile
> > @@ -444,12 +444,6 @@ $(obj)/zImage:             $(addprefix $(obj)/, $(image-y))
> >  $(obj)/zImage.initrd:  $(addprefix $(obj)/, $(initrd-y))
> >         $(Q)rm -f $@; ln $< $@
> >
> > -# Only install the vmlinux
> > -install:
> > -       sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)"
> > -
> > -PHONY += install
> > -
> >  # anything not in $(targets)
> >  clean-files += $(image-) $(initrd-) cuImage.* dtbImage.* treeImage.* \
> >         zImage zImage.initrd zImage.chrp zImage.coff zImage.holly \
> > --
> > 2.27.0
> >
>
>
> --
> Thanks,
> ~Nick Desaulniers
diff mbox series

Patch

diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 6505d66f1193..9aaf1abbc641 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -407,7 +407,8 @@  endef
 
 PHONY += install
 install:
-	$(Q)$(MAKE) $(build)=$(boot) install
+	sh -x $(srctree)/$(boot)/install.sh "$(KERNELRELEASE)" vmlinux \
+	System.map "$(INSTALL_PATH)"
 
 archclean:
 	$(Q)$(MAKE) $(clean)=$(boot)
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 0d165bd98b61..10c0fb306f15 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -444,12 +444,6 @@  $(obj)/zImage:		$(addprefix $(obj)/, $(image-y))
 $(obj)/zImage.initrd:	$(addprefix $(obj)/, $(initrd-y))
 	$(Q)rm -f $@; ln $< $@
 
-# Only install the vmlinux
-install:
-	sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)"
-
-PHONY += install
-
 # anything not in $(targets)
 clean-files += $(image-) $(initrd-) cuImage.* dtbImage.* treeImage.* \
 	zImage zImage.initrd zImage.chrp zImage.coff zImage.holly \