arch/arm: Separate out architecture-specifics
This commit is contained in:
parent
03dfa30b70
commit
a1fb385d97
6
Makefile
6
Makefile
@ -17,9 +17,9 @@ OBJCOPY = $(TOOL_PREFIX)objcopy
|
||||
OBJDUMP = $(TOOL_PREFIX)objdump
|
||||
|
||||
# Define the flags we'll need for our tools
|
||||
INCLUDES = -I include
|
||||
INCLUDES = -I include -I arch/$(ARCH)/include
|
||||
KCFLAGS = -g -Wall -Wextra -Werror -nostdlib -nostartfiles -fno-builtin -std=gnu99 -include config.h $(INCLUDES)
|
||||
KLDFLAGS = -T link.ld -L /usr/lib/gcc/arm-elf/4.7.0/
|
||||
KLDFLAGS = -T arch/$(ARCH)/kernel.ld -L /usr/lib/gcc/arm-elf/4.7.0/
|
||||
EXTRA_LIBS = -lgcc
|
||||
|
||||
# Include the config file so we don't compile/link unnecessary objects
|
||||
@ -30,7 +30,7 @@ KOBJS :=
|
||||
|
||||
# Initialize sub-directory Makefile inclusion
|
||||
BASEDIR = $(shell pwd)
|
||||
SUBDIRS := boot kernel drivers
|
||||
SUBDIRS := arch/$(ARCH) kernel drivers
|
||||
ifneq (,$(SUBDIRS))
|
||||
include $(patsubst %,%/kernel.mk,$(SUBDIRS))
|
||||
endif
|
||||
|
21
arch/arm/include/arch/types.h
Normal file
21
arch/arm/include/arch/types.h
Normal file
@ -0,0 +1,21 @@
|
||||
/*
|
||||
Copyright (C) 2012, Aaron Lindsay <aaron@aclindsay.com>
|
||||
|
||||
This file is part of Aedrix.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include <arch-generic/types.h>
|
@ -1,5 +1,5 @@
|
||||
DIRNAME := boot
|
||||
SUBDIRS :=
|
||||
DIRNAME := arch/arm
|
||||
SUBDIRS := kernel
|
||||
|
||||
include $(BASEDIR)/header.mk
|
||||
|
10
arch/arm/kernel/kernel.mk
Normal file
10
arch/arm/kernel/kernel.mk
Normal file
@ -0,0 +1,10 @@
|
||||
DIRNAME := kernel
|
||||
SUBDIRS :=
|
||||
|
||||
include $(BASEDIR)/header.mk
|
||||
|
||||
OBJS_$(d) := $(d)/mmu.o
|
||||
|
||||
KOBJS += $(OBJS_$(d))
|
||||
|
||||
include $(BASEDIR)/footer.mk
|
21
include/arch-generic/types.h
Normal file
21
include/arch-generic/types.h
Normal file
@ -0,0 +1,21 @@
|
||||
/*
|
||||
Copyright (C) 2012, Aaron Lindsay <aaron@aclindsay.com>
|
||||
|
||||
This file is part of Aedrix.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
typedef unsigned int uint32;
|
@ -18,4 +18,4 @@
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
typedef unsigned int uint32;
|
||||
#include <arch/types.h>
|
||||
|
@ -12,7 +12,6 @@ OBJS_$(d) := $(d)/atags.o \
|
||||
$(d)/list.o \
|
||||
$(d)/math.o \
|
||||
$(d)/mm.o \
|
||||
$(d)/mmu.o \
|
||||
$(d)/print.o
|
||||
|
||||
KOBJS += $(OBJS_$(d))
|
||||
|
Loading…
Reference in New Issue
Block a user