Files
bintec-w2044ax-firmware-qemu/boot-interactive.sh
T

19 lines
873 B
Bash
Executable File

#!/bin/bash
# Interaktive OSDx-VM: Serial-Console direkt im Terminal (Strg+A x beendet QEMU).
# Webinterface nach dem Boot erreichbar unter:
# http://localhost:8080 / https://localhost:8443 (self-signed)
# Aufruf: docker run --rm -it -p 8080:8080 -p 8443:8443 -p 2222:2222 \
# -v "$PWD:/build" bintec-fw /build/boot-interactive.sh
set -uo pipefail
WORK="${WORK:-/build/work}"
KVER=$(ls "$WORK/deb-kernel/lib/modules" 2>/dev/null | head -1)
exec qemu-system-aarch64 \
-M virt -cpu cortex-a53 -m 1024 -smp 1 \
-kernel "$WORK/deb-kernel/boot/vmlinuz-$KVER" \
-initrd "$WORK/initramfs.img" \
-drive if=virtio,format=raw,file="$WORK/rootfs.ext4" \
-netdev user,id=n0,hostfwd=tcp::2222-:22,hostfwd=tcp::8080-:80,hostfwd=tcp::8443-:443 -device virtio-net-pci,netdev=n0 \
-no-reboot -nographic \
-append "root=/dev/vda rw console=ttyAMA0,115200"