window下编译qemu

编程入门 行业动态 更新时间:2024-10-19 20:30:08

<a href=https://www.elefans.com/category/jswz/34/1768041.html style=window下编译qemu"/>

window下编译qemu

1. 下载源码

下载源码参考:

2. 准备环境

当host为window时,需要借助MSYS2。
(1)下载并安装MSYS2,下载链接:/
(2)准备编译环境

# download the latest repository updates with
pacman -Syu
# Then update the remaining packages with:
pacman -Su
# install the basic set of developer tools:
pacman -S base-devel mingw-w64-x86_64-toolchain git python ninja
# Then install any required QEMU-specific packages.
pacman -S mingw-w64-x86_64-glib2 mingw-w64-x86_64-pixman python-setuptools

3. 静态编译

cd qemu
mkdir build
cd build
../configure --target-list=aarch64-softmmu  --disable-werror --static --disable-xkbcommon --disable-libudev --disable-sdl --disable-gtk
# 修改配置项,因为win下libiconv是独立的,所以要增加库文件
# 在打开build/config-host.mak 文件,增加两条 -liconv, 见下图。如果重新configure过,这要重新该配置文件
# 修改qga/commands-win32.c 中的代码,注释掉两个宏定义,508行到516行ninja


4. 验证

.\build\qemu-system-aarch64 --version

更多推荐

window下编译qemu

本文发布于:2024-02-25 03:34:24,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1697642.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:window   qemu

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!