You are browsing as a guest. Sign up (or log in) to start making projects!

PythOS

  • 6 Devlogs
  • 42 Total hours

A Linux distro written almost completely in Python!!

Open comments for this post

9h 42m 4s logged

Alright. So in the past 8 hours, I’ve been working on the KMSDRM rendering for PythOS’ desktop. Since all apps will be called via standard execve, functions inside cannot be called directly from the main server. That’s where IPC comes in. Like GNOME, it pygui acts as a server that handles the custom made apps that contains the GUI APIs, and performs a communication back and forth to render the apps. The process is NOT easy, and got my brain frying.

0
0
4
Open comments for this post

7h 20m 43s logged

In this 6 hours’ work, I’ve added a handle to the windows for the user to drag them.
Various APIs were also added, such as buttons, text and images.

There is one more useful feature: window focusing. When multiple windows are added, you can focus on them by clicking on them just like normal OSes.

0
0
9
Open comments for this post

11h 20m 58s logged

In this 11 hours (shows 10 hours because of the limit of devlogs), I’ve worked on framebuffering with PyGame, it was kinda painful trying to learn writing GUI in a completely different language, but it’s kinda worth it and enjoyable :)

Also the theme of the GUI is based on Windows 98

0
0
8
Ship #1

This is a Linux distro written almost completely in Python!! What's special about it, is that the whole Linux distro is compiled and assembled by me!!

Compared to previous versions in the previous repo, those all relied on other Linux distro shells. But this time, the shell and other programs in /bin is written in Python.

How it works:
1. Boots grub bootloader
2. Boots Linux kernel
3. Loads init script
4. Loads init.py from sbin/
5. Tries to load pysh.py from bin/
-> If fails or user exits pyshell, it falls back to init.py as a logon menu (written with ncurses)
- This is a protection mechanism that prevents kernel panic (which needs us to force reboot the PC)

I'm really proud that my OS worked, and has always been my dream creating an up and running OS!!

  • 3 devlogs
  • 14h
  • 19.35x multiplier
  • 270 Stardust
Try project → See source code →
Open comments for this post

7h 1m 6s logged

After rewriting code for 7 hours and building the ISO file for more than 5 hours, I have finally built a bootable PythOS ISO file!!!

What I have rewritten, was pysh.py to optimize the shell.
I’ve also fixed a TypeError of PosixPath + str in ls.py.

How the OS works:

  1. Boots grub bootloader
  2. Boots Linux kernel
  3. Loads init script
  4. Loads init.py from sbin/
  5. Tries to load pysh.py from bin/
    -> If fails or user exits pyshell, it falls back to init.py as a logon menu (written with ncurses)
  • This is a protection mechanism that prevents kernel panic (which needs us to force reboot the PC)

How to dualboot:
(for Windows users. Skip if you know how to dualboot Linux, but please do not ignore step 6 when flashing):

Prerequisites:
Rufus (download from here)
PythOS ISO (download from the releases page)
A USB (at least 200MB)

Steps:

  1. Plug in your USB and run Rufus you have just downloaded
  2. Select your USB device in the “Device” dropdown menu
  3. In the “Boot selection” dropdown, select “Disk or ISO image (Please select)”
  4. Select PythOS ISO file
  5. Click START
  6. Select DD mode as the flash mode instead of ISO mode (ISO mode will NOT work) and click OK
  7. Wait for it to flash
  8. Reboot your computer after flashing and enter UEFI boot menu
  9. Select the USB flash drive
  10. Select PythOS Phoenix
  11. ENJOY!

NOTE:
If your computer uses legacy BIOS instead of UEFI, I’m sorry… I’ll be adding BIOS support very soon tho :)
Other architecture builds of the OS will be released very soon. The current supported arch is x86_64 (64-bit)

P.S. You might be wondering if you’ll need to type in “.py” for running my scripts in bin, you don’t. Simply type in the command without .py, it’ll be good to go. Of course you CAN type in .py if you want, but it would basically be your choice mate

0
0
7
Open comments for this post

4h 31m 15s logged

In this ~4.5 hours, I’ve added many commands to PythOS:
clear, date, ls, mkdir, touch, uname

And the most amazing thing I’ve done, is adding arguments and options :).
I do think that this project can let me learn a LOT more about Python, Linux and low-level things

0
0
25
Open comments for this post

2h 25m 51s logged

I’ve relaunched the project PythOS, a Linux distro but almost fully written in Python.

Instead of relying on init systems like BusyBox, it uses bare-minimum components:
a Linux kernel, musl library, Python library, and my own Python runtime (init systems are written by me in C)

I’ve actually worked on a project like this, also a Linux distro written in C, but back then, the distro relied on Alpine Linux as a base system.

This time I’m actually trying to create the Linux distro myself :)

The image I’ve uploaded is a preview of the shell. It’s still run on my Linux VM as it’s not built into a system yet.

0
0
26

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…