1.qemu安装
https://www.qemu.org/download/ 下载最新的稳定版本 qemu-6.2.0-rc2.tar.xz
//注:翻墙下载,用在板子上直接下载太慢了 wget https://download.qemu.org/qemu-6.2.0-rc2.tar.xz
scp qemu-6.2.0-rc2.tar.xz yhbd@192.168.10.237:/home/yhbd/bsp
$ cd ~/bsp
$ tar -xvf qemu-6.2.0-rc2.tar.xz
$ cd qemu-6.2.0-rc2
$ ./configure /* 配置,报错解决如下
报错:ERROR: Cannot find Ninja
解决:sudo apt-get install ninja-build
重运行./configure 还是会报很多错。
ERROR: Dependency “pixman-1” not found, tried pkgconfig
都是因为缺少软件,建议安装下面的
$ sudo apt-get install build-essential zlib1g-dev pkg-config libglib2.0-dev
$ sudo apt-get install binutils-dev libboost-all-dev autoconf libtool libssl-dev
$ sudo apt-get install libpixman-1-dev libpython-dev python-pip python-capstone virtualenv
看到下面的信息表示成功了
Subprojects
libvhost-user : YES
Found ninja-1.8.2 at /usr/bin/ninja
*/
$ make -j4 //4核并发编译,利用多核CPU并发能力
//最好用串口运行,因编译时间太长,而vscode ssh登录运行,容易超时退出。
//而且用串口运行,vscode 可以做别的事,相互不干扰
$ sudo make install
//查看版本,源码编译的,qemu它支持不同的硬件平台的虚拟,不仅是ARM
$ qemu-arm --version
qemu-arm version 6.2.92
Copyright © 2003-2021 Fabrice Bellard and the QEMU Project developers
$ qemu-riscv64 --version
qemu-riscv64 version 6.2.92
Copyright © 2003-2021 Fabrice Bellard and the QEMU Project developers
$ qemu-system-aarch64 -cpu help //查看machine支持的cpu类型,发现支持A57
cortex-a53
cortex-a57
cortex-a72
2.busybox安装编译
官网下载 ht