Skip to content

Commit a0b49a9

Browse files
esmilmasahir0y
authored andcommitted
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 <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 1c369b6 commit a0b49a9

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

scripts/package/buildtar

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,8 @@ cp -v -- "${objtree}/vmlinux" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}"
5454
# Install arch-specific kernel image(s)
5555
#
5656
# Note:
57-
# mips, arm64, and riscv copy the first image found. This may not produce
58-
# the desired outcome because it may pick up a stale file remaining in the
59-
# build tree.
57+
# mips and arm64 copy the first image found. This may not produce the desired
58+
# outcome because it may pick up a stale file remaining in the build tree.
6059
#
6160
case "${ARCH}" in
6261
alpha)
@@ -98,13 +97,12 @@ case "${ARCH}" in
9897
done
9998
;;
10099
riscv)
101-
# Please note the following code may copy a stale file.
102-
for i in Image.bz2 Image.gz Image; do
103-
if [ -f "${objtree}/arch/riscv/boot/${i}" ] ; then
104-
cp -v -- "${objtree}/arch/riscv/boot/${i}" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}"
105-
break
106-
fi
107-
done
100+
case "${KBUILD_IMAGE##*/}" in
101+
Image.*|vmlinuz.efi)
102+
cp -v -- "${KBUILD_IMAGE}" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}";;
103+
*)
104+
cp -v -- "${KBUILD_IMAGE}" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}";;
105+
esac
108106
;;
109107
*)
110108
cp -v -- "${KBUILD_IMAGE}" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}"

0 commit comments

Comments
 (0)