Commit c913e5f95e54 ("powerpc/boot: Don't install zImage.* from make
install") added the zInstall target to arch/powerpc/boot/Makefile,
but you cannot use it since the corresponding hook is missing in
arch/powerpc/Makefile.
It has never worked since its addition. Nobody has complained about
it for 7 years, which means this code was unneeded.
With this removal, the install.sh will be passed in with 4 parameters.
Simplify the shell script.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
arch/powerpc/boot/Makefile | 6 +-----
arch/powerpc/boot/install.sh | 13 -------------
2 files changed, 1 insertion(+), 18 deletions(-)
@@ -448,11 +448,7 @@ $(obj)/zImage.initrd: $(addprefix $(obj)/, $(initrd-y))install:$(CONFIGURE)$(addprefix$(obj)/, $(image-y))sh-x$(srctree)/$(src)/install.sh"$(KERNELRELEASE)"vmlinuxSystem.map"$(INSTALL_PATH)"-# Install the vmlinux and other built boot targets.-zInstall:$(CONFIGURE)$(addprefix$(obj)/, $(image-y))-sh-x$(srctree)/$(src)/install.sh"$(KERNELRELEASE)"vmlinuxSystem.map"$(INSTALL_PATH)"$^--PHONY+=installzInstall+PHONY+=install# anything not in $(targets)clean-files+=$(image-)$(initrd-)cuImage.*dtbImage.*treeImage.*\
@@ -15,7 +15,6 @@# $2 - kernel image file# $3 - kernel map file# $4 - default install path (blank if root directory)-# $5 and more - kernel boot files; zImage*, uImage, cuImage.*, etc.## Bail with error code if anything goes wrong
@@ -41,15 +40,3 @@ fi cat$2>$4/$image_name cp$3$4/System.map--# Copy all the bootable image files-path=$4-shift4-while[$#-ne0];do-image_name=`basename$1`-if[-f$path/$image_name];then-mv$path/$image_name$path/$image_name.old-fi-cat$1>$path/$image_name-shift-done;
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(-)
@@ -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)"vmlinuxSystem.map"$(INSTALL_PATH)"--PHONY+=install-# anything not in $(targets)clean-files+=$(image-)$(initrd-)cuImage.*dtbImage.*treeImage.*\zImagezImage.initrdzImage.chrpzImage.coffzImage.holly\
The install target should not depend on any build artifact.
The reason is explained in commit 19514fc665ff ("arm, kbuild: make
"make install" not depend on vmlinux").
Change the PowerPC installation code in a similar way.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
arch/powerpc/boot/Makefile | 2 +-
arch/powerpc/boot/install.sh | 14 ++++++++++++++
2 files changed, 15 insertions(+), 1 deletion(-)
@@ -20,6 +20,20 @@# Bail with error code if anything goes wrongset-e+verify(){+if[!-f"$1"];then+echo""1>&2+echo" *** Missing file: $1"1>&2+echo' *** You need to run "make" before "make install".'1>&2+echo""1>&2+exit1+fi+}++# Make sure the files actually exist+verify"$2"+verify"$3"+# User may have a custom install scriptif[-x~/bin/${INSTALLKERNEL}];thenexec~/bin/${INSTALLKERNEL}"$@";fi
From: Nick Desaulniers <ndesaulniers@google.com> Date: 2021-07-30 20:20:52
On Thu, Jul 29, 2021 at 7:22 AM Masahiro Yamada [off-list ref] wrote:
Commit c913e5f95e54 ("powerpc/boot: Don't install zImage.* from make
install") added the zInstall target to arch/powerpc/boot/Makefile,
but you cannot use it since the corresponding hook is missing in
arch/powerpc/Makefile.
It has never worked since its addition. Nobody has complained about
it for 7 years, which means this code was unneeded.
With this removal, the install.sh will be passed in with 4 parameters.
Simplify the shell script.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
@@ -448,11 +448,7 @@ $(obj)/zImage.initrd: $(addprefix $(obj)/, $(initrd-y))install:$(CONFIGURE)$(addprefix$(obj)/, $(image-y))sh-x$(srctree)/$(src)/install.sh"$(KERNELRELEASE)"vmlinuxSystem.map"$(INSTALL_PATH)"-# Install the vmlinux and other built boot targets.-zInstall:$(CONFIGURE)$(addprefix$(obj)/, $(image-y))-sh-x$(srctree)/$(src)/install.sh"$(KERNELRELEASE)"vmlinuxSystem.map"$(INSTALL_PATH)"$^--PHONY+=installzInstall+PHONY+=install# anything not in $(targets)clean-files+=$(image-)$(initrd-)cuImage.*dtbImage.*treeImage.*\
@@ -15,7 +15,6 @@# $2 - kernel image file# $3 - kernel map file# $4 - default install path (blank if root directory)-# $5 and more - kernel boot files; zImage*, uImage, cuImage.*, etc.## Bail with error code if anything goes wrong
@@ -41,15 +40,3 @@ fi cat$2>$4/$image_name cp$3$4/System.map--# Copy all the bootable image files-path=$4-shift4-while[$#-ne0];do-image_name=`basename$1`-if[-f$path/$image_name];then-mv$path/$image_name$path/$image_name.old-fi-cat$1>$path/$image_name-shift-done;--
From: Nick Desaulniers <ndesaulniers@google.com> Date: 2021-07-30 20:24:23
On Thu, Jul 29, 2021 at 7:22 AM Masahiro Yamada [off-list ref] wrote:
The install target should not depend on any build artifact.
The reason is explained in commit 19514fc665ff ("arm, kbuild: make
"make install" not depend on vmlinux").
Change the PowerPC installation code in a similar way.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
@@ -20,6 +20,20 @@# Bail with error code if anything goes wrongset-e+verify(){+if[!-f"$1"];then+echo""1>&2+echo" *** Missing file: $1"1>&2+echo' *** You need to run "make" before "make install".'1>&2+echo""1>&2+exit1+fi+}++# Make sure the files actually exist+verify"$2"+verify"$3"+# User may have a custom install scriptif[-x~/bin/${INSTALLKERNEL}];thenexec~/bin/${INSTALLKERNEL}"$@";fi--
From: Nick Desaulniers <ndesaulniers@google.com> Date: 2021-07-30 20:30:22
On Thu, Jul 29, 2021 at 7:22 AM Masahiro Yamada [off-list ref] 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.
quoted hunk
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(-)
@@ -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)"vmlinuxSystem.map"$(INSTALL_PATH)"--PHONY+=install-# anything not in $(targets)clean-files+=$(image-)$(initrd-)cuImage.*dtbImage.*treeImage.*\zImagezImage.initrdzImage.chrpzImage.coffzImage.holly\--
From: Michael Ellerman <hidden> Date: 2021-08-18 13:46:31
On Thu, 29 Jul 2021 23:19:35 +0900, Masahiro Yamada wrote:
Commit c913e5f95e54 ("powerpc/boot: Don't install zImage.* from make
install") added the zInstall target to arch/powerpc/boot/Makefile,
but you cannot use it since the corresponding hook is missing in
arch/powerpc/Makefile.
It has never worked since its addition. Nobody has complained about
it for 7 years, which means this code was unneeded.
[...]
On Sat, Jul 31, 2021 at 5:30 AM Nick Desaulniers
[off-list ref] wrote:
On Thu, Jul 29, 2021 at 7:22 AM Masahiro Yamada [off-list ref] wrote:
quoted
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.
quoted
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(-)
@@ -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)"vmlinuxSystem.map"$(INSTALL_PATH)"--PHONY+=install-# anything not in $(targets)clean-files+=$(image-)$(initrd-)cuImage.*dtbImage.*treeImage.*\zImagezImage.initrdzImage.chrpzImage.coffzImage.holly\--