ubuntu16安装qemu
准备工作。由于qemu依赖了部分其他软件,所以需要提前安装好,不然中途会有很多错误。
如https://stackoverflow.com/questions/37887693/qemu-not-installing-in-ubuntu
git clone https://github.com/mit-pdos/6.828-qemu.git qemu
sudo apt-get install git libglib2.0-dev libfdt-dev libpixman-1-dev zlib1g-dev
sudo apt-get install libnfs-dev libiscsi-dev
Linux: ./configure --disable-kvm --disable-werror [–prefix=PFX] [–target-list=“i386-softmmu x86_64-softmmu”]
OS X: ./configure --disable-kvm --disable-werror --disable-sdl [–prefix=PFX] [–target-list=“i386-softmmu x86_64-softmmu”] The prefix argument specifies where to install QEMU; without it QEMU will install to /usr/local by default. The target-list argument simply slims down the architectures QEMU will build support for.
cd qemu
./configure --disable-kvm --disable-werror --target-list="i386-softmmu x86_64-softmmu"
由于默认的安装目录“/usr/local",为了使得安装有权限创建目录,将用户切换到root用户去。
su root
make && make install
Compiler Toolchain
准备工作,我这里默认安装到/usr/local
所以执行如下语句,并将如下语句写入~/.bashrc文件中。不然在安装gcc的时候会出问题。
export PATH=/usr/local/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
https://wiki.qemu.org/Hosts/Linux
https://pdos.csail.mit.edu/6.828/2018/tools.html#chain