@@ -26,6 +26,7 @@ errata_force=0
erratatxt="$srcdir/errata.txt"
host_key_document=
page_size=
+ext_dir=
usage() {
cat <<-EOF
@@ -54,6 +55,8 @@ usage() {
--page-size=PAGE_SIZE
Specify the page size (translation granule) (4k, 16k or
64k, default is 64k, arm64 only)
+ --ext-dir=DIR specify an additional location with more tests; when enabled
+ DIR/Makefile is included to the build system (arm/arm64 only)
EOF
exit 1
}
@@ -112,6 +115,9 @@ while [[ "$1" = -* ]]; do
--page-size)
page_size="$arg"
;;
+ --ext-dir)
+ ext_dir="$arg"
+ ;;
--help)
usage
;;
@@ -264,6 +270,7 @@ U32_LONG_FMT=$u32_long
WA_DIVIDE=$wa_divide
GENPROTIMG=${GENPROTIMG-genprotimg}
HOST_KEY_DOCUMENT=$host_key_document
+EXT_DIR=$ext_dir
EOF
cat <<EOF > lib/config.h
@@ -13,6 +13,10 @@ tests-common += $(TEST_DIR)/psci.flat
tests-common += $(TEST_DIR)/sieve.flat
tests-common += $(TEST_DIR)/pl031.flat
+ifdef EXT_DIR
+include $(EXT_DIR)/Makefile
+endif
+
tests-all = $(tests-common) $(tests)
all: directories $(tests-all)
This change adds an argument to the configure script which allows a user to specify an external directory with extra tests. When specified, the build system will include the Makefile in that directory allowing a user to add extra tests. For example: For example, DIR contains a test in test.c which depends on symbols defined in obj.c and the Makefile: tests += $(EXT_DIR)/test.flat cflatobjs += $(EXT_DIR)/obj.o With this change, we can add DIR to the build process and generate the test using $> ./configure --ext-dir=DIR $> make Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com> --- configure | 7 +++++++ arm/Makefile.common | 4 ++++ 2 files changed, 11 insertions(+)