From 975824663d2c65cf7a4d7829fa95f118b675c3be Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Thu, 24 Mar 2022 15:21:24 +0000 Subject: pkg/build: support compressed arm64 kernels Presently Linux doesn't support bzImage/zImage for arm64, but at least we can use Image.gz. --- pkg/build/linux.go | 2 +- pkg/build/linux_linux.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/build/linux.go b/pkg/build/linux.go index 3947463de..775991664 100644 --- a/pkg/build/linux.go +++ b/pkg/build/linux.go @@ -217,7 +217,7 @@ func kernelBin(arch string) string { case targets.ARM: return "arch/arm/boot/zImage" case targets.ARM64: - return "arch/arm64/boot/Image" + return "arch/arm64/boot/Image.gz" case targets.RiscV64: return "arch/riscv/boot/Image" case targets.MIPS64LE: diff --git a/pkg/build/linux_linux.go b/pkg/build/linux_linux.go index b46356db3..adf830ea9 100644 --- a/pkg/build/linux_linux.go +++ b/pkg/build/linux_linux.go @@ -67,7 +67,7 @@ func embedLinuxKernel(params Params, kernelPath string) error { func copyKernel(mountDir, kernelPath string) error { // Try several common locations where the kernel can be. - for _, targetPath := range []string{"boot/vmlinuz", "boot/bzImage", "vmlinuz", "bzImage"} { + for _, targetPath := range []string{"boot/vmlinuz", "boot/bzImage", "vmlinuz", "bzImage", "Image.gz"} { fullPath := filepath.Join(mountDir, filepath.FromSlash(targetPath)) if !osutil.IsExist(fullPath) { continue -- cgit mrf-deployment