twizzler-operating-system / twizzler

The Twizzler Operating System
BSD 3-Clause "New" or "Revised" License
66 stars 13 forks source link

Implement conditional compilation for machine dependent code #113

Closed PandaZ3D closed 1 year ago

PandaZ3D commented 1 year ago

This patch includes support for conditional compilation of a specific target machine (e.g, QEMU's aarch64 virt target). Among other things we implement:

The only things we need to make this change functional for the remote server to host Limine efi and firmware binaries for aarch64. And then we would have to change the bootstrap phase. The OVMF.fd and BOOTX64.EFI files downloaded do not work. I have been using EDK II's ArmVirt platform and Limine's 4.x release of BOOTAA64.EFI. The firmware can be obtained from the qemu-efi-aarch64 package on Ubuntu machines. Installed at /usr/share/qemu-efi-aarch64/QEMU_EFI.fd I believe. And Limine has a convenient releases branch. Or both can be compiled/installed from source.