ci(n1sdp): refactor fip fragment for specificity
The ``n1sdp-fip`` fragment builds the fip image with UEFI. Replace the
fragment to target this specific use case as we also want to generate
fip images with other NS workloads i.e. TFTF. Move parts of the code for
creating a fip image with xCP firmware to a generic location so it may
be used by other fragments.
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
Change-Id: I37433e32f1bc235e4c524ceed5730b0bc4c63ddd
diff --git a/lava_utils.sh b/lava_utils.sh
index 7040454..39fbb8e 100644
--- a/lava_utils.sh
+++ b/lava_utils.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -12,10 +12,12 @@
# Bash doesn't have array values, we have to create references to the
# array of artefacts and their urls.
- declare -n artefacts="$1"
- declare -n artefact_urls="$2"
+ declare -n artefacts="${1-null}"
+ declare -n artefact_urls="${2-null}"
- readarray -t boot_arguments < "${lava_model_params}"
+ if [ -f "${lava_model_params}" ]; then
+ readarray -t boot_arguments < "${lava_model_params}"
+ fi
# Source runtime environment variables now so that they are accessible from
# the LAVA job template.