ASSUFFIX = S
-CONFIG=realview_pb
+# Default Configuration
+ifeq ($(PLATFORM),)
+ PLATFORM=realview_pb
+endif
-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
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)
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
//#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
#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?
USE_MP=0
-ifeq ($(CONFIG),default)
+ifeq ($(PLATFORM),default)
USE_MP=0
-else ifeq ($(CONFIG),smp)
+else ifeq ($(PLATFORM),smp)
USE_MP=1
endif
endif
endif
-ifeq ($(CONFIG),)
- CONFIG := default
+ifeq ($(PLATFORM),)
+ PLATFORM := default
endif
# Makefile.user.cfg is not part of the Acess git repo,
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
USE_GDB=
_SYSTEM=realview-pb-a8
-_KERNEL=Acess2.armv7.bin
+_KERNEL=Acess2.armv7-realview_pb.bin
QEMU_PARAMS=""
_NETTYPE="user"