qemu源码编译安装使用

 https://download.qemu.org/

###安装依赖

sudo apt-get install build-essential pkg-config zlib1g-dev
sudo apt-get install libglib2.0-0 libglib2.0-dev
sudo apt-get install libsdl1.2-dev
sudo apt-get install libpixman-1-dev libfdt-dev
sudo apt-get install autoconf automake libtool
sudo apt-get install librbd-dev
apt-get install libaio-dev
apt-get install flex bison

###下载源码

wget http://download.qemu-project.org/qemu-6.0.0-rc0.tar.xz

tar xvJf 

###
sudo apt install ninja-build
####

mkdir build && cd build
###

../qemu-6.0.0-rc0/configure --prefix=/usr/local/qemu6.0 --target-list=arm-softmmu --audio-drv-list=

sudo make && sudo make install

###

sudo vi /etc/profile

export PATH=$PATH:/usr/local/qemu6.0/bin
###或者

sudo ln -s /usr/local/qemu6.0/bin/* /usr/local/bin/

####
qemu-img -V

####
qemu-system-arm -M help
###点到为止
###imx6ul
mcimx6ul-evk         Freescale i.MX6UL Evaluation Kit (Cortex A7)
######
readelf -h hello
###KVM
sudo apt-get update
sudo apt-get install qemu qemu-kvm libvirt-bin bridge-utils virt-manager
#####安装libvirt-bin提示如下错误:
E: Package 'libvirt-bin' has no installation candidate

####原因是由于libvirt-bin被拆成了两个包,如下:
libvirt-daemon-system libvirt-clients

qemu-system-arm -M mcimx6ul-evk \
    -m 512M \
    -kernel zImage \
    -dtb /imx6ul-14x14-evk.dtb \
    -nographic -serial mon:stdio \
    -append "console=ttymxc0,115200 rootfstype=ext4 root=/dev/mmcblk1  rw rootwait init=/sbin/init  loglevel=8" \
 	-nic user
#####或者
    -append "console=ttyAMA0"

 

上一篇:openeuler21.03移植 qemu 模拟Hi3518开发板


下一篇:MIT 6.828 qemu 安装问题