在ubuntu配置xv6环境

最近实验要装xv6运行环境,踩坑无数,千万要小心配环境真的最好找最近的博客,千万别找1年以前的,不然会像我一样被坑死。

闲话少说。

实验环境

ubuntu 16.04

VmWare workstation

这是我认为靠谱的两个参考网站

https://blog.csdn.net/yinglang19941010/article/details/49310111

https://pdos.csail.mit.edu/6.828/2018/homework/xv6-boot.html

首先安装xv6源代码

git clone git://github.com/mit-pdos/xv6-public.git
cd xv6-public
make

最后这样就说明xv6源码编译成功。

接下来,安装qemu,安装这个有两种方式,一种是我下面的这种直接做,简单明了。还有一种是通过源码安装,不建议这种方式,复杂还容易出错。就在xv6-public这个文件下

sudo apt-get install qemu

验证qemu安装成功在xv6-public文件夹下:qemu-system-i386如果弹出qemu的窗口说明成功。

 

现在就可以在qemu上运行调试xv6:

$cd xv6-public
$ make qemu-gdb
...

//这时重新在xv6-public再次 开一个终端
$ gdb
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
+ target remote localhost:26000
The target architecture is assumed to be i8086
[f000:fff0]    0xffff0:	ljmp   $0xf000,$0xe05b
0x0000fff0 in ?? ()
+ symbol-file kernel
.......

 

  • 1
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值