Giter Site home page Giter Site logo

drdeano / deanos Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 1.0 1.59 MB

Creating an operating system from scratch

License: MIT License

Makefile 1.38% Assembly 15.53% C 82.55% C++ 0.55%
c assembly x86 bootloader os operating-system kernel libc qemu gdb deanos i386 doxygen 32bit 32-bit

deanos's Introduction

DeanOS

Creating an operating system from scratch. This operating system is build for i386+ 32bit Intel x86. Any other platforms may not work and haven't been tested on.

How to run

Just type make run which will create all the files needed and run in the qemu emulator. The makefile is a shambles, so any suggestions on better makefiles are appreciated.

Prerequisite

  • nasm - For assembling the bootloader
  • gcc - For compiling the Kernel and included C Library
  • ld - For linking all the kernel files together
  • objcopy - For creating the kernel binary from the elf file
  • ar - For creating the C Library library
  • make - To run the makefile
  • qemu - To run the OS
  • Windows Linux subsystem:
  • cmd - For using Windows commands in the Linux subsystem terminal
  • partcopy - Windows cmd for creating the boot sector
  • imdisk - Windows cmd for creating and mounting the floppy image
  • copy - Windows cms for copying files onto the floppy image

I'm sorry that this will hurt people to see as using Windows and Linux together, so if anyone has suggestions and/or better makefile that works that I can use, please let me know. Makefiles are new to me so any changes made, can you comment them so I can understand what is going on. Especially a makefile that just uses Linux commands would be best. I have tried using dd for creating the boot sector but couldn't get it working correctly, so any way of getting ride of some Windows commands will be good. You can email me at [email protected] if you have any changes.

Testing

You can run make debug which will create all the files needed and run in the qemu emulator. You can then attach a GDB debugger by adding the lines into .gdbinit or type the commands directly:

set architecture i386
target remote localhost:1234
br *0x7c00
c

This will set the architecture to 16 bit x86 as this is what the bootloader is coded in to start with. Then connects to the emulator on port 1234 (default for qemu). Then sets a break point at the beginning of the bootloader. The starts the OS and stops at the beginning of the bootloader.

If want to break at the beginning of the kernel, the address it is loaded at is 0x100000. So replace br *0x7c00 with br *0x100000.

WARNING

You run my operating system at you own risk on real hardware. There is no guarantee that hardware won't be damaged by running the OS. So run in a virtual machine or emulator for safety.

deanos's People

Contributors

drdeano avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

dalalsunil1986

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.