mirror of
https://github.com/taigrr/gopher-os
synced 2025-01-18 04:43:13 -08:00
Add vbox run target to the Makefile and rename run target to run-qemu
This commit is contained in:
parent
4b25971cef
commit
cb0f7312cf
12
Makefile
12
Makefile
@ -2,6 +2,7 @@ OS = $(shell uname -s)
|
||||
ARCH := x86_64
|
||||
BUILD_DIR := build
|
||||
BUILD_ABS_DIR := $(CURDIR)/$(BUILD_DIR)
|
||||
VBOX_VM_NAME := gopher-os
|
||||
|
||||
kernel_target :=$(BUILD_DIR)/kernel-$(ARCH).bin
|
||||
iso_target := $(BUILD_DIR)/kernel-$(ARCH).iso
|
||||
@ -129,10 +130,17 @@ iso:
|
||||
|
||||
endif
|
||||
|
||||
run: GC_FLAGS += -B
|
||||
run: iso
|
||||
run-qemu: GC_FLAGS += -B
|
||||
run-qemu: iso
|
||||
qemu-system-$(ARCH) -cdrom $(iso_target) -vga std -d int,cpu_reset -no-reboot
|
||||
|
||||
run-vbox: iso
|
||||
VBoxManage createvm --name $(VBOX_VM_NAME) --ostype "Linux_64" --register || true
|
||||
VBoxManage storagectl $(VBOX_VM_NAME) --name "IDE Controller" --add ide || true
|
||||
VBoxManage storageattach $(VBOX_VM_NAME) --storagectl "IDE Controller" --port 0 --device 0 --type dvddrive \
|
||||
--medium $(iso_target) || true
|
||||
VBoxManage startvm $(VBOX_VM_NAME)
|
||||
|
||||
# When building gdb target disable optimizations (-N) and inlining (l) of Go code
|
||||
gdb: GC_FLAGS += -N -l
|
||||
gdb: iso
|
||||
|
Loading…
x
Reference in New Issue
Block a user