mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 10:53:16 +01:00
Created a config directory for configuration files. Moved all absolute path variables to a projpaths.py file All scripts can now universally learn absolute paths via projpaths.py Moved the config_symbols class to the configuration.py file. Moved libs to loader since they are only referred by the loader
44 lines
2.0 KiB
Python
44 lines
2.0 KiB
Python
# -*- mode: python; coding: utf-8; -*-
|
|
#
|
|
# Codezero -- a microkernel for embedded systems.
|
|
#
|
|
# Copyright © 2009 B Labs Ltd
|
|
#
|
|
import os, shelve
|
|
import configure
|
|
from configure import *
|
|
|
|
env = Environment(CC = 'arm-none-eabi-gcc',
|
|
# We don't use -nostdinc because sometimes we need standard headers,
|
|
# such as stdarg.h e.g. for variable args, as in printk().
|
|
CCFLAGS = ['-g', '-mcpu=arm926ej-s', '-nostdlib', '-ffreestanding', \
|
|
'-std=gnu99', '-Wall', '-Werror'],
|
|
LINKFLAGS = ['-nostdlib', '-T' + "include/l4/arch/arm/linker.lds"],
|
|
ASFLAGS = ['-D__ASSEMBLY__'],
|
|
PROGSUFFIX = '.elf', # The suffix to use for final executable
|
|
ENV = {'PATH' : os.environ['PATH']}, # Inherit shell path
|
|
LIBS = 'gcc', # libgcc.a - This is required for division routines.
|
|
CPPPATH = "#include",
|
|
CPPFLAGS = '-include l4/config.h -include l4/macros.h -include l4/types.h -D__KERNEL__')
|
|
|
|
config_shelve = shelve.open(CONFIG_SHELVE)
|
|
#symbols = config_shelve["config_symbols"]
|
|
arch = config_shelve["arch"]
|
|
subarch = config_shelve["subarch"]
|
|
platform = config_shelve["platform"]
|
|
all_syms = config_shelve["all_symbols"]
|
|
|
|
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})
|
|
|
|
kernel_elf = env.Program(BUILDDIR + '/kernel.elf', objects)
|
|
|
|
|