Message ID | 20210729141937.445051-1-masahiroy@kernel.org (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | [1/3] powerpc: remove unused zInstall target from arch/powerpc/boot/Makefile | expand |
On Thu, Jul 29, 2021 at 7:22 AM Masahiro Yamada <masahiroy@kernel.org> 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> > --- > > arch/powerpc/boot/Makefile | 6 +----- > arch/powerpc/boot/install.sh | 13 ------------- > 2 files changed, 1 insertion(+), 18 deletions(-) > > diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile > index e312ea802aa6..a702f9d1ec0d 100644 > --- a/arch/powerpc/boot/Makefile > +++ b/arch/powerpc/boot/Makefile > @@ -448,11 +448,7 @@ $(obj)/zImage.initrd: $(addprefix $(obj)/, $(initrd-y)) > install: $(CONFIGURE) $(addprefix $(obj)/, $(image-y)) > sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" > > -# Install the vmlinux and other built boot targets. > -zInstall: $(CONFIGURE) $(addprefix $(obj)/, $(image-y)) > - sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $^ > - > -PHONY += install zInstall > +PHONY += install > > # anything not in $(targets) > clean-files += $(image-) $(initrd-) cuImage.* dtbImage.* treeImage.* \ > diff --git a/arch/powerpc/boot/install.sh b/arch/powerpc/boot/install.sh > index b6a256bc96ee..658c93ca7437 100644 > --- a/arch/powerpc/boot/install.sh > +++ b/arch/powerpc/boot/install.sh > @@ -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 > -shift 4 > -while [ $# -ne 0 ]; 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; > -- > 2.27.0 >
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. > > [...] Applied to powerpc/next. [1/3] powerpc: remove unused zInstall target from arch/powerpc/boot/Makefile https://git.kernel.org/powerpc/c/156ca4e650bfb9a4259b427069caa11b5a4df3d4 [2/3] powerpc: make the install target not depend on any build artifact https://git.kernel.org/powerpc/c/9bef456b20581e630ef9a13555ca04fed65a859d [3/3] powerpc: move the install rule to arch/powerpc/Makefile https://git.kernel.org/powerpc/c/86ff0bce2e9665c8b074930fe6caed615da070c1 cheers
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index e312ea802aa6..a702f9d1ec0d 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -448,11 +448,7 @@ $(obj)/zImage.initrd: $(addprefix $(obj)/, $(initrd-y)) install: $(CONFIGURE) $(addprefix $(obj)/, $(image-y)) sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" -# Install the vmlinux and other built boot targets. -zInstall: $(CONFIGURE) $(addprefix $(obj)/, $(image-y)) - sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $^ - -PHONY += install zInstall +PHONY += install # anything not in $(targets) clean-files += $(image-) $(initrd-) cuImage.* dtbImage.* treeImage.* \ diff --git a/arch/powerpc/boot/install.sh b/arch/powerpc/boot/install.sh index b6a256bc96ee..658c93ca7437 100644 --- a/arch/powerpc/boot/install.sh +++ b/arch/powerpc/boot/install.sh @@ -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 -shift 4 -while [ $# -ne 0 ]; 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;
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(-)