Qemu 和 AARCH64

Qemu 和 AARCH64

我正在尝试使用 QEMU 设置 ARM64 机器。我最终从以下位置获取了内核和 img 文件这里这里

我从以下位置访问了上述链接这里

当我尝试将操作系统运行为:-

qemu-aarch64 -m 512 -k linux-system-foundation.axf -hda saucy-arm64-multiarch.img

我似乎收到以下消息:-

usage: qemu-aarch64 [options] program [arguments...]
Linux CPU emulator (compiled for aarch64 emulation)

Options and associated environment variables:

Argument      Env-variable      Description
-h                              print this help
-g port       QEMU_GDB          wait gdb connection to 'port'
-L path       QEMU_LD_PREFIX    set the elf interpreter prefix to 'path'
-s size       QEMU_STACK_SIZE   set the stack size to 'size' bytes
-cpu model    QEMU_CPU          select CPU (-cpu help for list)
-E var=value  QEMU_SET_ENV      sets targets environment variable (see below)
-U var        QEMU_UNSET_ENV    unsets targets environment variable (see below)
-0 argv0      QEMU_ARGV0        forces target process argv[0] to be 'argv0'
-r uname      QEMU_UNAME        set qemu uname release string to 'uname'
-B address    QEMU_GUEST_BASE   set guest_base address to 'address'
-R size       QEMU_RESERVED_VA  reserve 'size' bytes for guest virtual address space
-d item[,...] QEMU_LOG          enable logging of specified items (use '-d help' for a list of items)
-D logfile    QEMU_LOG_FILENAME write logs to 'logfile' (default stderr)
-p pagesize   QEMU_PAGESIZE     set the host page size to 'pagesize'
-singlestep   QEMU_SINGLESTEP   run in singlestep mode
-strace       QEMU_STRACE       log system calls
-version      QEMU_VERSION      display version information and exit

Defaults:
QEMU_LD_PREFIX  = /etc/qemu-binfmt/aarch64
QEMU_STACK_SIZE = 8388608 byte

You can use -E and -U options or the QEMU_SET_ENV and
QEMU_UNSET_ENV environment variables to set and unset
environment variables for the target process.
It is possible to provide several variables by separating them
by commas in getsubopt(3) style. Additionally it is possible to
provide the -E and -U options multiple times.
The following lines are equivalent:
    -E var1=val2 -E var2=val2 -U LD_PRELOAD -U LD_DEBUG
    -E var1=val2,var2=val2 -U LD_PRELOAD,LD_DEBUG
    QEMU_SET_ENV=var1=val2,var2=val2 QEMU_UNSET_ENV=LD_PRELOAD,LD_DEBUG
Note that if you provide several changes to a single variable
the last change will stay in effect.

这是为什么?我还需要添加哪些选项才能启动虚拟机?

  1. 我该如何纠正上述错误?
  2. 或者,您是否在 qemu 上设置了 ARM64 VM?如果是这样,您是否知道有任何资源可以向我显示我需要使用的文件和命令?

答案1

在这种情况下要启动 QEMU,您需要使用系统模拟器 QEMU qemu-system-aarch64,;内核使用该-kernel参数,而不是-k

qemu-system-aarch64 -m 512 -kernel linux-system-foundation.axf -hda saucy-arm64-multiarch.img

您可以通过下载从头开始设置 ARM64 VM适当的 Debian 安装 CD映像并在 QEMU 中启动该映像(使用空磁盘映像)。

相关内容