MIT 6.828 操作系统工程 2018 fall xv6 工具链搭建与测试

mit 6.828 lab 代码和笔记,以及中文注释源代码已放置在github中:
https://github.com/yunwei37/xv6-labs

tools

环境:在vmware中新安装的ubuntu 版本 20.04:

  • uname -a

    Linux ubuntu 5.4.0-39-generic #43-Ubuntu SMP Fri Jun 19 10:28:31 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

参考:https://pdos.csail.mit.edu/6.828/2018/tools.html

  1. 安装开发环境:

    ubuntu 版本 20.04 是没有携带相关开发环境的,因此需要进行安装

    sudo apt-get install -y build-essential gdb
    sudo apt-get install gcc-multilib
    
    
  2. 下载qemu,编译:

    git clone https://github.com/mit-pdos/6.828-qemu.git qemu
    ./configure --disable-kvm --disable-werror --target-list="i386-softmmu x86_64-softmmu"
    make
    
    

    报错:

    /usr/bin/ld: qga/commands-posix.o: in function `dev_major_minor':
    /home/yunwei/qemu/qga/commands-posix.c:633: undefined reference to `major'
    /usr/bin/ld: /home/yunwei/qemu/qga/commands-posix.c:634: undefined reference to `minor'
    collect2: error: ld returned 1 exit status
    

    解决方案:在qga/commands-posix.c文件中加上头文件: #include<sys/sysmacros.h>

    make && make install
    
    
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章