MIT 6.828 实验环境配置

MIT 6.828实验环境配置

环境:ubuntu 20.04

新的改变

1,首先安装最基本的工具包`

sudo apt-get install -y build-essential libtool libglib2.0-dev libpixman-1-dev zlib1g-dev git libfdt-dev gcc-multilib gdb

2、在主目录下创建一个6828的文件夹然后下载所需代码

git clone https://github.com/mit-pdos/6.828-qemu.git qemu

进入qemu文件夹,打开终端

./configure --disable-kvm --disable-sdl --target-list="i386-softmmu x86_64-softmmu"
make  && make install

报错

  CC    qga/commands-posix.o
qga/commands-posix.c: In function ‘dev_major_minor’:
qga/commands-posix.c:633:13: error: In the GNU C Library, "major" is defined
 by <sys/sysmacros.h>. For historical compatibility, it is
 currently defined by <sys/types.h> as well, but we plan to
 remove this soon. To use "major", include <sys/sysmacros.h>
 directly. If you did not intend to use a system-defined macro
 "major", you should undefine it after including <sys/types.h>. [-Werror]
         *devmajor = major(st.st_rdev);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                                                                                                                                                                                                                                                                              
qga/commands-posix.c:634:13: error: In the GNU C Library, "minor" is defined
 by <sys/sysmacros.h>. For historical compatibility, it is
 currently defined by <sys/types.h> as well, but we plan to
 remove this soon. To use "minor", include <sys/sysmacros.h>
 directly. If you did not intend to use a system-defined macro
 "minor", you should undefine it after including <sys/types.h>. [-Werror]
         *devminor = minor(st.st_rdev);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                                                                                                                                                                                                                                                                              
cc1: all warnings being treated as errors

解决方法
找到qga/commands-posix.c 文件,在文件中加 #include <sys/sysmacros.h>
继续报错

nstall: cannot create directory ‘/share’: Permission denied Makefile:382: recipe for target 'install-datadir' failed

解决方法:进入root权限安装
再执行,make和make install安装就成功了
再进入6828文件夹下克隆lab文件

git clone https://pdos.csail.mit.edu/6.828/2018/jos.git lab

进入lab文件夹,打开终端
执行make
make后会提示有出现一个kernel的img镜像文件,有这个,你就可以在lab文件夹下打开终端输入

make qemu

如果出现了新的控制台,即成功。

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值