diff mbox series

[4/7] gem5: support for EXTRAS

Message ID 20221121154352.5061-4-jon.mason@arm.com
State New
Headers show
Series [1/7] atp: fix failing test_readme | expand

Commit Message

Jon Mason Nov. 21, 2022, 3:43 p.m. UTC
From: Adrián Herrera Arcila <adrian.herrera@arm.com>

External models can be added to gem5 through EXTRAS:
https://www.gem5.org/documentation/general_docs/building/EXTRAS

Added GEM5_EXTRAS to the gem5-native recipe to support it.

Signed-off-by: Adrián Herrera Arcila <adrian.herrera@arm.com>
---
 meta-gem5/recipes-devtools/gem5/gem5-native.inc | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta-gem5/recipes-devtools/gem5/gem5-native.inc b/meta-gem5/recipes-devtools/gem5/gem5-native.inc
index 91a554bb..0f794b3f 100644
--- a/meta-gem5/recipes-devtools/gem5/gem5-native.inc
+++ b/meta-gem5/recipes-devtools/gem5/gem5-native.inc
@@ -12,10 +12,15 @@  GEM5_BUILD_VARIANT ?= "opt"
 # What gem5 binary are we building
 GEM5_BUILD_CONFIGS ?= "build/X86/gem5.{GEM5_BUILD_VARIANT}"
 
+# Extra directories with sources for gem5 build. Intended to be used from
+# machine configuration files, to add out-of-tree gem5 models of their
+# hardware components.
+GEM5_EXTRAS ?= ""
+
 # Scons build arguments
 GEM5_SCONS_ARGS ?= "CC=${BUILD_CC} CXX=${BUILD_CXX} \
     AS=${BUILD_AS} AR=${BUILD_AR} ${GEM5_BUILD_CONFIGS} \
-    PYTHON_CONFIG=python3-config"
+    PYTHON_CONFIG=python3-config EXTRAS=${GEM5_EXTRAS}"
 
 # Default profile to run
 GEM5_RUN_PROFILE ?= "configs/example/fs.py"