diff mbox series

[isar-cip-core,2/3] start-qemu.sh: Use 'TARGET_IMAGE' to pick respective image file

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

Commit Message

Venkata Pyla July 27, 2020, 11:41 a.m. UTC
From: Venkata Pyla <venkata.pyla@toshiba-tsip.com>

Use 'TARGET_IMAGE' to pick respective image file when starting qemu
by default 'TARGET_IMAGE' uses "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 Pyla <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