[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240502111613.1380453-4-emil.renner.berthing@canonical.com>
Date: Thu, 2 May 2024 13:16:08 +0200
From: Emil Renner Berthing <emil.renner.berthing@...onical.com>
To: linux-riscv@...ts.infradead.org,
linux-kernel@...r.kernel.org,
linux-kbuild@...r.kernel.org
Cc: Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Masahiro Yamada <masahiroy@...nel.org>,
Nathan Chancellor <nathan@...nel.org>,
Nicolas Schier <nicolas@...sle.eu>,
Nick Terrell <terrelln@...com>
Subject: [PATCH v1 3/3] kbuild: buildtar: install riscv compressed images as vmlinuz
Use the KBUILD_IMAGE variable to determine the right kernel image to
install and install compressed images to /boot/vmlinuz-$version like the
'make install' target already does.
Signed-off-by: Emil Renner Berthing <emil.renner.berthing@...onical.com>
---
This patch depends on Masahiro's patch at
https://lore.kernel.org/r/20240414174139.3001175-1-masahiroy@kernel.org
---
scripts/package/buildtar | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/scripts/package/buildtar b/scripts/package/buildtar
index ed8d9b496305..fa9bd0795d22 100755
--- a/scripts/package/buildtar
+++ b/scripts/package/buildtar
@@ -54,9 +54,8 @@ 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.
+# mips and arm64 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)
@@ -101,13 +100,12 @@ 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}"
- break
- fi
- done
+ case "${KBUILD_IMAGE##*/}" in
+ Image.*|vmlinuz.efi)
+ cp -v -- "$KBUILD_IMAGE" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}";;
+ *)
+ cp -v -- "$KBUILD_IMAGE" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}";;
+ esac
;;
*)
cp -v -- "${KBUILD_IMAGE}" "${tmpdir}/boot/vmlinux-kbuild-${KERNELRELEASE}"
--
2.43.0
Powered by blists - more mailing lists