45 lines
1.2 KiB
Plaintext
45 lines
1.2 KiB
Plaintext
$(srctree)/out/i386_pc/mop3.iso: $(srctree)/out/kernel.elf
|
|
mkdir -p $(srctree)/out/i386_pc/tmp/iso/boot/grub
|
|
cp $(srctree)/out/kernel.elf $(srctree)/out/i386_pc/tmp/iso/boot
|
|
cp $(srctree)/out/ramdisk.tar $(srctree)/out/i386_pc/tmp/iso/boot
|
|
cp $(srctree)/platform/i386_pc/grub.cfg $(srctree)/out/i386_pc/tmp/iso/boot/grub
|
|
grub-mkrescue -o $(srctree)/out/i386_pc/mop3.iso $(srctree)/out/i386_pc/tmp/iso
|
|
|
|
boot ?= iso
|
|
|
|
qemu_extra ?=
|
|
|
|
qemu_opts := -M pc -cpu pentium -m 64M \
|
|
-serial mon:stdio \
|
|
$(QEMU_EXTRA)
|
|
|
|
ifeq ($(boot),iso)
|
|
qemu_opts += -cdrom $(srctree)/out/i386_pc/mop3.iso
|
|
endif
|
|
|
|
ifeq ($(debug),1)
|
|
qemu_opts += -gdb tcp::5557 -S
|
|
endif
|
|
|
|
i386_pc_qemu: $(srctree)/out/i386_pc/mop3.iso
|
|
qemu-system-i386 $(qemu_opts)
|
|
|
|
i386_pc_bochs: $(srctree)/out/i386_pc/mop3.iso
|
|
rm -f $(srctree)/bochs.log
|
|
-bochs -f $(srctree)/platform/i386_pc/bochsrc.txt -q
|
|
|
|
i386_pc_cleandirs:
|
|
rm -rf $(srctree)/out/i386_pc/tmp
|
|
|
|
i386_pc_prepdirs:
|
|
mkdir -p $(srctree)/out/i386_pc/tmp
|
|
|
|
i386_pc_images: i386_pc_cleandirs i386_pc_prepdirs \
|
|
$(srctree)/out/i386_pc/mop3.iso
|
|
|
|
platform_clean: i386_pc_cleandirs
|
|
-rm -f $(srctree)/out/i386_pc/mop3.iso \
|
|
$(srctree)/out/i386_pc/mop3.img
|
|
|
|
.PHONY: i386_pc_qemu i386_pc_bochs i386_pc_images platform_clean
|