--- /dev/null
+
+CC = arm-elf-gcc
+AS = arm-elf-gcc -c
+LD = arm-elf-ld
+OBJDUMP = arm-elf-objdump
+DISASM = $(OBJDUMP) -d -S
+ARCHDIR = armv7
+STRIP = arm-elf-strip
+
+ASSUFFIX = S
+
+CONFIG=realview_pb
+
--- /dev/null
+
+ifeq ($(CONFIG),default)
+ $(error Please select a configuration)
+endif
+
+MODULES += armv7/GIC
+MODULES += Filesystems/InitRD
--- /dev/null
+
+include $(ACESSDIR)/BuildConf/armv7/default.mk
+
+MODULES += Input/PS2KbMouse
+MODULES += Display/PL110
--- /dev/null
+#
+# Acess2 Host Native makefile
+# - Used for forcing the architecture
+#
+
+SAVED_CC_ := $(CC)
+SAVED_LD_ := $(LD)
+
+include $(ACESSDIR)/Makefile.x86_64.cfg
+
+OBJDUMP := objdump -S
+
+CC := $(SAVED_CC_)
+LD := $(SAVED_LD_)
+
--- /dev/null
+#
+# Acess2 Build Configuration
+#
+
+CC = i586-elf-gcc
+LD = i586-elf-ld
+AS = nasm
+OBJDUMP = i586-elf-objdump
+RM = @rm -f
+STRIP = strip
+
+ARCHDIR = x86
+
+DYNMOD_FLAGS := -mcmodel=small -fPIC
+
+
+ASFLAGS = -felf
--- /dev/null
+
+MODULES += Storage/ATA
+MODULES += Storage/FDDv2
+MODULES += Network/NE2000 Network/RTL8139
+MODULES += Display/VESA
+MODULES += Display/BochsGA
+MODULES += Input/PS2KbMouse
+MODULES += x86/ISADMA x86/VGAText
+MODULES += USB/Core USB/UHCI
+#MODULES += Interfaces/UDI
--- /dev/null
+
+CC = x86_64-none-elf-gcc
+LD = x86_64-none-elf-ld
+DISASM = x86_64-none-elf-objdump -d -M x86-64 -S
+
+KERNEL_CFLAGS := -mcmodel=kernel -nostdlib -mno-red-zone -Wall -Werror
+DYNMOD_CFLAGS := -mcmodel=small -fPIC -mno-red-zone
+
+ARCHDIR = x86_64
+
+ASFLAGS = -felf64
+
--- /dev/null
+
+MODULES += Storage/ATA
+MODULES += Storage/FDDv2
+MODULES += Network/NE2000 Network/RTL8139
+MODULES += Display/BochsGA
+MODULES += Interfaces/UDI
+MODULES += Input/PS2KbMouse
+MODULES += x86/ISADMA x86/VGAText
--- /dev/null
+x86/
\ No newline at end of file
-#ASFLAGS += -D USE_MP=$(USE_MP) -D USE_PAE=$(USE_PAE)
-CPPFLAGS += -DMMU_PRESENT=$(MMU_PRESENT) -DPCI_ADDRESS=$(PCI_ADDRESS)
+ASFLAGS += -DCONFIG_is_$(CONFIG)=1
+CPPFLAGS += -DMMU_PRESENT=$(MMU_PRESENT) -DPCI_ADDRESS=$(PCI_ADDRESS) -DCONFIG_is_$(CONFIG)=1
LDFLAGS += `$(CC) --print-libgcc-file-name`
A_OBJ = start.ao main.o lib.o lib.ao time.o pci.o debug.o
#define KERNEL_BASE 0x80000000
//#define PCI_PADDR 0x60000000 // Realview (Non-PB)
-#define UART0_PADDR 0x10009000 // Realview
+
+#if CONFIG_is_realview_pb
+# define UART0_PADDR 0x10009000 // Realview
+# define GICI_PADDR 0x1e000000
+# define GICD_PADDR 0x1e001000
+# define PL110_BASE 0x10020000 // Integrator
+
+#endif
+
+#if CONFIG_is_trimslice // Tegra2
+# define UART0_PADDR 0x70006000
+# define GICD_PADDR 0x50041000
+# define GICI_PADDR 0x60004000 // TODO: Is this actually a GIC-I?
+//# define PL110_BASE 0x10020000 // Integrator
+#endif
#define MM_KSTACK_SIZE 0x2000 // 2 Pages
if(Queue->Head)
{
void *ret = Queue->Head;
- Queue->Head = *(void**)( (char*)ret + Queue->NextOffset );
+ Queue->Head = *( (void**)ret + Queue->NextOffset/sizeof(void*) );
if(Queue->Tail == ret)
Queue->Tail = NULL;
SHORTREL(&Queue->Protector);
SHORTLOCK(&Queue->Protector);
if( Queue->Tail )
- *(void**)( (char*)Queue->Tail + Queue->NextOffset ) = Ptr;
+ *( (void**)Queue->Tail + Queue->NextOffset/sizeof(void*) ) = Ptr;
else
Queue->Head = Ptr;
Queue->Tail = Ptr;
+++ /dev/null
-
-CC = arm-elf-gcc
-AS = arm-elf-gcc -c
-LD = arm-elf-ld
-OBJDUMP = arm-elf-objdump
-DISASM = $(OBJDUMP) -d -S
-ARCHDIR = armv7
-STRIP = arm-elf-strip
-
-ASSUFFIX = S
ifeq ($(ARCH),)
ARCH := x86
endif
-include $(ACESSDIR)/Makefile.$(ARCH).cfg
+include $(ACESSDIR)/BuildConf/$(ARCH)/Makefile.cfg
ifeq ($(ARCHDIR),)
ARCHDIR := x86
endif
+
ifneq ($(ARCH),host)
-include $(ACESSDIR)/Makefile.$(ARCHDIR).cfg
+ ifneq ($(ARCHDIR),$(ARCH))
+ include $(ACESSDIR)/BuildConf/$(ARCHDIR)/Makefile.cfg
+ endif
+endif
+
+ifeq ($(CONFIG),)
+ CONFIG := default
endif
# Makefile.user.cfg is not part of the Acess git repo,
# It is for overriding the options in this file
-include $(ACESSDIR)/Makefile.user.cfg
-FILESYSTEMS :=
DRIVERS :=
MODULES :=
+
MODULES += Filesystems/Ext2
MODULES += Filesystems/FAT
MODULES += Filesystems/NTFS
-ifeq ($(ARCHDIR),x86)
-MODULES += Storage/ATA
-MODULES += Storage/FDDv2
-MODULES += Network/NE2000 Network/RTL8139
-MODULES += Display/VESA
-MODULES += Display/BochsGA
-MODULES += Input/PS2KbMouse
-MODULES += x86/ISADMA x86/VGAText
-MODULES += USB/Core USB/UHCI
-#MODULES += Interfaces/UDI
-endif
-
-ifeq ($(ARCHDIR),x86_64)
-MODULES += Storage/ATA
-MODULES += Storage/FDDv2
-MODULES += Network/NE2000 Network/RTL8139
-MODULES += Display/BochsGA
-MODULES += Interfaces/UDI
-MODULES += Input/PS2KbMouse
-MODULES += x86/ISADMA x86/VGAText
-endif
-
-ifeq ($(ARCHDIR),armv7)
-MODULES += Input/PS2KbMouse
-MODULES += armv7/GIC
-MODULES += Filesystems/InitRD
-MODULES += Display/PL110
-endif
+include $(ACESSDIR)/BuildConf/$(ARCH)/$(CONFIG).mk
MODULES += IPStack # So the other modules are loaded before it
#DYNMODS := USB/Core
+++ /dev/null
-#
-# Acess2 Host Native makefile
-# - Used for forcing the architecture
-#
-
-SAVED_CC_ := $(CC)
-SAVED_LD_ := $(LD)
-
-include $(ACESSDIR)/Makefile.x86_64.cfg
-
-OBJDUMP := objdump -S
-
-CC := $(SAVED_CC_)
-LD := $(SAVED_LD_)
-
+++ /dev/null
-#
-# Acess2 Build Configuration
-#
-
-CC = i586-elf-gcc
-LD = i586-elf-ld
-AS = nasm
-OBJDUMP = i586-elf-objdump
-RM = @rm -f
-STRIP = strip
-
-ARCHDIR = x86
-
-DYNMOD_FLAGS := -mcmodel=small -fPIC
-
-
-ASFLAGS = -felf
+++ /dev/null
-
-CC = x86_64-none-elf-gcc
-LD = x86_64-none-elf-ld
-DISASM = x86_64-none-elf-objdump -d -M x86-64 -S
-
-KERNEL_CFLAGS := -mcmodel=kernel -nostdlib -mno-red-zone -Wall -Werror
-DYNMOD_CFLAGS := -mcmodel=small -fPIC -mno-red-zone
-
-ARCHDIR = x86_64
-
-ASFLAGS = -felf64
-
+++ /dev/null
-Makefile.x86.cfg
\ No newline at end of file
#include <drv_pci.h>\r
#include <api_drv_video.h>\r
#include <lib/keyvalue.h>\r
+#include <options.h> // ARM Arch\r
\r
#define ABS(a) ((a)>0?(a):-(a))\r
\r
Uint32 LCDLPCurr;\r
};\r
\r
-// === CONSTANTS ===\r
+#ifndef PL110_BASE\r
#define PL110_BASE 0x10020000 // Integrator\r
+#endif\r
\r
+// === CONSTANTS ===\r
const struct {\r
short W, H;\r
} caPL110_Modes[] = {\r
#include <acess.h>
#include <modules.h>
#include "gic.h"
+#include <options.h>
#define N_IRQS 1024
QEMU_PARAMS=$QEMU_PARAMS" -usb"
QEMU_PARAMS=$QEMU_PARAMS" -drive id=test_usb_image,file=USB_Test_Image.img,if=none"
QEMU_PARAMS=$QEMU_PARAMS" -device usb-storage,drive=test_usb_image"
+QEMU_PARAMS=$QEMU_PARAMS" -usbdevice mouse"
_NETTYPE="user"
while [ $# -ne 0 ]; do