android-vshell (qemu) 中系统固件的组合大小超过 8388608 字节

combined size of system firmware exceeds 8388608 bytes in android-vshell (qemu)

我已经按照 blog post 创建了一个带有 alpine 3.14 (virt) 的 aarch64 虚拟机(由于 post 用于 linux 而我做了一些小改动在 mac):

qemu-img create -f raw asvm-arm64-hd.img 2G
qemu-system-aarch64 -nographic -machine virt -m 512M -cpu cortex-a57 -smp 4 -drive file=asvm-arm64-hd.img,if=none,id=drive0,cache=writeback,format=raw -device virtio-blk,drive=drive0,bootindex=0 -drive file=~/Downloads/alpine-virt-3.14.2-aarch64.iso,if=none,id=drive1,cache=writeback,format=raw -device virtio-blk,drive=drive1,bootindex=1 -drive file=flash0.img,format=raw,if=pflash -drive file=flash1.img,format=raw,if=pflash -device vmxnet3,netdev=net0 -netdev user,id=net0,hostfwd=tcp::2222-:22
(reboot)
qemu-img convert -f raw -O qcow2 asvm-arm64-hd.img asvm-arm64-hd.qcow2
qemu-system-aarch64 -nographic -machine virt -m 512M -cpu cortex-a57 -smp 4 -drive file=asvm-arm64-hd.qcow2,if=none,id=drive0,cache=writeback,format=qcow2 -device virtio-blk,drive=drive0,bootindex=0 -drive file=flash0.img,format=raw,if=pflash -drive file=flash1.img,format=raw,if=pflash -device vmxnet3,netdev=net0 -netdev user,id=net0,hostfwd=tcp::2222-:22,hostfwd=tcp::50051-:50051 -monitor tcp::5555,telnet,server,nowait

它在我的开发 machine (mac) 上按预期工作。

但是在安装的时候出现android-vshell i'm getting "combined size of system firmware exceeds 8388608 bytes"错误信息。

这是 android 命令(在 运行 时间使用):

processArgs = Arrays.asList(
      "vShell",
      "-L", runtimeDataPath,
      "-m", "512", // 512Mb RAM
      "-accel", "tcg,tb-size=64",
      "-nographic",
      "-parallel", "none",
      "-chardev", "stdio,id=serial0,mux=off,signal=off",
      "-serial", "chardev:serial0",
      "-boot", "c,menu=on",
      "-nodefaults",
      "-cpu", "max",

      // network
      "-nic", "user",

      "-netdev", "user,id=vmnic0,hostfwd=tcp::2222-:22",
      "-device", "virtio-net-pci,netdev=vmnic0,id=virtio-net-pci0",

      // disk

      // shared dirs:
      // ...

      "-monitor", "tcp::" + monitorPort + ",telnet,server,nowait"

      , "-drive", "file=" + runtimeDataPath + "/disk-0.qcow2,if=none,id=drive0,cache=writeback,format=qcow2"
      , "-device", "virtio-blk,drive=drive0,bootindex=0"
      , "-drive", "file=" + runtimeDataPath + "/flash0.img,format=raw,if=pflash"
      , "-drive", "file=" + runtimeDataPath + "/flash1.img,format=raw,if=pflash"
  );

显然asvm-arm64-hd.qcow2重命名为disk-0.qcow2,路径没问题。

flash0.imgflash1.img 确实大于 8Mb(正好是 64Mb)。

是 android-vshell (qemu) 问题还是我的虚拟机有问题?

我可以看到 android-vshell 中应用了一些补丁,是否缺少任何内容(可能有助于解决问题)?

PS。我能够使用 android-vshell 运行“x86-64”vm,所以我想它一般都能正常工作,但在“aarch64”情况下是错误的。

PPS。似乎 qemu 以某种方式认为它不是 aarch64 vm 而可能是 i386(较小的 max_fw_size

android-vshell的作者反应真快(点赞)! android-vshell 的 qemu 确实只是 compiled for x86-64,需要重新编译(根据目标架构)