From c79c748013ec53ff59e9260034822a5b26afa441 Mon Sep 17 00:00:00 2001
From: "juraj.linkes" <juraj.linkes@pantheon.tech>
Date: Wed, 17 Jul 2019 14:28:30 +0200
Subject: Add support for aarch64 container images

Change-Id: I84f13d7139a6e5f7004426018c2d27425c5fa97e
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
---
 resources/libraries/bash/function/common.sh | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

(limited to 'resources/libraries/bash/function')

diff --git a/resources/libraries/bash/function/common.sh b/resources/libraries/bash/function/common.sh
index 696fc71189..e576f99d8d 100644
--- a/resources/libraries/bash/function/common.sh
+++ b/resources/libraries/bash/function/common.sh
@@ -648,7 +648,7 @@ function run_pybot () {
 }
 
 
-function select_os () {
+function select_arch_os () {
 
     # Populate variables related to local operating system.
     #
@@ -678,7 +678,19 @@ function select_os () {
             PKG_SUFFIX="rpm"
             ;;
         *)
-            die "Unable to identify distro or os from ${OS}"
+            die "Unable to identify distro or os from ${os_id}"
+            ;;
+    esac
+
+    arch=$(uname -m) || {
+        die "Get CPU architecture failed."
+    }
+
+    case "${arch}" in
+        "aarch64")
+            IMAGE_VER_FILE="${IMAGE_VER_FILE}_ARM"
+            ;;
+        *)
             ;;
     esac
 }
-- 
cgit