mirror of
https://github.com/drasko/codezero.git
synced 2026-01-11 18:33:16 +01:00
Added newer platform files.
The build can now be done with fine-grain conditions on how to determine drivers, platforms, arch, subarch etc.
This commit is contained in:
50
SConstruct
50
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)
|
||||
|
||||
|
||||
|
||||
10
src/arch/arm/v6/SConscript
Normal file
10
src/arch/arm/v6/SConscript
Normal file
@@ -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')
|
||||
10
src/arch/arm/v7/SConscript
Normal file
10
src/arch/arm/v7/SConscript
Normal file
@@ -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')
|
||||
@@ -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)
|
||||
|
||||
|
||||
10
src/platform/ab926/SConscript
Normal file
10
src/platform/ab926/SConscript
Normal file
@@ -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')
|
||||
10
src/platform/eb/SConscript
Normal file
10
src/platform/eb/SConscript
Normal file
@@ -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')
|
||||
10
src/platform/pb11mpcore/SConscript
Normal file
10
src/platform/pb11mpcore/SConscript
Normal file
@@ -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')
|
||||
10
src/platform/pba8/SConscript
Normal file
10
src/platform/pba8/SConscript
Normal file
@@ -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')
|
||||
@@ -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
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# 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'
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user