下载xv6后,在make qemu时出错,:Couldn’t find a working QEMU executable,找不到QEMU,解决方法如下:
- 进入xv6文件夹,通过vi Makefile进入编辑Makefile文件,找到第54行的
#QEMU = qemu-system-i386
,如下图,将注释去掉;
- 再次make qemu,如果还是报错说
make: qemu-system-i386: Command not found
,就安装qemu-system
,具体命令为:
sudo apt-get install qemu-system
- 成功打开qemu,但是会卡在启动界面(Booting from Hard Disk…),如图:
找了很多资料,终于找到了解决方法,进入xv6文件夹,输入vi kernel.ld
进入编辑模式,找到第29、30行和37、38行,内容是:BYTE(0) /* Force the linker to allocate space for this section */
,删除掉这四行