版本比较

标识

  • 该行被添加。
  • 该行被删除。
  • 格式已经改变。

...

下载对应版本

代码块
wget https://github.com/yrzr/opnsense-tools/releases/download/24.1.5/OPNsense-24.1.5-vm-aarch64.vmdk.xz
xz -d OPNsense-*-aarch64*.*.xz
qemu-img convert -f vmdk -O raw OPNsense-*-vm-aarch64.vmdk OPNsense-out.raw
wget https://retrage.github.io/edk2-nightly/bin/RELEASEAARCH64_QEMU_EFI.fd
mv RELEASEAARCH64_QEMU_EFI.fd edk2-aarch64-code.fd
cp edk2-aarch64-code.fd /usr/share/qemu/

...

代码块
apt install brctl-utils
ip a
brctl delbr br0
brctl addbr br0
ip address add 192.168.192.78/24 dev br0
ip link set dev br0 up
brctl addif br0 eth0
ip address del 192.168.192.78/24 dev eth0
ip route add defaul via 192.168.192.1

qemu-system-aarch64   -bios /usr/share/qemu/edk2-aarch64-code.fd   \
-M virt,gic-version=max  \
-cpu cortex-a57   -smp 4   -m 2048M   -nographic   \
-drive format=raw,file=OPNsense-out.raw,cache=none,if=virtio   \
-netdev bridge,id=nic0,br=br0 -device virtio-net,netdev=br0nic0,mac=da:65:2e:22:da:8c \
 -netdev bridge,id=nic1,br-lan=br0 \
-device virtio-net,netdev=br-lannic1,mac=da:65:2e:22:da:8d

启动主机后关闭虚拟机

...

代码块
languagebash
cd /usr/local/etc
mkdir qemu
echo 'allow br0' > /usr/local/etc/qemu/bridge.conf
echo 'allow all' >> /usr/local/etc/qemu/bridge.conf

参考

修复 Databend aarch64 架构的支持  https://xuanwo.io/2021/10-rust-cross-aarch64/