diff mbox series

[2/3] start-qemu.sh: use TARGET_IMAGE to pick respective image file

Message ID 20200721081645.1789-2-venkata.pyla@toshiba-tsip.com (mailing list archive)
State Accepted
Headers show
Series [1/3] cip-security: Add packages for IEC-62443-4-2 Evaluation. | expand

Commit Message

Venkata Pyla July 21, 2020, 8:16 a.m. UTC
From: venkata <venkata.pyla@toshiba-tsip.com>

if 'TARGET_IMAGE' variable is not set then it pick "cip-core-image",
to pick different target image set the 'TARGET_IMAGE' variable as below
e.g: $TARGET_IMAGE=cip-core-image-security ./start-qemu.sh amd64

Signed-off-by: venkata <venkata.pyla@toshiba-tsip.com>
---
 start-qemu.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/start-qemu.sh b/start-qemu.sh
index 49f0266..5c17d74 100755
--- a/start-qemu.sh
+++ b/start-qemu.sh
@@ -75,7 +75,11 @@  if [ -z "${DISTRO_RELEASE}" ]; then
 	DISTRO_RELEASE="buster"
 fi
 
-IMAGE_PREFIX="$(dirname $0)/build/tmp/deploy/images/qemu-${DISTRO_ARCH}/cip-core-image-cip-core-${DISTRO_RELEASE}-qemu-${DISTRO_ARCH}"
+if [ -z "${TARGET_IMAGE}" ]; then
+	TARGET_IMAGE="cip-core-image"
+fi
+
+IMAGE_PREFIX="$(dirname $0)/build/tmp/deploy/images/qemu-${DISTRO_ARCH}/${TARGET_IMAGE}-cip-core-${DISTRO_RELEASE}-qemu-${DISTRO_ARCH}"
 IMAGE_FILE=$(ls ${IMAGE_PREFIX}.ext4.img)
 
 if [ -z "${DISPLAY}" ]; then