#!/bin/bash
#

qemu-system-riscv32 \
        -nographic -machine virt \
        -m 2G \
        -bios fw_jump.elf \
               -kernel Image \
        -drive file=debian_rv32_rootfs.ext2,format=raw,id=hd0  \
        -device virtio-blk-device,drive=hd0 \
        -append "init=/lib/systemd/systemd console=ttyS0 rw root=/dev/vda earlycon=sbi" \
          -device virtio-net-device,netdev=usernet \
          -netdev user,id=usernet,hostfwd=tcp::"$ssh_port"-:22
