kbuild: buildtar: remove warning for the default case
[linux-block.git] / scripts / package / buildtar
index 72c91a1b832f939d9861a3b21094c1df75a009fd..fe816f62a290c944eedce71d22b955bfb6226e05 100755 (executable)
@@ -53,18 +53,21 @@ cp -v -- "${objtree}/vmlinux" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}"
 #
 # Install arch-specific kernel image(s)
 #
+# Note:
+#   mips, arm64, and riscv copy the first image found. This may not produce
+#   the desired outcome because it may pick up a stale file remaining in the
+#   build tree.
+#
 case "${ARCH}" in
-       x86|i386|x86_64)
-               [ -f "${objtree}/arch/x86/boot/bzImage" ] && cp -v -- "${objtree}/arch/x86/boot/bzImage" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}"
-               ;;
        alpha)
-               [ -f "${objtree}/arch/alpha/boot/vmlinux.gz" ] && cp -v -- "${objtree}/arch/alpha/boot/vmlinux.gz" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}"
+               cp -v -- "${objtree}/arch/alpha/boot/vmlinux.gz" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}"
                ;;
        parisc*)
-               [ -f "${KBUILD_IMAGE}" ] && cp -v -- "${KBUILD_IMAGE}" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}"
+               cp -v -- "${KBUILD_IMAGE}" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}"
                [ -f "${objtree}/lifimage" ] && cp -v -- "${objtree}/lifimage" "${tmpdir}/boot/lifimage-${KERNELRELEASE}"
                ;;
        mips)
+               # Please note the following code may copy a stale file.
                if [ -f "${objtree}/arch/mips/boot/compressed/vmlinux.bin" ]; then
                        cp -v -- "${objtree}/arch/mips/boot/compressed/vmlinux.bin" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}"
                elif [ -f "${objtree}/arch/mips/boot/compressed/vmlinux.ecoff" ]; then
@@ -86,6 +89,7 @@ case "${ARCH}" in
                fi
                ;;
        arm64)
+               # Please note the following code may copy a stale file.
                for i in Image.bz2 Image.gz Image.lz4 Image.lzma Image.lzo vmlinuz.efi ; do
                        if [ -f "${objtree}/arch/arm64/boot/${i}" ] ; then
                                cp -v -- "${objtree}/arch/arm64/boot/${i}" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}"
@@ -94,6 +98,7 @@ case "${ARCH}" in
                done
                ;;
        riscv)
+               # Please note the following code may copy a stale file.
                for i in Image.bz2 Image.gz Image; do
                        if [ -f "${objtree}/arch/riscv/boot/${i}" ] ; then
                                cp -v -- "${objtree}/arch/riscv/boot/${i}" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}"
@@ -102,13 +107,6 @@ case "${ARCH}" in
                done
                ;;
        *)
-               [ -f "${KBUILD_IMAGE}" ] && 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