Code: Select all
#include <efi.h>
EFI_STATUS efi_main(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *ST)
{
EFI_STATUS Status;
return ST->ConOut->OutputString(ST->ConOut, L"Hello World\r\n");
}
Code: Select all
x86_64-w64-mingw32-gcc -ffreestanding -I... -I... -c -o rawk.o rawk.c
x86_64-w64-mingw32-gcc -nostdlib -Wl,-dll -shared -Wl,--subsystem,10 -o rawk.efi rawk.o -lgcc
rawk.efi will be copied into mountdir.
qemu-system-x86_64 -pflash OVMF.fd -hda fat:rw:mountdir -net none -m 4g
You can find my project at:
https://notabug.org/PeterOSdev/smudeco
But there really is not much to see.