forked from rcore-os/rboot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (34 loc) · 777 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
MODE ?= release
EFI := target/x86_64-unknown-uefi/$(MODE)/rboot.efi
OVMF := OVMF.fd
ESP := esp
QEMU_ARGS := -net none -smp cores=4 -nographic
# -debugcon file:debug.log -global isa-debugcon.iobase=0x402
ifeq (${MODE}, release)
BUILD_ARGS += --release
endif
.PHONY: build run header asm doc
build:
cargo build $(BUILD_ARGS)
clippy:
cargo clippy $(BUILD_ARGS)
doc:
cargo doc
uefi-run: build
uefi-run \
-b ${OVMF} \
-q $(shell which qemu-system-x86_64) \
$(EFI) \
-- $(QEMU_ARGS)
run: build
mkdir -p $(ESP)/EFI/Boot
cp $(EFI) $(ESP)/EFI/Boot/BootX64.efi
cp rboot.conf $(ESP)/EFI/Boot
qemu-system-x86_64 \
-bios ${OVMF} \
-drive format=raw,file=fat:rw:${ESP} \
$(QEMU_ARGS)
header:
rust-objdump -h $(EFI) | less
asm:
rust-objdump -d $(EFI) | less