build: add a "user" arch to allow the kernel to run as a program on the host machine
This commit is contained in:
@@ -1,7 +1,17 @@
|
||||
LD := $(SOCKS_ARCH)-elf-gcc
|
||||
CC := $(SOCKS_ARCH)-elf-gcc
|
||||
ASM := $(SOCKS_ARCH)-elf-gcc
|
||||
OBJCOPY := $(SOCKS_ARCH)-elf-objcopy
|
||||
STRIP := $(SOCKS_ARCH)-elf-strip
|
||||
|
||||
CFLAGS := -ffreestanding -nostdlib
|
||||
ASMFLAGS := $(CFLAGS)
|
||||
LDFLAGS := -nostdlib
|
||||
|
||||
ARCH_CFLAGS := -z max-page-size=0x1000 -m64 -mcmodel=large -mno-red-zone -mno-mmx -mno-sse -mno-sse2 -D_64BIT -DBYTE_ORDER=1234
|
||||
ARCH_LDFLAGS := -z max-page-size=0x1000 -T arch/x86_64/layout.ld
|
||||
|
||||
ARCH_DIR := arch/$(ARCH)
|
||||
ARCH_DIR := arch/$(SOCKS_ARCH)
|
||||
|
||||
ARCH_C_FILES := $(wildcard $(ARCH_DIR)/*.c) $(wildcard $(ARCH_DIR)/acpi/*.c)
|
||||
ARCH_ASM_FILES := $(wildcard $(ARCH_DIR)/*.S) $(wildcard $(ARCH_DIR)/acpi/*.S)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
QEMU := qemu-system-x86_64
|
||||
QEMU_FLAGS := -m 64M -smp 4 -cpu qemu64,pdpe1gb
|
||||
QEMU_FLAGS := -m 10M -smp 4 -cpu qemu64,pdpe1gb
|
||||
|
||||
ARCH_TEMP_FILES := $(BUILD_DIR)/$(KERNEL_EXEC).elf32
|
||||
|
||||
|
||||
Reference in New Issue
Block a user