mirror of
https://github.com/drasko/codezero.git
synced 2026-04-17 17:29:04 +02:00
Add some comments and TODOs. Update the help text.
This commit is contained in:
41
SConstruct
41
SConstruct
@@ -79,6 +79,12 @@ else :
|
|||||||
|
|
||||||
kernelSConscriptPaths = [ 'generic' , 'api' , 'lib' ]
|
kernelSConscriptPaths = [ 'generic' , 'api' , 'lib' ]
|
||||||
|
|
||||||
|
# It is assumed that the C code is assuming that the configuration file will be found at l4/config.h so create it there.
|
||||||
|
#
|
||||||
|
# Kernel code include config.h in a different way to all the other bits of code.
|
||||||
|
#
|
||||||
|
# TODO: Decide if this is an issue or not.
|
||||||
|
|
||||||
configuration = Configure ( baseEnvironment , config_h = buildDirectory + '/l4/config.h' )
|
configuration = Configure ( baseEnvironment , config_h = buildDirectory + '/l4/config.h' )
|
||||||
configData = processCML2Config ( )
|
configData = processCML2Config ( )
|
||||||
arch = None
|
arch = None
|
||||||
@@ -148,6 +154,11 @@ else :
|
|||||||
PROGSUFFIX = '.axf' ,
|
PROGSUFFIX = '.axf' ,
|
||||||
LIBS = 'gcc' ,
|
LIBS = 'gcc' ,
|
||||||
CPPPATH = [ '#' + buildDirectory , '#' + buildDirectory + '/l4' , '#' + includeDirectory , '#' + includeDirectory + '/l4' ] ,
|
CPPPATH = [ '#' + buildDirectory , '#' + buildDirectory + '/l4' , '#' + includeDirectory , '#' + includeDirectory + '/l4' ] ,
|
||||||
|
|
||||||
|
####
|
||||||
|
#### TODO: Why are these files forcibly included, why not just leave it up to the C code to include things?
|
||||||
|
####
|
||||||
|
|
||||||
CPPFLAGS = [ '-include' , 'config.h' , '-include' , 'cml2Config.h' , '-include' , 'macros.h' , '-include' , 'types.h' , '-D__KERNEL__' ] )
|
CPPFLAGS = [ '-include' , 'config.h' , '-include' , 'cml2Config.h' , '-include' , 'macros.h' , '-include' , 'types.h' , '-D__KERNEL__' ] )
|
||||||
|
|
||||||
kernelComponents = [ ]
|
kernelComponents = [ ]
|
||||||
@@ -160,7 +171,7 @@ else :
|
|||||||
|
|
||||||
########## Build the tasks ########################
|
########## Build the tasks ########################
|
||||||
|
|
||||||
tasksSupportLibraryEnvironment = baseEnvironment.Clone (
|
taskSupportLibraryEnvironment = baseEnvironment.Clone (
|
||||||
CC = 'arm-none-linux-gnueabi-gcc' ,
|
CC = 'arm-none-linux-gnueabi-gcc' ,
|
||||||
CCFLAGS = [ '-g' , '-nostdlib' , '-ffreestanding' , '-std=gnu99' , '-Wall' , '-Werror' ] ,
|
CCFLAGS = [ '-g' , '-nostdlib' , '-ffreestanding' , '-std=gnu99' , '-Wall' , '-Werror' ] ,
|
||||||
LINKFLAGS = [ '-nostdlib' ] ,
|
LINKFLAGS = [ '-nostdlib' ] ,
|
||||||
@@ -172,11 +183,11 @@ else :
|
|||||||
|
|
||||||
taskLibraries = [ ]
|
taskLibraries = [ ]
|
||||||
for library in taskLibraryNames :
|
for library in taskLibraryNames :
|
||||||
taskLibraries.append ( SConscript ( 'tasks/' + library + '/SConscript' , variant_dir = buildDirectory + '/tasks/' + library , duplicate = 0 , exports = { 'environment' : tasksSupportLibraryEnvironment } ) )
|
taskLibraries.append ( SConscript ( 'tasks/' + library + '/SConscript' , variant_dir = buildDirectory + '/tasks/' + library , duplicate = 0 , exports = { 'environment' : taskSupportLibraryEnvironment } ) )
|
||||||
|
|
||||||
Depends ( taskLibraries , tasksSupportLibraryEnvironment['configFiles'] )
|
Depends ( taskLibraries , taskSupportLibraryEnvironment['configFiles'] )
|
||||||
|
|
||||||
Alias ( 'tasksLibraries' , taskLibraries )
|
Alias ( 'taskLibraries' , taskLibraries )
|
||||||
|
|
||||||
tasksEnvironment = baseEnvironment.Clone (
|
tasksEnvironment = baseEnvironment.Clone (
|
||||||
CC = 'arm-none-linux-gnueabi-gcc' ,
|
CC = 'arm-none-linux-gnueabi-gcc' ,
|
||||||
@@ -185,7 +196,7 @@ else :
|
|||||||
ASFLAGS = [ '-D__ASSEMBLY__' ] ,
|
ASFLAGS = [ '-D__ASSEMBLY__' ] ,
|
||||||
LIBS = 'gcc' ,
|
LIBS = 'gcc' ,
|
||||||
CPPDEFINES = [ '__USERSPACE__' ] ,
|
CPPDEFINES = [ '__USERSPACE__' ] ,
|
||||||
CPPPATH = [ '#' + buildDirectory , '#' + buildDirectory + '/l4' , '#' + includeDirectory , '#' + includeDirectory + '/l4' ] )
|
CPPPATH = [ '#' + buildDirectory , '#' + buildDirectory + '/l4' , '#' + includeDirectory , '#' + includeDirectory + '/l4' ] )
|
||||||
|
|
||||||
tasks = [ ]
|
tasks = [ ]
|
||||||
for task in [ f.name for f in Glob ( 'tasks/*' ) if f.name not in taskLibraryNames + [ 'bootdesc' ] ] :
|
for task in [ f.name for f in Glob ( 'tasks/*' ) if f.name not in taskLibraryNames + [ 'bootdesc' ] ] :
|
||||||
@@ -201,11 +212,19 @@ else :
|
|||||||
|
|
||||||
Clean ( '.' , [ buildDirectory ] )
|
Clean ( '.' , [ buildDirectory ] )
|
||||||
|
|
||||||
Help ( '''
|
########## Be helpful ########################
|
||||||
configure -- configure the build area ready for a build.
|
|
||||||
|
|
||||||
libraries -- build the support library.
|
Help ( '''
|
||||||
kernel -- build the kernel.
|
Explicit targets are:
|
||||||
taskLibraries -- build all the support libraries for the tasks.
|
|
||||||
tasks -- build all the tasks.
|
configure -- configure the build area ready for a build.
|
||||||
|
|
||||||
|
libraries -- build the support library.
|
||||||
|
kernel -- build the kernel.
|
||||||
|
taskLibraries -- build all the support libraries for the tasks.
|
||||||
|
tasks -- build all the tasks.
|
||||||
|
|
||||||
|
The default target is to compile everything and to do a final link.
|
||||||
|
|
||||||
|
Compilation can only be undertaken after a configuration.
|
||||||
''' )
|
''' )
|
||||||
|
|||||||
Reference in New Issue
Block a user