#!/bin/bash set -e DIR="$1" if [[ -z "$DIR" ]]; then echo "Usage: $0 " exit 1 fi if [[ ! -d "$DIR" ]]; then mkdir -p "$DIR" fi IMAGE_BASENAME="devel-system-armv7-versatile" COMPRESSED_IMAGE="$DIR/$IMAGE_BASENAME.img.gz" DECOMPRESSED_IMAGE=${COMPRESSED_IMAGE/.gz/} KERNEL_IMAGE="$DIR$/$IMAGE_BASENAME.zimage" ./download-image.sh "$DIR" "$IMAGE_BASENAME" # If we ever get multiple disks working on qemu ARM, execute: # ./create-source-disk.sh "$DIR" find_tunctl() { for path in `which tunctl` /{usr/,usr/local/}{bin,sbin}/tunctl; do if [ -x "$path" ]; then return 0 fi done return 1 } if ! find_tunctl; then cat >&2 <