FDD-book/examples/part-04/ch18-writing-pci-driver/labs/launch_qemu_guest.sh
Edson Brandi 6e6dac94fe Add book companion files under examples/
Organize companion code and materials by book part:

  part-01/      Foundations
  part-02/      Kernel & driver fundamentals
  part-03/      Character & block devices
  part-04/      Networking & storage
  part-05/      Buses & advanced topics
  part-06/      Debugging & performance
  part-07/      Real-world drivers
  appendices/   Supplementary material
  README.md     Overview and build instructions
2026-04-25 16:51:00 +00:00

20 lines
493 B
Bash
Executable file

#!/bin/sh
#
# Example QEMU command to launch a FreeBSD 14.3 guest with a
# virtio-rng-pci device. Runs on Linux or macOS hosts. Adapt paths
# to your environment.
set -eu
IMAGE="freebsd-14.3-lab.img"
TAP="tap0"
BIOS_DIR="/usr/share/qemu"
qemu-system-x86_64 \
-cpu host -m 2048 -smp 2 \
-drive file="$IMAGE",if=virtio \
-netdev tap,id=net0,ifname="$TAP" \
-device virtio-net,netdev=net0 \
-device virtio-rng-pci \
-bios "${BIOS_DIR}/OVMF_CODE.fd" \
-serial stdio