Compare commits

..

No commits in common. "6b10f3f4d99fe57017e1a4928ea23b7ffd8eacbd" and "fdc5584110562fecf14ca0648add1d0409ef1c87" have entirely different histories.

3 changed files with 9 additions and 6 deletions

7
Makefile Normal file
View File

@ -0,0 +1,7 @@
.PHONY: all
all:
@./rscons
.PHONY: run
run: all
qemu-system-x86_64 -bios OVMF.fd -hdb build/e.1/efi-loader.img

View File

@ -18,7 +18,7 @@ class Image < Builder
end
end
uefi_env = env "uefi" do |env|
env do |env|
env.add_builder(Image)
env["CC"] = "x86_64-w64-mingw32-gcc"
env["CPPPATH"] += %w[/usr/include/efi /usr/include/efi/x86_64]
@ -29,7 +29,3 @@ uefi_env = env "uefi" do |env|
env.Program("^/BOOTX64.EFI", "${sources}")
env.Image("^/efi-loader.img", "^/BOOTX64.EFI")
end
task "run" do
sh %W[qemu-system-x86_64 -bios OVMF.fd -hda #{uefi_env.expand("^/efi-loader.img")}]
end

2
main.c
View File

@ -73,7 +73,7 @@ static void dump_memory_map(void)
UINTN descriptor_size;
UINT32 descriptor_version;
EFI_STATUS status = g_system_table->BootServices->GetMemoryMap(&memory_map_size,
(EFI_MEMORY_DESCRIPTOR *)memory_map_buffer,
memory_map_buffer,
&map_key,
&descriptor_size,
&descriptor_version);