[img] FIX: Force lindows to function on QEMU Q35 boards

This commit is contained in:
xwashere 2024-04-11 12:44:04 -04:00
parent f11fcd59a5
commit d81dd11837
Signed by: XWasHere
GPG Key ID: 042F8BFA1B0EF93B
4 changed files with 7 additions and 4 deletions

View File

@ -397,10 +397,11 @@ add_custom_command(OUTPUT lindows_efi.img
count=33
#COMMAND mkfs.vfat lindows_efi.img -F 32
COMMAND ${MTools_Format_EXECUTABLE} -i lindows_efi.img
COMMAND ${MTools_Copy_EXECUTABLE} -i lindows_efi.img ${CMAKE_SOURCE_DIR}/src/startup.nsh ::/STARTUP.NSH
COMMAND ${MTools_Mkdir_EXECUTABLE} -i lindows_efi.img ::/EFI
COMMAND ${MTools_Mkdir_EXECUTABLE} -i lindows_efi.img ::/EFI/BOOT
COMMAND ${MTools_Copy_EXECUTABLE} -i lindows_efi.img lindows_efi/grubx64.efi ::/EFI/BOOT/BOOTX64.EFI
DEPENDS src/grub/grub-early.cfg
DEPENDS src/grub/grub-early.cfg src/startup.nsh
)
# make the full disk image

View File

@ -71,8 +71,9 @@ void* AcpiGetTable(const char TableName[4]) {
// Alright let's see here...
for (int i = 0; i < AcpiXSDTLength; i++) {
if (CompareMemory(AcpiTheXSDT->Tables[i]->Signature, TableName, 4)) return (void*)AcpiTheXSDT->Tables[i];
}
// Well we found nothing
return 0;
}

View File

@ -43,8 +43,8 @@ struct AcpiXSDT {
struct AcpiSDTHeader Header;
/// Pointers to other tables
[[gnu::aligned(4)]]
u64 Tables[];
[[gnu::aligned(4), gnu::packed]]
struct AcpiSDTHeader* Tables[];
};
/**

1
src/startup.nsh Normal file
View File

@ -0,0 +1 @@
FS0:\EFI\BOOT\BOOTX64.EFI