2024-04-21 02:28:06 +02:00
|
|
|
MCOPY := mcopy
|
|
|
|
QEMU := qemu-system-i386
|
|
|
|
NVME_INC := ./drivers/nvme/nvme.inc ./drivers/nvme/macros.inc
|
|
|
|
NVME_ASM := ./drivers/nvme/nvme.asm
|
|
|
|
NVME_SYS := ./drivers/nvme/nvme.sys
|
2024-06-26 00:37:48 +02:00
|
|
|
MEMORY := 128
|
|
|
|
IMAGE := kolibri.img
|
|
|
|
DRIVE := nvm.img
|
2024-03-28 23:43:18 +01:00
|
|
|
|
2024-04-21 02:28:06 +02:00
|
|
|
all: $(NVME_SYS)
|
2024-03-28 23:43:18 +01:00
|
|
|
.PHONY: all
|
|
|
|
|
2024-04-21 02:28:06 +02:00
|
|
|
run: $(NVME_SYS)
|
2024-06-26 00:37:48 +02:00
|
|
|
$(QEMU) -m $(MEMORY) -fda $(IMAGE) -boot a -drive file=$(DRIVE),if=none,id=nvm -device nvme,serial=deadbeef,drive=nvm
|
2024-03-28 23:43:18 +01:00
|
|
|
.PHONY: run
|
|
|
|
|
2024-06-26 00:37:48 +02:00
|
|
|
debug: $(NVME_SYS)
|
|
|
|
$(QEMU) -s -S -kernel KERNEL.MNT -m $(MEMORY) -fda $(IMAGE) -boot a -drive file=$(DRIVE),if=none,id=nvm -device nvme,serial=deadbeef,drive=nvm
|
|
|
|
.PHONY: debug
|
|
|
|
|
2024-04-21 02:28:06 +02:00
|
|
|
$(NVME_SYS): $(NVME_ASM) $(NVME_INC)
|
2024-03-28 23:43:18 +01:00
|
|
|
@cd ./drivers/nvme && $(MAKE)
|
2024-04-21 02:28:06 +02:00
|
|
|
@$(MCOPY) -moi kolibri.img $(NVME_SYS) ::DRIVERS/NVME.SYS
|
2024-03-28 23:43:18 +01:00
|
|
|
|
2024-04-21 02:28:06 +02:00
|
|
|
clean:
|
|
|
|
@cd ./drivers/nvme && $(MAKE) clean
|
|
|
|
.PHONY: clean
|