MIT6.S081-实验环境搭建

MIT6.S081-实验环境搭建

结合Tools和Lab Utilities

  1. Download VMware Player (free for Linux and Windows, registration required)

  2. Download a boot disk image for Ubuntu Desktop

  3. This will download a file named something like ubuntu-18.04.3-desktop-amd64.iso. Start up your virtualization platform and create a new (64-bit) virtual machine.Use the downloaded Ubuntu image as a boot disk; the procedure differs among VMs but is pretty simple.

  4. Make sure you are running either “bullseye” or “sid” for your debian version (on ubuntu this can be checked by running cat /etc/debian_version), then run:

    sudo apt-get install git build-essential gdb-multiarch qemu-system-misc gcc-riscv64-linux-gnu binutils-riscv64-linux-gnu
    
  5. 克隆源码

    $ git clone git://g.csail.mit.edu/xv6-labs-2020
    
  6. At this moment in time, it seems that the package qemu-system-misc has received an update that breaks its compatibility with our kernel. If you run make qemu and the script appears to hang after
    qemu-system-riscv64 -machine virt -bios none -kernel kernel/kernel -m 128M -smp 3 -nographic -drive file=fs.img,if=none,format=raw,id=x0 -device virtio-blk-device,drive=x0,bus=virtio-mmio-bus.0
    you’ll need to uninstall that package and install an older version:

    $ sudo apt-get remove qemu-system-misc
    $ sudo apt-get install qemu-system-misc=1:4.2-3ubuntu6
    
  7. 验证测试

    $ riscv64-unknown-elf-gcc --version
    

    riscv64-unknown-elf-gcc (GCC) 10.1.0

    运行结果

    $ qemu-system-riscv64 --version
    

    QEMU emulator version 5.1.0
    [外链图片转存中...(img-.csdnimg.cn/54544a3ff0894d71962a148de94ae510.png)

    # in the xv6 directory

    $ make qemu
    

    # … lots of output …
    init: starting sh
    $
    运行结果

  8. To quit qemu type: Ctrl-a x(按Ctrl-a松开后,再按x)
    在这里插入图片描述

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值