aboutsummaryrefslogtreecommitdiff
path: root/SConscript
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2019-10-07 13:00:44 +0100
committerMichalis Spyrou <michalis.spyrou@arm.com>2019-12-20 14:04:51 +0000
commit748a7c81245ae81d04607b3a762cf65cd39026f2 (patch)
tree21ac8ad379989fde4aa73e6cf5814c6182f2c3d8 /SConscript
parent37cbc5781ac0aa5106941d0386070d6dc9958a2a (diff)
downloadComputeLibrary-748a7c81245ae81d04607b3a762cf65cd39026f2.tar.gz
COMPMID-2706: Add the ability to build bootcode for bare metal
Adds an option for providing a linker script and also adds the bootcode folder, it it exists, in the build path and links it with the executable binaries. Change-Id: I4119b21bdf1b4dd7fe38c4ee66741460666f53a1 Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com> Reviewed-on: https://review.mlplatform.org/c/2051 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'SConscript')
-rw-r--r--SConscript14
1 files changed, 14 insertions, 0 deletions
diff --git a/SConscript b/SConscript
index 0b7729cced..66dfff4511 100644
--- a/SConscript
+++ b/SConscript
@@ -31,6 +31,14 @@ Import('env')
Import('vars')
Import('install_lib')
+def build_bootcode_objs(sources):
+
+ arm_compute_env.Append(ASFLAGS = "-I bootcode/")
+ obj = arm_compute_env.Object(sources)
+ obj = install_lib(obj)
+ Default(obj)
+ return obj
+
def build_library(name, sources, static=False, libs=[]):
if static:
obj = arm_compute_env.StaticLibrary(name, source=sources, LIBS = arm_compute_env["LIBS"] + libs)
@@ -240,6 +248,12 @@ if env['gles_compute']:
graph_files += Glob('src/graph/backends/GLES/*.cpp')
+bootcode_o = []
+if env['os'] == 'bare_metal':
+ bootcode_files = Glob('bootcode/*.s')
+ bootcode_o = build_bootcode_objs(bootcode_files)
+Export('bootcode_o')
+
arm_compute_core_a = build_library('arm_compute_core-static', core_files, static=True)
Export('arm_compute_core_a')