mirror of
https://github.com/drasko/codezero.git
synced 2026-03-03 11:03:16 +01:00
Various changes post sorting out some of the issues regarding task ordering.
test0 cannot be the first task in the list as it must have a prior physical_base.lds in order to create test_exec_linker.lds. mm0 appears to have to precede fs0 for the tests to execute on start. This should be considered a bug.
This commit is contained in:
@@ -34,7 +34,7 @@ cml2CompileRulesFile = buildDirectory + '/cml2Rules.out'
|
|||||||
cml2ConfigPropertiesFile = buildDirectory + '/cml2Config.out'
|
cml2ConfigPropertiesFile = buildDirectory + '/cml2Config.out'
|
||||||
cml2ConfigHeaderFile = buildDirectory + '/cml2Config.h'
|
cml2ConfigHeaderFile = buildDirectory + '/cml2Config.h'
|
||||||
|
|
||||||
configureHelpEntry = 'configure the build.'
|
configureHelpEntry = 'configure the build. This must be done before any other action is possible.'
|
||||||
|
|
||||||
# The choice of which parts of the kernel to compile and include in the build depends on the configuration
|
# The choice of which parts of the kernel to compile and include in the build depends on the configuration
|
||||||
# which is managed using CML2. CML2 uses a base configuration file (currently #configs/arm.cml) to drive
|
# which is managed using CML2. CML2 uses a base configuration file (currently #configs/arm.cml) to drive
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ def buildTask(programName, sources, environment, previousImage, extraCppPath=Non
|
|||||||
Depends(objects, e['configFiles'])
|
Depends(objects, e['configFiles'])
|
||||||
program = e.Program(programName, objects)
|
program = e.Program(programName, objects)
|
||||||
environment['physicalBaseLinkerScript'] = Command('physical_base.lds', previousImage, 'tools/pyelf/readelf.py --first-free-page ' + previousImage[0].path + ' >> $TARGET')
|
environment['physicalBaseLinkerScript'] = Command('physical_base.lds', previousImage, 'tools/pyelf/readelf.py --first-free-page ' + previousImage[0].path + ' >> $TARGET')
|
||||||
Depends(program, [environment['physicalBaseLinkerScript']])
|
Depends(program, environment['physicalBaseLinkerScript'])
|
||||||
return program
|
return program
|
||||||
|
|
||||||
tasksEnvironment = environment.Clone()
|
tasksEnvironment = environment.Clone()
|
||||||
@@ -68,11 +68,24 @@ tasksEnvironment['posixServicesDirectory'] = 'containers/' + posixServicesDirect
|
|||||||
#### because of the text in the linker script?
|
#### because of the text in the linker script?
|
||||||
####
|
####
|
||||||
|
|
||||||
#### taskNameList = [ f.name for f in Glob(posixServicesDirectory + '*') if f.name not in taskLibraryNames + ['bootdesc'] ]
|
## If the ordering of tasks is not important then we should just be able to pull in all non-library
|
||||||
#### imageOrderData = [(taskName, []) for taskName in taskNameList]
|
## directories that are not bootdesc. If there needs to be a policy then either the directory names need to
|
||||||
|
## provide an order or a policy file presenting an order is needed. For now we have a policy file. Since
|
||||||
|
## we need to guarantee the ordering across many containers and many builds.
|
||||||
|
|
||||||
|
## taskNameList = [ f.name for f in Glob(posixServicesDirectory + '*') if f.name not in taskLibraryNames + ['bootdesc'] ]
|
||||||
|
## imageOrderData = [(taskName, []) for taskName in taskNameList]
|
||||||
|
|
||||||
|
# To get the policy file, we have to know the build is being executed in the build/containers directory,
|
||||||
|
# and that we can't use '#' as this is Python not SCons.
|
||||||
|
|
||||||
|
####
|
||||||
|
#### TODO: Task order (mm0, fs0, test0) works, but no other order does. This implies a bug in the SCons
|
||||||
|
#### code.
|
||||||
|
####
|
||||||
|
|
||||||
# Have to know the build is in build/containers, can't use '#' here.
|
|
||||||
execfile('../../containers/' + posixServicesDirectory + '/taskOrder.py')
|
execfile('../../containers/' + posixServicesDirectory + '/taskOrder.py')
|
||||||
|
|
||||||
imageOrderData = [(taskName, []) for taskName in taskOrder]
|
imageOrderData = [(taskName, []) for taskName in taskOrder]
|
||||||
imageOrderData[0][1].append(startAxf)
|
imageOrderData[0][1].append(startAxf)
|
||||||
tasks = []
|
tasks = []
|
||||||
|
|||||||
@@ -20,10 +20,12 @@
|
|||||||
# A sequence determining the order of tasks in the packing.
|
# A sequence determining the order of tasks in the packing.
|
||||||
|
|
||||||
####
|
####
|
||||||
#### TODO: Why do the tests only run when the load order is mm0, fs0, test0 -- any other order and the tests
|
#### TODO: Why do the tests only run when mm0 precedes fs0 in the load list?
|
||||||
#### do not run. Worse if test0 is not last then there are problems with the compilation du to issues with
|
|
||||||
#### linker scripts.
|
|
||||||
####
|
####
|
||||||
|
|
||||||
taskOrder = ('mm0', 'fs0', 'test0')
|
# NB test0 cannot be the first task in the list because of the processing of test_exec_linker.lds.in.
|
||||||
#taskOrder = ('fs0', 'mm0', 'test0')
|
|
||||||
|
#taskOrder = ('mm0', 'fs0', 'test0')# Works fine.
|
||||||
|
#taskOrder = ('fs0', 'mm0', 'test0')# Compiles, loads and executes fine, but does not execute the tests.
|
||||||
|
#taskOrder = ('fs0', 'test0', 'mm0')# Compiles, loads and executes fine, but does not execute the tests.
|
||||||
|
taskOrder = ('mm0', 'test0', 'fs0')# Works fine.
|
||||||
|
|||||||
@@ -36,6 +36,16 @@ def createTestExecS(target, source, env):
|
|||||||
.align 4
|
.align 4
|
||||||
''' % ( source[0].path ))
|
''' % ( source[0].path ))
|
||||||
|
|
||||||
|
try:
|
||||||
|
environment['physicalBaseLinkerScript']
|
||||||
|
except KeyError:
|
||||||
|
print '''
|
||||||
|
####
|
||||||
|
#### The test0 task cannot be the first task in the list of tasks.
|
||||||
|
####
|
||||||
|
'''
|
||||||
|
Exit ( 1 )
|
||||||
|
|
||||||
testTaskEnvironment = environment.Clone()
|
testTaskEnvironment = environment.Clone()
|
||||||
testTaskEnvironment.Append(CPPPATH=['#' + testTaskEnvironment['posixServicesDirectory'] +'/libposix/include/posix'])
|
testTaskEnvironment.Append(CPPPATH=['#' + testTaskEnvironment['posixServicesDirectory'] +'/libposix/include/posix'])
|
||||||
testExecLinkerScript = Command('#build/' + testTaskEnvironment['posixServicesDirectory'] +'/' + taskName + '/test_exec_linker.lds', ['test_exec_linker.lds.in', testTaskEnvironment['physicalBaseLinkerScript']], createTestExecLinkerScript)
|
testExecLinkerScript = Command('#build/' + testTaskEnvironment['posixServicesDirectory'] +'/' + taskName + '/test_exec_linker.lds', ['test_exec_linker.lds.in', testTaskEnvironment['physicalBaseLinkerScript']], createTestExecLinkerScript)
|
||||||
|
|||||||
Reference in New Issue
Block a user