aarch64: Fix missing qemu-aarch64-static in chroot 01/31201/2
authorPaul Vaduva <Paul.Vaduva@enea.com>
Tue, 21 Mar 2017 14:36:46 +0000 (15:36 +0100)
committerPaul-Ionut Vaduva <paul.vaduva@enea.com>
Tue, 21 Mar 2017 20:24:55 +0000 (20:24 +0000)
During recent rework, we lost the explicit copy of qemu-aarch64-static
from docker to chroot; so when trying to execute AArch64 binaries
inside chroot, no emulator was present to handle it.

This change brings back (inside chroot) the missing emulator binary.

JIRA: YARDSTICK-595

Change-Id: I146e2eeec2e9452a0db36f0bf0a466a8affc2005
Signed-off-by: Paul Vaduva <Paul.Vaduva@enea.com>
tools/ubuntu-server-cloudimg-modify.sh
tools/yardstick-img-modify

index 66a6452..66c740e 100755 (executable)
@@ -74,14 +74,8 @@ git clone https://github.com/kdlucas/byte-unixbench.git "${CLONE_DEST}"
 
 make --directory "${CLONE_DEST}/UnixBench/"
 
-if [ "${YARD_IMG_ARCH}" = "arm64" ]; then
-    wget https://github.com/beefyamoeba5/ramspeed/archive/master.zip
-    unzip master.zip && rm master.zip
-    mkdir "${CLONE_DEST}/RAMspeed"
-    mv ramspeed-master/* "${CLONE_DEST}/RAMspeed/"
-else
-    git clone https://github.com/beefyamoeba5/ramspeed.git "${CLONE_DEST}/RAMspeed"
-fi
+git clone https://github.com/beefyamoeba5/ramspeed.git "${CLONE_DEST}/RAMspeed"
+
 cd "${CLONE_DEST}/RAMspeed/ramspeed-2.6.0"
 mkdir temp
 bash build.sh
index 81a9ed7..5997685 100755 (executable)
@@ -83,9 +83,6 @@ download() {
 # mount image
 setup() {
     # qemu-img resize $raw_imgfile +5GB
-    if [ "${YARD_IMG_ARCH}" = "arm64" ]; then
-        echo -e "d\nn\np\n1\n\n\nw" | parted -l $raw_imgfile
-    fi
     mkdir -p $mountdir
 
     loopdevice=$(kpartx -l $raw_imgfile | head -1 | cut -f1 -d ' ')
@@ -100,6 +97,9 @@ setup() {
     mount -t proc none $mountdir/proc
 
     cp $cmd $mountdir/$(basename $cmd)
+    if [ "${YARD_IMG_ARCH}" = "arm64" ]; then
+        cp /usr/bin/qemu-aarch64-static $mountdir/usr/bin
+    fi
 }
 
 # modify image running a script using in a chrooted environment