mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-24 18:41:55 +00:00
Further ARMv8 support
Handle aarch64 differences in at least some distributions.
This commit is contained in:
parent
976e9ef563
commit
5c309db47c
@ -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('<H', kernfile.read(2))[0] + 0x200
|
||||
kernfile.seek(offset)
|
||||
@ -1298,6 +1303,8 @@ def pack_image(args):
|
||||
|
||||
def gather_bootloader(outdir, rootpath='/'):
|
||||
shimlocation = os.path.join(rootpath, 'boot/efi/EFI/BOOT/BOOTX64.EFI')
|
||||
if not os.path.exists(shimlocation):
|
||||
shimlocation = os.path.join(rootpath, 'boot/efi/EFI/BOOT/BOOTAA64.EFI')
|
||||
if not os.path.exists(shimlocation):
|
||||
shimlocation = os.path.join(rootpath, 'usr/lib64/efi/shim.efi')
|
||||
if not os.path.exists(shimlocation):
|
||||
@ -1308,7 +1315,11 @@ def gather_bootloader(outdir, rootpath='/'):
|
||||
for candidate in glob.glob(os.path.join(rootpath, 'boot/efi/EFI/*')):
|
||||
if 'BOOT' not in candidate:
|
||||
grubbin = os.path.join(candidate, 'grubx64.efi')
|
||||
break
|
||||
if os.path.exists(grubbin):
|
||||
break
|
||||
grubbin = os.path.join(candidate, 'grubaa64.efi')
|
||||
if os.path.exists(grubbin):
|
||||
break
|
||||
if not grubbin:
|
||||
grubbin = os.path.join(rootpath, 'usr/lib64/efi/grub.efi')
|
||||
if not os.path.exists(grubbin):
|
||||
|
Loading…
Reference in New Issue
Block a user