2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-01-11 10:32:31 +00:00

Fix autoconsole error on SPCR-free EFI implementations

This commit is contained in:
Jarrod Johnson
2025-05-13 16:46:18 -04:00
parent 315d1d9b5e
commit 7cb6b1ac35

View File

@@ -77,6 +77,8 @@ def fixup_ubuntu_grub_serial():
def get_serial_config():
if not os.path.exists('/sys/firmware/efi'):
return None
if not os.path.exists('/sys/firmware/acpi/tables/SPCR'):
return None
spcr = open("/sys/firmware/acpi/tables/SPCR", "rb")
spcr = bytearray(spcr.read())
if spcr[8] != 2 or spcr[36] != 0 or spcr[40] != 1: