diff mbox series

kbuild: buildtar: remove warning for the default case

Message ID 20240422154610.2864941-1-masahiroy@kernel.org (mailing list archive)
State New
Headers show
Series kbuild: buildtar: remove warning for the default case | expand

Commit Message

Masahiro Yamada April 22, 2024, 3:46 p.m. UTC
Given KBUILD_IMAGE properly set in arch/*/Makefile, the default case
should work in most scenarios. The only oddity is the naming of the
copy destination, vmlinux-kbuild-${KERNELRELEASE}. Let's rename it
to vmlinuz-${KERNELRELEASE} because the kernel is often compressed.
Remove the warning to avoid unnecessary patch submissions when the
default case suffices.

Remove the x86 case, which is now identical to the default.

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

 scripts/package/buildtar | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

Comments

Nathan Chancellor April 22, 2024, 8:45 p.m. UTC | #1
On Tue, Apr 23, 2024 at 12:46:10AM +0900, Masahiro Yamada wrote:
> Given KBUILD_IMAGE properly set in arch/*/Makefile, the default case
> should work in most scenarios. The only oddity is the naming of the
> copy destination, vmlinux-kbuild-${KERNELRELEASE}. Let's rename it
> to vmlinuz-${KERNELRELEASE} because the kernel is often compressed.
> Remove the warning to avoid unnecessary patch submissions when the
> default case suffices.
> 
> Remove the x86 case, which is now identical to the default.
> 
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

Sounds good to me, the script is extensible enough that if this does not
work by default for some architecture, a new case can be added, rather
than penalizing architectures for which it does work.

Reviewed-by: Nathan Chancellor <nathan@kernel.org>

> ---
> 
>  scripts/package/buildtar | 12 +-----------
>  1 file changed, 1 insertion(+), 11 deletions(-)
> 
> diff --git a/scripts/package/buildtar b/scripts/package/buildtar
> index ed8d9b496305..fe816f62a290 100755
> --- a/scripts/package/buildtar
> +++ b/scripts/package/buildtar
> @@ -59,9 +59,6 @@ cp -v -- "${objtree}/vmlinux" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}"
>  #   build tree.
>  #
>  case "${ARCH}" in
> -	x86|i386|x86_64)
> -		cp -v -- "${objtree}/arch/x86/boot/bzImage" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}"
> -		;;
>  	alpha)
>  		cp -v -- "${objtree}/arch/alpha/boot/vmlinux.gz" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}"
>  		;;
> @@ -110,13 +107,6 @@ case "${ARCH}" in
>  		done
>  		;;
>  	*)
> -		cp -v -- "${KBUILD_IMAGE}" "${tmpdir}/boot/vmlinux-kbuild-${KERNELRELEASE}"
> -		echo "" >&2
> -		echo '** ** **  WARNING  ** ** **' >&2
> -		echo "" >&2
> -		echo "Your architecture did not define any architecture-dependent files" >&2
> -		echo "to be placed into the tarball. Please add those to ${0} ..." >&2
> -		echo "" >&2
> -		sleep 5
> +		cp -v -- "${KBUILD_IMAGE}" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}"
>  		;;
>  esac
> -- 
> 2.40.1
>
diff mbox series

Patch

diff --git a/scripts/package/buildtar b/scripts/package/buildtar
index ed8d9b496305..fe816f62a290 100755
--- a/scripts/package/buildtar
+++ b/scripts/package/buildtar
@@ -59,9 +59,6 @@  cp -v -- "${objtree}/vmlinux" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}"
 #   build tree.
 #
 case "${ARCH}" in
-	x86|i386|x86_64)
-		cp -v -- "${objtree}/arch/x86/boot/bzImage" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}"
-		;;
 	alpha)
 		cp -v -- "${objtree}/arch/alpha/boot/vmlinux.gz" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}"
 		;;
@@ -110,13 +107,6 @@  case "${ARCH}" in
 		done
 		;;
 	*)
-		cp -v -- "${KBUILD_IMAGE}" "${tmpdir}/boot/vmlinux-kbuild-${KERNELRELEASE}"
-		echo "" >&2
-		echo '** ** **  WARNING  ** ** **' >&2
-		echo "" >&2
-		echo "Your architecture did not define any architecture-dependent files" >&2
-		echo "to be placed into the tarball. Please add those to ${0} ..." >&2
-		echo "" >&2
-		sleep 5
+		cp -v -- "${KBUILD_IMAGE}" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}"
 		;;
 esac