diff options
Diffstat (limited to 'armv7-versatile/run-baserock-image.sh')
-rw-r--r-- | armv7-versatile/run-baserock-image.sh | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/armv7-versatile/run-baserock-image.sh b/armv7-versatile/run-baserock-image.sh index 00d4921..8318777 100644 --- a/armv7-versatile/run-baserock-image.sh +++ b/armv7-versatile/run-baserock-image.sh @@ -1,5 +1,29 @@ #!/bin/bash +set -e + +DIR="$1" + +if [[ -z "$DIR" ]]; then + echo "Usage: $0 <INSTALL DIR>" + 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 @@ -18,7 +42,8 @@ On Ubuntu it is in the uml-utilities package. EOF fi -MACHINE=qemuarmv7 PATH="$PATH:$(pwd)" OE_TMPDIR=/ KERNEL="$1" ROOTFS="$2" \ +MACHINE=qemuarmv7 PATH="$PATH:$(pwd)" OE_TMPDIR=/ KERNEL="$KERNEL_IMAGE" \ + ROOTFS="$DECOMPRESSED_IMAGE" \ sh ./runqemu serial \ bootparams="rootflags=subvol=factory-run root=/dev/mmcblk0p1" \ btrfs qemuparams="-m 1024 -M vexpress-a9" |