Giter Site home page Giter Site logo

powernex / powernex Goto Github PK

View Code? Open in Web Editor NEW
489.0 46.0 42.0 1.22 MB

An operating system written in D

Home Page: https://powernexos.org/

License: Mozilla Public License 2.0

Assembly 5.15% D 94.67% Shell 0.17%
kernel osdev dlang gas assembly operating-system powernex

powernex's Introduction

Please note that the current code is undergoing a major overhaul!

PowerNex Logo

PowerNex is a OS written in the D Programming Language. The goal is to have a whole OS written in D, where the PowerNex kernel powers the core.

The name PowerNex comes from the words power and next. A kernel to power the next generation of hardware.

System requirements

  • A 64bit processor
  • At least 512 MiB of ram (less will probably work)

Build Instructions

It requires a crosscompiler, which can be aquired by running ./toolchainManager.d. PowerNex is using a custom build system. For its code look inside build.d, src/buildlib.d, and src/*/project.d.

To use the following shortcuts run source env.sh in your shell.

  • c - Removes the build files
  • v - Compiles PowerNex
  • b - Compiles and runs PowerNex in qemu
  • bd - Compiles and runs PowerNex in qemu, with debug logs to qemu_debug.log
  • a - Runs addr2line on the kernel
  • al - Runs addr2line on the loader
  • log - Runs tail on the COM1.log, and demangles and inserts colors for the entries.

How to contribute

Thanks to

  • Adam D. Ruppe - For his minimal.zip, which contains a bare bone minimal d runtime.
  • Bloodmanovski - For his D Kernel Trinix, His files for booting x64 really helped me a lot in the beginning.
  • Lukas "zrho" Heidemann - For his Hydrogen project. It really inspired and help me to make PowerD, the intermediate bootloader.

Community

License

Mozilla Public License, version 2.0

powernex's People

Contributors

aravk avatar bytorbrynden avatar m4gnv5 avatar modohash avatar vild avatar wilzbach 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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  avatar  avatar  avatar  avatar  avatar

powernex's Issues

Add comments

Add comments to all the code.
This includes comments ion the code where needed and comments for what classes and functions do.

Also add copyright notices, license texts, authors etc. as a header on each source file.

Maybe use https://github.com/MartinNowak/scod for the documentation.

SATA

Add SATA support

Booting idea

What about using a small 32bit->64bit loader that loads the kernel from the initrd.
This could fix a lot of problems with the current elf being a ELF64.
This could hopefully clean up a lot of stupid code.
This would make it possible to use the .debug* sections from the elf file for printing out stacktraces.
This could also add support for module initializers.

A 10 out of 10 idea!

building fails with newest wild

I just gave it a try and running ./build failed - I built wild directly from git.

Building project...
Start with lexing!
Wild.Frontend.Wild.Lexer.Exception.InvalidTokenException@source/Wild/Frontend/Wild/Lexer/Exception.d(9): Invalid token! Problem at 2:12.
Line data:  "variables": {
----------------------^

----------------
source/Wild/Frontend/Wild/Lexer/Lexer.d:92 void Wild.Frontend.Wild.Lexer.Lexer.Lexer.parseToken() [0x581de2]
source/Wild/Frontend/Wild/Lexer/Lexer.d:79 void Wild.Frontend.Wild.Lexer.Lexer.Lexer.process() [0x581c8e]
source/Wild/Frontend/Wild/Lexer/Lexer.d:11 Wild.Frontend.Wild.Lexer.Lexer.Lexer Wild.Frontend.Wild.Lexer.Lexer.Lexer.__ctor(immutable(char)[]) [0x5818d8]
source/Wild/Frontend/Wild/WildFrontend.d:18 Wild.Frontend.Wild.WildFrontend.WildFrontend Wild.Frontend.Wild.WildFrontend.WildFrontend.__ctor(immutable(char)[]) [0x5c3077]
source/app.d:87 int app.buildState(immutable(char)[][]) [0x5e6212]
source/app.d:73 _Dmain [0x5e60cf]
??:? _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x5eef0e]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x5eee58]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll() [0x5eeeca]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x5eee58]
??:? _d_run_main [0x5eedc9]
??:? main [0x5e834f]
??:? __libc_start_main [0x6461d740]
Current token: 16 out of 2092แ—›    

Add a image- & fontloader

Unnecessary but I want a image(PNG?) loader at runtime instead of my hacky bmp-to-c converter, The same for the font

ARM support

Hi! I hope it's right place to share ideas. :)
Any chances for ARM (v7?) support in near future? It would be great.

APIC

Add APIC support

Port phobos

If PowerNex supports phobos, tons of D applications can easily be ported to PowerNex and it will be easier to make applications

TLS

Add TLS support, Will make D life much much easier.

Requires %FS (and more?)

Shared memory

To make IPC faster shared memory needs to be supported.

ACPI (shutdown)

Given that the current shutdown is some magic-value based, you should implement an actual, ACPI based shutdown method.

IPC

A IPC similar to how dbus works would be cool

A sane build system, maybe?

Implementing a Makefile can't be that hard, the current buildscripts are just... ugh. If you don't know how to get a Makefile up and running, ask the #osdev IRC. Mine was largely figured out by @ExeTwezz, for an example.

Nightly builds

STATUS: Can't implement try this implementation yet, because of server problems.

Convert files to PascalCase

The file system will be PascalCase, the code is currenty a PascalCase.
But currently the code files and their folders are all lowercase.

This should be changed.

Logo/Mascot

The kernel/OS needs a mascot and logo. (They can be the same)
All suggestions are appreciated :)

Move to LDC

Looks like LDC is much better with it's codegen and cleanup.
More test needs to be done before this will happen.
#29 is probably also required.

Try and port druntime

The current object.d is a hacky mess.
Porting druntime and using versions to add my custom code would hopefully increase code quality.

Optimize paging.c

See the Wiki for what do to. For an example, you don't need to re-enable paging every time you switch a directory...

Heap

Heap could be good to have!

Use `version(FreeStanding)` insteadof version(bare_metal)

Which was added with PR 4367. I hope in the future there will be more D libraries suitable for kernel/embedded programming such as yours. Using a common version identifier, such as FreeStanding can help with interoperability between libraries.
I know that large portions of low-level code is not reusable, but there is often code like range algorithms, that has little to now run-time requirement and as such is suitable for this domain.

Code style

  • Make a coding style document
  • Apply the coding style to the code

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.