xv6 - 如何在 virtualbox 或 vmware 上安装 xv6?

标签 xv6

我正在尝试在 Linux 主机中的 VirtualBox 或 VMWare 上运行 xv6 操作系统。官方说明只说了如何在 qemu 上运行操作系统。不过,官方页面(https://pdos.csail.mit.edu/6.828/2014/xv6.html)提到xv6也可以直接在硬件上启动,但不清楚如何启动。

我想首先在 VirtualBox 或 VMware 上启动 xv6。我从 Makefile 中提取了以下命令,该命令在使用 make 命令编译后从命令行运行 xv6。

/usr/bin/qemu-system-i386 -serial mon:stdio -drive file=fs.img,index=1,media=disk,format=raw -drive file=xv6.img,index=0,media=disk,format=raw -smp 2 -m 512

请帮助我如何继续。如果该过程已记录在案,一些引用资料将会有所帮助。

最佳答案

说明是here which is linked (via 6.828 tools page) from your link虽然它们有点简洁:

Using a Virtual Machine

Otherwise, the easiest way to get a compatible toolchain is to install a modern Linux distribution on your computer. With platform virtualization, Linux can cohabitate with your normal computing environment. Installing a Linux virtual machine is a two step process. First, you download the virtualization platform.

VirtualBox (free for Mac, Linux, Windows) — Download page
VMware Player (free for Linux and Windows, registration required)
VMware Fusion (Downloadable from IS&T for free). 

VirtualBox is a little slower and less flexible, but free!

Once the virtualization platform is installed, download a boot disk image for the Linux distribution of your choice.

Ubuntu Desktop is what we use.

This will download a file named something like ubuntu-10.04.1-desktop-i386.iso. Start up your virtualization platform and create a new (32-bit) virtual machine. Use the downloaded Ubuntu image as a boot disk; the procedure differs among VMs but is pretty simple. Type objdump -i, as above, to verify that your toolchain is now set up. You will do your work inside the VM.

我知道人们如何读到这篇文章却看不到答案。

虚拟机安装完成后,下载Ubuntu Desktop .iso。将其安装到虚拟机中并启动它。 大概桌面将提供一个清晰的机制来加载您的操作系统。 (等等,我正在尝试。将更新结果。)

事实证明,这只是一个 Ubuntu 客户端桌面,对于运行子操作系统来说并没有什么特别的。

再环顾四周,我发现了 commentary成为最好的潜在线索。它包含这个(令人头疼的)短语:

To run xv6, install the QEMU PC simulators. To run in QEMU, run "make qemu".

如果它指定了到达该点的上下文就好了! (抱歉,我无法提供更多帮助。)

关于xv6 - 如何在 virtualbox 或 vmware 上安装 xv6?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54262259/

相关文章:

c - 在 xv6 中创建线程时注册指针

assembly - 为什么在xv6中gdtdesc中有sizeof(gdt)-1

c - 如何理解 xv6 Bootstrap 代码中的以下代码?

c - xv6 的 Makefile

xv6 - 在 xv6 中访问当前正在运行的进程?

谁能解释一下这个使用指针作为 ESP 进行系统调用的 XV6 内联 asm validateint() 测试函数?

c - 在函数内的父级和子级之间传输管道

c - 在 shell 中运行 cat 命令时文件描述符错误

makefile - Makefile 中的@echo 总是导致错误 "*** missing separator. Stop."

c - 如何在 xv6 中为内核级线程实现克隆