diff --git a/BuildConf/armv7/Makefile.cfg b/BuildConf/armv7/Makefile.cfg index f5fa2615c0ab165de8839d7aa7e4274a0f26be2e..9be93a74b34071453987842a2a6810bd4b4eeee4 100644 --- a/BuildConf/armv7/Makefile.cfg +++ b/BuildConf/armv7/Makefile.cfg @@ -9,5 +9,8 @@ STRIP = arm-elf-strip ASSUFFIX = S -CONFIG=realview_pb +# Default Configuration +ifeq ($(PLATFORM),) + PLATFORM=realview_pb +endif diff --git a/BuildConf/armv7/default.mk b/BuildConf/armv7/default.mk index 0a85c928148ffabe3832589c68f6bcfbb1bbc67c..29ef50a8e3ab4dcfafb5a5ac28cee0ac24e2f1d6 100644 --- a/BuildConf/armv7/default.mk +++ b/BuildConf/armv7/default.mk @@ -1,7 +1,9 @@ -ifeq ($(CONFIG),default) - $(error Please select a configuration) +ifeq ($(PLATFORM),default) + $(error Please select a platform) endif +# Core ARMv7 modules + MODULES += armv7/GIC MODULES += Filesystems/InitRD diff --git a/Kernel/Makefile b/Kernel/Makefile index 96626e10af4ef1fbce5609da42e43ada69637f36..c3fbc563661f69d4b32166e30b863ffa169d00d8 100644 --- a/Kernel/Makefile +++ b/Kernel/Makefile @@ -21,25 +21,25 @@ ifeq ($(AS_SUFFIX),) AS_SUFFIX = S endif -ASFLAGS += -D ARCHDIR_IS_$(ARCHDIR)=1 -DCONFIG_is_$(CONFIG)=1 +ASFLAGS += -D ARCHDIR_IS_$(ARCHDIR)=1 -D PLATFORM_is_$(PLATFORM)=1 CPPFLAGS += -I./include -I./arch/$(ARCHDIR)/include -D_MODULE_NAME_=\"Kernel\" -CPPFLAGS += -DARCH=$(ARCH) -DARCHDIR=$(ARCHDIR) -DARCHDIR_IS_$(ARCHDIR)=1 -DCONFIG_is_$(CONFIG)=1 -CPPFLAGS += -DKERNEL_VERSION=$(KERNEL_VERSION) +CPPFLAGS += -D ARCH=$(ARCH) -D ARCHDIR=$(ARCHDIR) -D ARCHDIR_IS_$(ARCHDIR)=1 -D PLATFORM_is_$(PLATFORM)=1 +CPPFLAGS += -D KERNEL_VERSION=$(KERNEL_VERSION) CFLAGS += -Wall -fno-stack-protector -Wstrict-prototypes -g CFLAGS += -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -Wuninitialized CFLAGS += -O3 LDFLAGS += -T arch/$(ARCHDIR)/link.ld -g -ifeq ($(CONFIG),default) +ifeq ($(PLATFORM),default) OBJDIR := obj-$(ARCH)/ #OBJSUFFIX := .$(ARCH) BIN := ../Acess2.$(ARCH).bin GZBIN := ../Acess2.$(ARCH).gz else - OBJDIR := obj-$(ARCH)-$(CONFIG)/ - #OBJSUFFIX := .$(ARCH)-$(CONFIG) - BIN := ../Acess2.$(ARCH)-$(CONFIG).bin - GZBIN := ../Acess2.$(ARCH)-$(CONFIG).gz + OBJDIR := obj-$(ARCH)-$(PLATFORM)/ + #OBJSUFFIX := .$(ARCH)-$(PLATFORM) + BIN := ../Acess2.$(ARCH)-$(PLATFORM).bin + GZBIN := ../Acess2.$(ARCH)-$(PLATFORM).gz endif ifeq ($(DEBUG_BUILD),yes) diff --git a/Kernel/arch/armv7/Makefile b/Kernel/arch/armv7/Makefile index b041aa967a31696f666440edd469b599a5e1f897..2a86424f3df1f7347fa0a770cf2146d3a67c03ae 100644 --- a/Kernel/arch/armv7/Makefile +++ b/Kernel/arch/armv7/Makefile @@ -7,8 +7,7 @@ CPPFLAGS = CFLAGS = ASFLAGS = -ASFLAGS += -DCONFIG_is_$(CONFIG)=1 -CPPFLAGS += -DMMU_PRESENT=$(MMU_PRESENT) +CPPFLAGS += -DMMU_PRESENT=1 LDFLAGS += `$(CC) --print-libgcc-file-name` A_OBJ = start.ao main.o lib.o lib.ao time.o pci.o debug.o diff --git a/Kernel/arch/armv7/include/options.h b/Kernel/arch/armv7/include/options.h index fad529e9809899fa7647d6619cafbf5f7d001684..ffbaa1278ca15f91a91c5c3287299dc4a6d0aa7d 100644 --- a/Kernel/arch/armv7/include/options.h +++ b/Kernel/arch/armv7/include/options.h @@ -12,7 +12,7 @@ //#define PCI_PADDR 0x60000000 // Realview (Non-PB) -#if CONFIG_is_realview_pb +#if PLATFORM_is_realview_pb # define UART0_PADDR 0x10009000 // Realview # define GICI_PADDR 0x1e000000 # define GICD_PADDR 0x1e001000 @@ -20,7 +20,7 @@ #endif -#if CONFIG_is_trimslice // Tegra2 +#if PLATFORM_is_trimslice // Tegra2 # define UART0_PADDR 0x70006000 # define GICD_PADDR 0x50041000 # define GICI_PADDR 0x60004000 // TODO: Is this actually a GIC-I? diff --git a/Kernel/arch/x86/Makefile b/Kernel/arch/x86/Makefile index 0683d586013ce067e31dd6a017f9173f9338b370..c83a5af2e97b85d6189cadb09d848af2b042e984 100644 --- a/Kernel/arch/x86/Makefile +++ b/Kernel/arch/x86/Makefile @@ -11,9 +11,9 @@ ASFLAGS = -f elf USE_MP=0 -ifeq ($(CONFIG),default) +ifeq ($(PLATFORM),default) USE_MP=0 -else ifeq ($(CONFIG),smp) +else ifeq ($(PLATFORM),smp) USE_MP=1 endif diff --git a/Makefile.cfg b/Makefile.cfg index 716eb5fc98fcd87209e9c52b3b33644132e76434..d14b29c2f55247b0fb768bee97756faaa8f65fc4 100644 --- a/Makefile.cfg +++ b/Makefile.cfg @@ -40,8 +40,8 @@ ifneq ($(ARCH),host) endif endif -ifeq ($(CONFIG),) - CONFIG := default +ifeq ($(PLATFORM),) + PLATFORM := default endif # Makefile.user.cfg is not part of the Acess git repo, @@ -55,7 +55,7 @@ MODULES += Filesystems/Ext2 MODULES += Filesystems/FAT MODULES += Filesystems/NTFS -include $(ACESSDIR)/BuildConf/$(ARCH)/$(CONFIG).mk +include $(ACESSDIR)/BuildConf/$(ARCH)/$(PLATFORM).mk MODULES += IPStack # So the other modules are loaded before it #DYNMODS := USB/Core diff --git a/RunQemuArm b/RunQemuArm index b15d6176bb107ba4a725d62332badf7990bef098..f506599e548fef02e9482781b7d1078b52d6bfe6 100755 --- a/RunQemuArm +++ b/RunQemuArm @@ -5,7 +5,7 @@ QEMU=qemu-system-arm USE_GDB= _SYSTEM=realview-pb-a8 -_KERNEL=Acess2.armv7.bin +_KERNEL=Acess2.armv7-realview_pb.bin QEMU_PARAMS="" _NETTYPE="user"