Giter Site home page Giter Site logo

operating-systems-paging's Introduction

# QEMU Support for Xinu (x86)

- NOTE: QEMU support for Xinu (x86) is experimental. While this QEMU
  version might be helpful if you want to debug Xinu, it may have
  several unknown bugs.  So use this QEMU version for debugging during
  your development, and you should always confirm that your change is
  working as expected on Xinu's lab machines running on Intel
  Galileo. Our scoring also will be based on Intel Galileo boards.

- Tested on Ubuntu 16.04
    - Should be working most of Linux-based machines
    - If possible, please use your own desktop/labtop running Linux.

## Prerequisites

- Run following commands (in Ubuntu 16.04)

```
sudo apt install qemu-system-x86
sudo apt install terminator
sudo apt install gdb
```

## How to build
- Execute `rebuild.sh` in `tools` directory.
    - This runs `QEMU=1 make` in `the compile` directory

```
$ ./rebuild.sh
~/tmp/xinu/compile ~/tmp/xinu/tools
removing .o files
removing configuration files ...
make[1]: Entering directory '/home/blee/tmp/xinu/config'
rm -f config lex.yy.c y.tab.c
make[1]: Leaving directory '/home/blee/tmp/xinu/config'
removing xinu ...
making the config program
make[1]: Entering directory '/home/blee/tmp/xinu/config'
rm -f config lex.yy.c y.tab.c
/usr/bin/flex config.l
/usr/bin/bison -y        config.y

...

/usr/bin/gcc -march=i586 -m32 -fno-builtin -fno-stack-protector -nostdlib -c -Wall -O0 -DBSDURG -DVERSION=\""`cat version`"\" -I../include -DQEMU -g -o binaries/ethdispatch.o ../device/eth/ethdispatch.S

Loading object files to produce GRUB bootable xinu

Building ../compile/xinu.bin

Building ../compile/xinu
```

## Run Xinu with QEMU
- Execute 'run-qemu.sh` in `tools` directory.

```
$ ./run-qemu.sh
[*] Running: qemu-system-i386 -cpu qemu32 -m 256M  --nographic -kernel ../compile/xinu.bin


Xinu for galileo -- version #261  (blee)  Sun Sep 17 17:35:21 EDT 2017

 266993664 bytes of free memory.  Free list:
 [0x0013E000 to 0x0FFDDFFF]

...

xsh $
```

- To run with GDB, use `--gdb` option. This will automatically pop-up
  the gdb window, and QEMU stalls Xinu until it gets the `continue`
  command from GDB.

```
$ ./run-qemu.sh --gdb
```

## References
- QEMU manual: https://qemu.weilnetz.de/doc/qemu-doc.html
- GDB tutorial: https://www.cs.cmu.edu/~gilpin/tutorial/

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.