riscv64: build boot image for testing.

It is supported now, after https://r.android.com/2557830.

Test: run ART test 001-HelloWorld with a boot image (without --no-image
  option) on a Linux RISC-V VM:

  lunch aosp_riscv64-userdebug

  export ART_TEST_SSH_USER=ubuntu
  export ART_TEST_SSH_HOST=localhost
  export ART_TEST_SSH_PORT=10001
  export ART_TEST_ON_VM=true

  . art/tools/buildbot-utils.sh
  art/tools/buildbot-build.sh --target

  # Create, boot and configure the VM.
  art/tools/buildbot-vm.sh create
  art/tools/buildbot-vm.sh boot
  art/tools/buildbot-vm.sh setup-ssh  # password: 'ubuntu'

  art/tools/buildbot-cleanup-device.sh
  art/tools/buildbot-setup-device.sh
  art/tools/buildbot-sync.sh

  art/test.py --target -r --no-prebuild --ndebug --64 --interpreter \
    001-HelloWorld

Bug: b/271573990
Change-Id: Idaf25d8e64775b8069afc900bd059429047d9ca5
diff --git a/tools/buildbot-sync.sh b/tools/buildbot-sync.sh
index ef9ec8b..512782c 100755
--- a/tools/buildbot-sync.sh
+++ b/tools/buildbot-sync.sh
@@ -129,34 +129,30 @@
 activate_apex com.android.conscrypt
 activate_apex com.android.os.statsd
 
-if [[ "$TARGET_ARCH" = "riscv64" ]]; then
-  true # Skip boot image generation for RISC-V; it's not supported.
-else
-  # Generate primary boot images on device for testing.
-  for b in {32,64}; do
-    basename="generate-boot-image$b"
-    bin_on_host="$ANDROID_PRODUCT_OUT/system/bin/$basename"
-    bin_on_device="/data/local/tmp/$basename"
-    output_dir="/system/framework/art_boot_images"
-    if [ -f $bin_on_host ]; then
-      msginfo "Generating the primary boot image ($b-bit)..."
-      if [[ -n "$ART_TEST_ON_VM" ]]; then
-        $ART_RSYNC_CMD "$bin_on_host" \
-          "$ART_TEST_SSH_USER@$ART_TEST_SSH_HOST:$ART_TEST_CHROOT$bin_on_device"
-        $ART_SSH_CMD "mkdir -p $ART_TEST_CHROOT$output_dir"
-      else
-        adb push "$bin_on_host" "$ART_TEST_CHROOT$bin_on_device"
-        adb shell mkdir -p "$ART_TEST_CHROOT$output_dir"
-      fi
-      # `compiler-filter=speed-profile` is required because OatDumpTest checks the compiled code in
-      # the boot image.
-      if [[ -n "$ART_TEST_ON_VM" ]]; then
-        $ART_SSH_CMD \
-          "$ART_CHROOT_CMD $bin_on_device --output-dir=$output_dir --compiler-filter=speed-profile"
-      else
-        adb shell chroot "$ART_TEST_CHROOT" \
-          "$bin_on_device" --output-dir=$output_dir --compiler-filter=speed-profile
-      fi
+# Generate primary boot images on device for testing.
+for b in {32,64}; do
+  basename="generate-boot-image$b"
+  bin_on_host="$ANDROID_PRODUCT_OUT/system/bin/$basename"
+  bin_on_device="/data/local/tmp/$basename"
+  output_dir="/system/framework/art_boot_images"
+  if [ -f $bin_on_host ]; then
+    msginfo "Generating the primary boot image ($b-bit)..."
+    if [[ -n "$ART_TEST_ON_VM" ]]; then
+      $ART_RSYNC_CMD "$bin_on_host" \
+        "$ART_TEST_SSH_USER@$ART_TEST_SSH_HOST:$ART_TEST_CHROOT$bin_on_device"
+      $ART_SSH_CMD "mkdir -p $ART_TEST_CHROOT$output_dir"
+    else
+      adb push "$bin_on_host" "$ART_TEST_CHROOT$bin_on_device"
+      adb shell mkdir -p "$ART_TEST_CHROOT$output_dir"
     fi
-  done
-fi
+    # `compiler-filter=speed-profile` is required because OatDumpTest checks the compiled code in
+    # the boot image.
+    if [[ -n "$ART_TEST_ON_VM" ]]; then
+      $ART_SSH_CMD \
+        "$ART_CHROOT_CMD $bin_on_device --output-dir=$output_dir --compiler-filter=speed-profile"
+    else
+      adb shell chroot "$ART_TEST_CHROOT" \
+        "$bin_on_device" --output-dir=$output_dir --compiler-filter=speed-profile
+    fi
+  fi
+done