X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=tools%2Fyardstick-img-modify;h=599768555528a32f1c42483bc944307c009df625;hb=refs%2Fchanges%2F73%2F57073%2F6;hp=a00ffe6d717a2df41307254cbf97f8f05063537c;hpb=14172bb39e8e30f37ec5bb80be6b187ab6858e88;p=yardstick.git diff --git a/tools/yardstick-img-modify b/tools/yardstick-img-modify index a00ffe6d7..599768555 100755 --- a/tools/yardstick-img-modify +++ b/tools/yardstick-img-modify @@ -48,8 +48,8 @@ fi image_path="${release}/current/${release}-server-cloudimg-${YARD_IMG_ARCH}-${boot_mode}.img" image_url=${IMAGE_URL:-"https://${host}/${image_path}"} -md5sums_path="${release}/current/MD5SUMS" -md5sums_url=${MD5SUMS_URL:-"https://${host}/${md5sums_path}"} +sha256sums_path="${release}/current/SHA256SUMS" +sha256sums_url=${SHA256SUMS_URL:-"https://${host}/${sha256sums_path}"} imgfile="${workspace}/yardstick-image.img" raw_imgfile_basename="yardstick-${release}-server.raw" @@ -62,14 +62,14 @@ apt-get install -y parted download() { test -d $workspace || mkdir -p $workspace cd $workspace - rm -f MD5SUMS # always download the checksum file to a detect stale image - wget $md5sums_url + rm -f SHA256SUMS # always download the checksum file to a detect stale image + wget $sha256sums_url test -e $filename || wget -nc --progress=dot:giga $image_url - grep $filename MD5SUMS | md5sum -c || + grep $filename SHA256SUMS | sha256sum -c || if [ $? -ne 0 ]; then rm $filename wget -nc --progress=dot:giga $image_url - grep $filename MD5SUMS | md5sum -c + grep $filename SHA256SUMS | sha256sum -c fi for i in $(seq 0 9); do @@ -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