[img] FIX: Force lindows to function on QEMU Q35 boards
This commit is contained in:
parent
f11fcd59a5
commit
d81dd11837
@ -397,10 +397,11 @@ add_custom_command(OUTPUT lindows_efi.img
|
|||||||
count=33
|
count=33
|
||||||
#COMMAND mkfs.vfat lindows_efi.img -F 32
|
#COMMAND mkfs.vfat lindows_efi.img -F 32
|
||||||
COMMAND ${MTools_Format_EXECUTABLE} -i lindows_efi.img
|
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
|
||||||
COMMAND ${MTools_Mkdir_EXECUTABLE} -i lindows_efi.img ::/EFI/BOOT
|
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
|
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
|
# make the full disk image
|
||||||
|
@ -71,8 +71,9 @@ void* AcpiGetTable(const char TableName[4]) {
|
|||||||
|
|
||||||
// Alright let's see here...
|
// Alright let's see here...
|
||||||
for (int i = 0; i < AcpiXSDTLength; i++) {
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -43,8 +43,8 @@ struct AcpiXSDT {
|
|||||||
struct AcpiSDTHeader Header;
|
struct AcpiSDTHeader Header;
|
||||||
|
|
||||||
/// Pointers to other tables
|
/// Pointers to other tables
|
||||||
[[gnu::aligned(4)]]
|
[[gnu::aligned(4), gnu::packed]]
|
||||||
u64 Tables[];
|
struct AcpiSDTHeader* Tables[];
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
1
src/startup.nsh
Normal file
1
src/startup.nsh
Normal file
@ -0,0 +1 @@
|
|||||||
|
FS0:\EFI\BOOT\BOOTX64.EFI
|
Loading…
x
Reference in New Issue
Block a user