From 5c309db47c71b9e0e63f8978ceb437eb5e632c08 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 31 Jan 2023 11:20:40 -0500 Subject: [PATCH] Further ARMv8 support Handle aarch64 differences in at least some distributions. --- imgutil/imgutil | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/imgutil/imgutil b/imgutil/imgutil index 427fd457..1ff7f570 100644 --- a/imgutil/imgutil +++ b/imgutil/imgutil @@ -671,6 +671,11 @@ def version_sort(iterable): def get_kern_version(filename): with open(filename, 'rb') as kernfile: + checkgzip = kernfile.read(2) + if checkgzip == b'\x1f\x8b': + # gzipped... this would probably be aarch64 + # assume the filename has the version embedded + return os.path.basename(filename).replace('vmlinuz-', '') kernfile.seek(0x20e) offset = struct.unpack('