diff options
| author | bozo.kopic <bozo@kopic.xyz> | 2023-10-14 17:15:36 +0200 |
|---|---|---|
| committer | bozo.kopic <bozo@kopic.xyz> | 2023-10-14 17:15:36 +0200 |
| commit | c2ef7cf345a5b609157ee8ff0b7330ed6c26f272 (patch) | |
| tree | 70401129e6aa2496f72af24cbb9bc1349812b716 /vm/alpine/armv7/run.sh | |
| parent | 872615941ef71eefc86c3e637959a2ede7f33c20 (diff) | |
.
Diffstat (limited to 'vm/alpine/armv7/run.sh')
| -rwxr-xr-x | vm/alpine/armv7/run.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/vm/alpine/armv7/run.sh b/vm/alpine/armv7/run.sh new file mode 100755 index 0000000..8e5f16d --- /dev/null +++ b/vm/alpine/armv7/run.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +set -e + +cd $(dirname -- "$0") + +[ -f alpine.tar.gz ] || \ + curl -L -o alpine.tar.gz https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/armv7/alpine-uboot-3.18.4-armv7.tar.gz + +[ -f vmlinuz-lts ] || \ + tar -x -f alpine.tar.gz --strip-components=2 ./boot/vmlinuz-lts + +[ -f initramfs-lts ] || \ + tar -x -f alpine.tar.gz --strip-components=2 ./boot/initramfs-lts + +[ -f alpine.qcow2 ] || \ + qemu-img create -f qcow2 alpine.qcow2 20G + +exec qemu-system-arm \ + -M virt \ + -m 1G \ + -cpu cortex-a15 \ + -kernel vmlinuz-lts \ + -initrd initramfs-lts \ + -append "console=ttyAMA0" \ + -hda alpine.qcow2 \ + -nographic \ + "$@" |
