diff --git a/SConstruct b/SConstruct index 6233d66..7b13608 100644 --- a/SConstruct +++ b/SConstruct @@ -27,48 +27,18 @@ arch = config_shelve["arch"] subarch = config_shelve["subarch"] platform = config_shelve["platform"] all_syms = config_shelve["all_symbols"] - print all_syms -''' -sources = \ - Glob('src/api/*.[cS]') + \ - Glob('src/generic/*.[cS]') + \ - Glob('src/lib/*.[cS]') + \ - Glob('src/arch/' + arch + '/*.[cS]') + \ - Glob('src/arch/' + arch + '/' + subarch +'/*.[cS]') + \ - Glob('src/glue/' + arch + '/*.[cS]') + \ - Glob('src/platform/' + platform + '/*.[cS]') -print sources -''' -driver_objs = SConscript('src/drivers/SConscript', duplicate = 0, \ - variant_dir = BUILD - exports = {'symbols' : all_syms, 'env' : env}) -generic_objs = SConscript('src/generic/SConscript', duplicate = 0, \ - variant_dir = BUILDDIR + "/src/generic", \ - exports = {'symbols' : all_syms, 'env' : env}) -arch_objs = SConscript('src/arch/' + arch + '/SConscript', duplicate = 0, \ - variant_dir = BUILDDIR + "/src/arch/" + arch, \ - exports = {'symbols' : all_syms, 'env' : env}) -plat_objs = SConscript('src/platform/' + platform + '/SConscript', duplicate = 0, \ - variant_dir = BUILDDIR + "/src/platform/" + platform, \ - exports = {'symbols' : all_syms, 'env' : env}) -subarch_objs = SConscript('src/arch/' + arch + '/' + subarch + '/SConscript', \ - variant_dir = BUILDDIR + '/src/arch/' + arch + '/' + subarch, \ - exports = {'symbols' : all_syms, 'env' : env}) -glue_objs = SConscript('src/glue/' + arch + '/SConscript', duplicate = 0, \ - variant_dir = BUILDDIR + '/src/glue/' + arch, \ - exports = {'symbols' : all_syms, 'env' : env}) -lib_objs = SConscript('src/lib/SConscript', duplicate = 0, \ - variant_dir = BUILDDIR + '/src/lib', \ - exports = {'symbols' : all_syms, 'env' : env}) -api_objs = SConscript('src/api/SConscript', duplicate = 0, \ - variant_dir = BUILDDIR + '/src/api', \ - exports = {'symbols' : all_syms, 'env' : env}) +objects = [] +objects += SConscript('src/drivers/SConscript', exports = {'symbols' : all_syms, 'env' : env}) +objects += SConscript('src/generic/SConscript',exports = {'symbols' : all_syms, 'env' : env}) +objects += SConscript('src/arch/' + arch + '/SConscript', exports = {'symbols' : all_syms, 'env' : env}) +objects += SConscript('src/platform/' + platform + '/SConscript', exports = {'symbols' : all_syms, 'env' : env}) +objects += SConscript('src/arch/' + arch + '/' + subarch + '/SConscript', exports = {'symbols' : all_syms, 'env' : env}) +objects += SConscript('src/glue/' + arch + '/SConscript', exports = {'symbols' : all_syms, 'env' : env}) +objects += SConscript('src/lib/SConscript', exports = {'symbols' : all_syms, 'env' : env}) +objects += SConscript('src/api/SConscript', exports = {'symbols' : all_syms, 'env' : env}) -objects = driver_objs + generic_objs + arch_objs + plat_objs + subarch_objs + \ - glue_objs + lib_objs + api_objs - -kernel_elf = env.Program('kernel.elf', objects) +kernel_elf = env.Program(BUILDDIR + '/kernel.elf', objects) diff --git a/src/arch/arm/v6/SConscript b/src/arch/arm/v6/SConscript new file mode 100644 index 0000000..4fd282a --- /dev/null +++ b/src/arch/arm/v6/SConscript @@ -0,0 +1,10 @@ + + +# Inherit global environment +Import('env') + +# The set of source files associated with this SConscript file. +src_local = ['mm.c', 'mmu_ops.S', 'mutex.S'] + +obj = env.Object(src_local) +Return('obj') diff --git a/src/arch/arm/v7/SConscript b/src/arch/arm/v7/SConscript new file mode 100644 index 0000000..4fd282a --- /dev/null +++ b/src/arch/arm/v7/SConscript @@ -0,0 +1,10 @@ + + +# Inherit global environment +Import('env') + +# The set of source files associated with this SConscript file. +src_local = ['mm.c', 'mmu_ops.S', 'mutex.S'] + +obj = env.Object(src_local) +Return('obj') diff --git a/src/drivers/SConscript b/src/drivers/SConscript index a92579d..bfd799e 100644 --- a/src/drivers/SConscript +++ b/src/drivers/SConscript @@ -11,6 +11,8 @@ for name, val in symbols: src_local.append(glob.glob("timer/sp804/*.c")) if "CONFIG_DRIVER_IRQ_PL190" == name: src_local.append(glob.glob("irq/pl190/*.c")) + if "CONFIG_DRIVER_IRQ_GIC" == name: + src_local.append(glob.glob("irq/gic/*.c")) obj = env.Object(src_local) diff --git a/src/platform/ab926/SConscript b/src/platform/ab926/SConscript new file mode 100644 index 0000000..cd867bf --- /dev/null +++ b/src/platform/ab926/SConscript @@ -0,0 +1,10 @@ + + +# Inherit global environment +Import('env') + +# The set of source files associated with this SConscript file. +src_local = ['printascii.S','platform.c', 'uart.c', 'timer.c', 'irq.c'] + +obj = env.Object(src_local) +Return('obj') diff --git a/src/platform/eb/SConscript b/src/platform/eb/SConscript new file mode 100644 index 0000000..cd867bf --- /dev/null +++ b/src/platform/eb/SConscript @@ -0,0 +1,10 @@ + + +# Inherit global environment +Import('env') + +# The set of source files associated with this SConscript file. +src_local = ['printascii.S','platform.c', 'uart.c', 'timer.c', 'irq.c'] + +obj = env.Object(src_local) +Return('obj') diff --git a/src/platform/pb11mpcore/SConscript b/src/platform/pb11mpcore/SConscript new file mode 100644 index 0000000..cd867bf --- /dev/null +++ b/src/platform/pb11mpcore/SConscript @@ -0,0 +1,10 @@ + + +# Inherit global environment +Import('env') + +# The set of source files associated with this SConscript file. +src_local = ['printascii.S','platform.c', 'uart.c', 'timer.c', 'irq.c'] + +obj = env.Object(src_local) +Return('obj') diff --git a/src/platform/pba8/SConscript b/src/platform/pba8/SConscript new file mode 100644 index 0000000..cd867bf --- /dev/null +++ b/src/platform/pba8/SConscript @@ -0,0 +1,10 @@ + + +# Inherit global environment +Import('env') + +# The set of source files associated with this SConscript file. +src_local = ['printascii.S','platform.c', 'uart.c', 'timer.c', 'irq.c'] + +obj = env.Object(src_local) +Return('obj') diff --git a/toolchains.py b/toolchains.py deleted file mode 100644 index 23703b9..0000000 --- a/toolchains.py +++ /dev/null @@ -1,46 +0,0 @@ -# -*- mode: python; coding: utf-8; -*- - -# Codezero -- a microkernel for embedded systems. -# -# Copyright © 2009 B Labs Ltd -# -# 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 3 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, see -# . -# -# Author: Russel Winder - -# This dictionary, specifies all the toolchain properties. There must be an entry in this dictionary for -# each and every processor type specified in configs/arm.cml. - -toolchains = { - 'arm' : { - 'arm1136': { - 'mainCompiler': 'arm-none-linux-gnueabi-gcc', - 'kernelCompiler': 'arm-none-eabi-gcc', - 'cpuOption': 'arm1136j-s', # What about arm1136jf-s ??? - }, - 'arm11mpcore': { - 'mainCompiler': 'arm-none-linux-gnueabi-gcc', - 'kernelCompiler': 'arm-none-eabi-gcc', - 'cpuOption': 'mpcore' - }, - 'arm926': { - 'mainCompiler': 'arm-none-linux-gnueabi-gcc', - 'kernelCompiler': 'arm-none-eabi-gcc', - 'cpuOption': 'arm926ej-s' - }, - 'cortexa8': { - 'mainCompiler': 'arm-none-linux-gnueabi-gcc', - 'kernelCompiler': 'arm-none-eabi-gcc', - 'cpuOption': 'cortex-a8' - }, - }, - }