Giter Site home page Giter Site logo

fabiensiron / pyr0 Goto Github PK

View Code? Open in Web Editor NEW
9.0 5.0 2.0 678 KB

Attempt to make a python based Operating System, it means that we use language feature to provide security instead of using hardware as in a classical operating system.

License: Other

Makefile 0.26% C 26.51% Assembly 0.26% C++ 70.30% Python 2.53% Shell 0.02% Perl 0.12%

pyr0's Introduction

Python in ring 0 project (Pyr0)

Build Status Join the chat at https://gitter.im/Saruta/pyr0

Description

Pyr0 is an attempt to make a python based Operating System, it means that we use language feature to provide security instead of using hardware as in a classical operating system.

The project is composed of two different parts: the core (which is a classical kernel that manages memory, interrupts...) and the runtime (which manages tasks, user programs...).

Another great idea of this project, is to have a plain-text userland. Indeed, there is no binary in the root tree (except kernel :P), only python scripts.

Deps

  • qemu (for emulation)
  • libisoburn (for video)
  • perl (for some scripts required by compilation)
  • gcc/make (for compiling)

Build/Install

  • ./configure
  • make

Usage

For interpreter mode:

  • make boot-i

For file mode:

  • make boot

or if you want a specific python's script:

  • make boot PYR0_ROM=path_to_python_script.py

Example: make boot PYR0_ROM=root/python/prime.py

Modules available:

Pyr0 stdlib

  • math: very light math module (TODO)
  • os: os information
  • sh: shell builtins

Hardware information

  • cpuinfo: cpu information
  • smbios: various bios information
  • pci: pci devices list

Debug

  • mem: memory debug module

Misc

  • morse: morse sound module (only on real hardware)

Real hardware:

To try on real hardware (with usb key or cdrom), just dd the iso:

  • dd bs=4M if=pyr0s.iso of=/dev/your_device

Notes

There are quite a lot of bugs, but of course, if you find a bug, please just open an issue.

alt tag

Community

IRC

To follow the project, discuss with us or contribute, please join us in #pyr0 on Rezosup (irc.rezosup.org).

pyr0's People

Contributors

dasfranck avatar fabiensiron avatar gitter-badger avatar lun-4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pyr0's Issues

Custom bootloader

Write a custom bootloader for the project which must set-up the system before loading the core (video, 32 bits, command line ...).

Move compiler to C

The tinypy compiler is currently composed of 3 python's modules: tokenize.py, parser.py and encode.py.
The compiler is already boostrapped in bc.c under a array of tpc (tinypy bytecode).
If the compiler is moved in C, the speed is improved and the debugging is easier.
Plus, one can correct some grammar mistakes: empty file, one litteral...

VFS

A simple vfs have to be done. Basically, we need a read-only ext2 ramfs, a tmpfs, a devfs and maybe procfs.

Port pyr0 on ARM: Raspberry pi

I really want pyr0 to work on Raspberry (or same kind of stuff). The first step would be to divide the kernel into architecture dependant and non architecture dependant code. After that, let's port the kernel (memory, interrupts at less).

Pyr0 library

Rewrite the pyr0 library (include/ and lib/).
First step is to rewrite the code already written in a more homogeneous way.
Second step, is to add some functionalities (math, string etc...).
A "libc" or "pyro.lib" module can be written to test that.

EDIT: some data structures can be added. For example, list, hashtbl, ringbuff, refcnt ...

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.