Git Product home page Git Product logo

xv6-env's Introduction

xv6-env

Docker image for building/running xv6-riscv

Typical Usage

Make sure that you have a copy of xv6-riscv distribution in the filesystem of your host computer. You can obtain it using the following command (Skip this step if you already have one).

$ git clone https://github.com/mit-pdos/xv6-riscv.git

The image is available on Docker Hub. You can start a new container with the command below. Note that path-to-xv6-riscv refers to the path to your copy of xv6-riscv distribution on the host.

$ cd path-to-xv6-riscv
$ docker run -it --rm -v $(pwd):/home/xv6/xv6-riscv wtakuo/xv6-env

The image supports multiple architectures (currently arm64 and amd64). If you need a container for a specific architecture, use wtakuo/xv6-env-arm64 or wtakuo/xv6-env-amd64 instead.

If things go well, you should see the following output from the newly started container.

To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

xv6@0c765f60374a:~/xv6-riscv$ 

The shell prompt (xv6@0c765f60374a:~/xv6-riscv$) consists of the username (xv6), hostname (0c765f60374a), and current working directory (/home/xv6/xv6-riscv). The hostname is the same as the container ID. So it may differ from the above example.

Now make sure that you can build and start xv6.

xv6@0c765f60374a:~/xv6-riscv$ make
...
xv6@0c765f60374a:~/xv6-riscv$ make qemu
...
xv6 kernel is booting

hart 2 starting
hart 1 starting
init: starting sh
$ 

To exit from xv6, type ctrl-A followed by x.

Opfs

For your convenience, this docker image contains opfs, a simple utility for operating on xv6 file system images.

To build the image by yourself

If you want to build the docker image by yourself, you can use the following commands.

$ git pull https://github.com/wtakuo/xv6-env.git
$ cd xv6-env
$ docker build -t wtakuo/xv6-env .

Note

The container runs bash with user xv6. The password of the user is xv6.

If you would like to install some packages using apt, you should first issue sudo apt update.

xv6-env's People

Contributors

wtakuo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.