[PATCH] arm64: boot: handle all compressed image formats on install

Ping Li leeonion.muyu at gmail.com
Wed Nov 18 20:19:45 PST 2026


"make install" installs the kernel as vmlinuz-<version> or
vmlinux-<version> depending on whether the image is compressed,
but install.sh only recognizes Image.gz and vmlinuz.efi as
compressed.  Any other compressed image that can be built and
selected via KBUILD_IMAGE, e.g.:

  make KBUILD_IMAGE=arch/arm64/boot/Image.lz4 install

falls through to the normal path and is installed as
vmlinux-<version> even though the file is compressed.

Detect compressed images the same way as RISC-V does
(arch/riscv/boot/install.sh): an Image.* file is a compressed
image.  The uncompressed Image and image.fit keep being
installed as vmlinux-<version>.

Signed-off-by: Ping Li <leeonion.muyu at gmail.com>
---
 arch/arm64/boot/install.sh | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/install.sh b/arch/arm64/boot/install.sh
index cc2f4ccca6c0..e45d80220702 100755
--- a/arch/arm64/boot/install.sh
+++ b/arch/arm64/boot/install.sh
@@ -19,16 +19,18 @@
 
 set -e
 
-if [ "$(basename $2)" = "Image.gz" ] || [ "$(basename $2)" = "vmlinuz.efi" ]
-then
+case "$(basename $2)" in
 # Compressed install
+Image.*|vmlinuz.efi)
   echo "Installing compressed kernel"
   base=vmlinuz
-else
+  ;;
 # Normal install
+*)
   echo "Installing normal kernel"
   base=vmlinux
-fi
+  ;;
+esac
 
 if [ -f $4/$base-$1 ]; then
   mv $4/$base-$1 $4/$base-$1.old

base-commit: aebb7274476403040d582c61478df8f4a7bf9cd3
-- 
2.34.1




More information about the linux-arm-kernel mailing list