Giter Club home page Giter Club logo

oos's Introduction

oos

Downloading and Compiling oos

You will need to have installed gcc, make, nasm, genisoimage (cdrkit), and rock (the ooc compiler). I recommend you get the very latest version of rock from the git repo, because ooc is still in development and oos usually relies on some pretty recent bugfixes. If you want to run oos in an emulator, bochs is a good choice, and there is a makefile target for it.

Also, if you don't have /boot/grub/stage2_eltorito, you should wget http://osdev.googlecode.com/svn-history/r12/trunk/geekos/build/x86/boot/stage2_eltorito and move it to isofs/boot/grub/stage2_eltorito.

If you have stage2_eltorito, but it's just in a different location, run make STAGE2=/path/to/stage2_eltorito.

After you have all that, it is as simple as:

$ git clone git://github.com/tsion/oos.git
$ cd oos
$ make bochs

You can leave off 'bochs' if you only want to build the ISO.

Running oos

As seen above, I've provided a makefile target for running oos in the Bochs emulator. You should be able to use oos with qemu or any emulator of your choice by telling your emulator to boot the oos.iso CD image.

$ qemu -cdrom oos.iso

Running oos on real hardware is untested and not recommended (I am not responsible for any fires, explosions, or alien abductions that may result), but in theory it should work. I'll keep my fingers crossed.

UPDATE: sdkmvx has tested oos on real hardware, and it worked for him!

Debugging oos

I have also created a make target to run bochs listening for a remote gdb connection on port 1234. You need to compile bochs with --enable-gdb-stub to use this script!

$ make bochs-dbg

When you run that, bochs will say "Waiting for gdb connection on port 1234." You can now connect with gdb from another terminal. Use --symbols=oos.exe so that gdb is aware of our function and variable names.

$ gdb --symbols=oos.exe
GNU gdb (GDB) 7.0
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Reading symbols from /home/scott/code/os/oos/Src/Kernel/oos.exe...done.
(gdb) target remote :1234
Remote debugging using :1234
warning: Remote failure reply: Eff
0x0000fff0 in ?? ()
(gdb) break kmain
Breakpoint 1 at 0x100c2c: file ooc_tmp/oos/Src/Kernel/Main.c, line 11.
(gdb) c
Continuing.

Breakpoint 1, kmain (mb=0x354a0, magic=732803074) at ooc_tmp/oos/Src/Kernel/Main.c:11
11	void kmain(MultibootInfo *mb, uint32_t magic) {
(gdb) bt
#0  kmain (mb=0x354a0, magic=732803074) at ooc_tmp/oos/Src/Kernel/Main.c:11
#1  0x00100018 in _start () at Src/Kernel/Boot.asm:25

This can be extremely useful for finding those annoying little problems! The same can also be done with any GUI front-end to gdb, just consult its documentation on how to do a remote gdb connection. And by the way, since I compile with ooc -g, gdb can walk through ooc code line by line, and display the ooc source of the line it's on. Hooray!

Note: gdb can do a lot, check out help.

Note again: nemiver is a decent GTK+ GUI front-end for gdb. Or if you like to like to live on the 'K' side of life, there is kdbg.

Thanks

  • nddrylliog and everyone else involved in creating the ooc language!
  • OSDev, for all the great tutorials and informative articles
  • The creators of dux OS. I read and stole a lot of code from them. :)

oos's People

Contributors

danopia avatar solson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

oos's Issues

OOS Fails to build

I've tried to build the latest version of oos from github but it fails to build with compile errors
The following is the output I get from running
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
nasm -felf32 -o src/shiny/hal/i386/gdt.o src/shiny/hal/i386/gdt.asm
nasm: fatal: unrecognised output format elf32' - use -hf for a list typenasm -h' for help
scons: *** [src/shiny/hal/i386/gdt.o] Error 1
scons: building terminated because of errors.

I'm running OS X Snow Leopard and I'm using the latest version of ooc from github as well.

Any ideas?

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.