Boot log is now stored in the build directory
This commit is contained in:
@@ -1,29 +1,29 @@
|
|||||||
QEMU := qemu-system-x86_64
|
QEMU := qemu-system-x86_64
|
||||||
QEMU_FLAGS := -m 64M -smp 4
|
QEMU_FLAGS := -m 64M -smp 4
|
||||||
|
|
||||||
ARCH_TEMP_FILES := $(BUILDDIR)/$(KERNEL_EXEC).elf32
|
ARCH_TEMP_FILES := $(BUILD_DIR)/$(KERNEL_EXEC).elf32
|
||||||
|
|
||||||
# qemu refuses to boot ELF64 binaries. this creates a patched version of the kernel
|
# qemu refuses to boot ELF64 binaries. this creates a patched version of the kernel
|
||||||
# binary to trick qemu into thinking its an ELF32.
|
# binary to trick qemu into thinking its an ELF32.
|
||||||
# this has no effect on the kernel itself; the x86_64 kernel's
|
# this has no effect on the kernel itself; the x86_64 kernel's
|
||||||
# entry point is 32-bit machine code.
|
# entry point is 32-bit machine code.
|
||||||
$(BUILDDIR)/$(KERNEL_EXEC).elf32: $(BUILDDIR)/$(KERNEL_EXEC)
|
$(BUILD_DIR)/$(KERNEL_EXEC).elf32: $(BUILD_DIR)/$(KERNEL_EXEC)
|
||||||
@cp $(BUILDDIR)/$(KERNEL_EXEC) $(BUILDDIR)/$(KERNEL_EXEC).elf32
|
@cp $(BUILD_DIR)/$(KERNEL_EXEC) $(BUILD_DIR)/$(KERNEL_EXEC).elf32
|
||||||
@printf '\x03\x00' | dd of=$(BUILDDIR)/$(KERNEL_EXEC).elf32 bs=1 seek=18 count=2 conv=notrunc 2> /dev/null
|
@printf '\x03\x00' | dd of=$(BUILD_DIR)/$(KERNEL_EXEC).elf32 bs=1 seek=18 count=2 conv=notrunc 2> /dev/null
|
||||||
|
|
||||||
run: $(BUILDDIR)/$(KERNEL_EXEC) $(BUILDDIR)/$(KERNEL_EXEC).elf32
|
run: $(BUILD_DIR)/$(KERNEL_EXEC) $(BUILD_DIR)/$(KERNEL_EXEC).elf32
|
||||||
@echo " \033[1;93mBOOT\033[0m $<"
|
@echo " \033[1;93mBOOT\033[0m $<"
|
||||||
|
|
||||||
@$(QEMU) -kernel $(BUILDDIR)/$(KERNEL_EXEC).elf32
|
@$(QEMU) -kernel $(BUILD_DIR)/$(KERNEL_EXEC).elf32
|
||||||
|
|
||||||
debug: $(BUILDDIR)/$(KERNEL_EXEC) $(BUILDDIR)/$(KERNEL_EXEC).elf32
|
debug: $(BUILD_DIR)/$(KERNEL_EXEC) $(BUILD_DIR)/$(KERNEL_EXEC).elf32
|
||||||
@echo " \033[1;93mDEBUG\033[0m $<"
|
@echo " \033[1;93mDEBUG\033[0m $<"
|
||||||
|
|
||||||
@./tools/kernel-debug/debug_session.sh \
|
@./tools/kernel-debug/debug_session.sh \
|
||||||
tools/kernel-debug/gdb_session_init \
|
tools/kernel-debug/gdb_session_init \
|
||||||
tools/kernel-debug/lldb_session_init \
|
tools/kernel-debug/lldb_session_init \
|
||||||
$(QEMU) \
|
$(QEMU) \
|
||||||
-kernel $(BUILDDIR)/$(KERNEL_EXEC).elf32 -S -s \
|
-kernel $(BUILD_DIR)/$(KERNEL_EXEC).elf32 -S -s \
|
||||||
-curses -serial file:socks.log $(QEMU_FLAGS)
|
-curses -serial file:$(BUILD_DIR)/socks.log $(QEMU_FLAGS)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user