Page 1 of 2
Friendly projects - Pycorn, etc.
Posted: Fri May 09, 2014 7:38 pm
by pfalcon
Here's a project which tries to use CPython to do baremetal hardware programming, and write a complete OS in Python:
https://github.com/tornewuff/pycorn . Ideally, I'd like to see MicroPython being suitable for that either, and actually used as such

. So, there may be something to learn from Pycorn (I'd pay particular attention to API - it's better to start with something and accept or dismiss rather than take first approach which came to mind).
Re: Friendly project - Pycorn
Posted: Mon Nov 03, 2014 9:40 pm
by nande
Really interesnting, i always wanted to make an OS in python.
I think uPy implementations is actually better suitable for that task as it can handle interrupts and custom asm.
Re: Friendly project - Pycorn
Posted: Tue Nov 04, 2014 9:59 am
by bmarkus
Unfortunately the latest commit is two years old, the latest discussion in issue tracker is one year. Looks a dead project, or at least suspended

Re: Friendly project - Pycorn
Posted: Tue Nov 04, 2014 10:39 am
by Damien
uPy as an OS on a PC, now that would be cool! I started to write an OS from scratch a long time ago and it could boot giving you keyboard and screen. I can try and dig it up and see if I can get uPy booting in a virtualbox.
Re: Friendly project - Pycorn
Posted: Tue Nov 04, 2014 7:13 pm
by pfalcon
I tries to post "Hello" message to Pycorn some time ago, but it was stuck in moderation queue, so yep, project seems to be pretty dead.
Damien, that's cool, but hope it won't take too much of your cycles

.
Re: Friendly project - Pycorn
Posted: Wed Nov 05, 2014 5:28 am
by nande
I think one of the most interesting contribution of micropython is the language itself. The board is awesome (i really love it), but the language is incredible. IMHO it has a lot of potential, to fill a gap in CPython implementation i've seen for some time.
I would love to try to make an os with it.
Re: Friendly project - Pycorn
Posted: Wed Nov 05, 2014 9:18 am
by Damien
nande wrote:I think one of the most interesting contribution of micropython is the language itself. The board is awesome (i really love it), but the language is incredible.
Thank you for the compliment! I am glad you like the hardware.
I dug up my 9 year-old micro-OS and tried to get it booting. It used to run under bochs, but now, 9 years later, it seems not to work... It has a tiny bootstrap piece of code in the first sector of the drive, which loads a loader, then the loader (which support ext2fs) looks for the kernel on the filesystem, then loads that and jumps to it. I managed to fix the bootstrap code, since it was doing something wrong setting the cache in cr0 (it's for x86). With that fixed the loader runs, but gets stuck trying to access the ATA controller. Seems that the ATA controller has changed since I last ran bochs...
Re: Friendly project - Pycorn
Posted: Sat Nov 08, 2014 12:26 pm
by pfalcon
Last week appears to have been fruitful for "new old" OSes

- there's Fuxiz project popped up too, from a Linux refugee:
https://plus.google.com/+AlanCoxLinux/posts/a2jAP7Pz1gj ,
https://github.com/EtchedPixels/FUZIX
Re: Friendly project - Pycorn
Posted: Mon Nov 10, 2014 12:54 pm
by pythoncoder
The Initially supported processor architecture is the Zilog Z80
Interesting. The first Unix microcomputer I encountered was a costly box called the Onyx which used the Zilog Z8000. This was an early 16 bit chip, competing with the 8086 and the 68000. At the time Z80 machines mostly ran CP/M and the received wisdom of the day was that Unix needed a 16 bit or better processor. I certainly don't remember any 8 bit Unix boxes. It's strange to discover it's possible so long after the technology became obsolete

Re: Friendly project - Pycorn
Posted: Wed Apr 29, 2015 8:11 am
by Damien
Apparently there was a talk at PyCon 2015 about running CPython on bare metal, specifically in the GRUB bootloader:
http://lwn.net/SubscriberLink/641244/5d1d6d20aeb0a647/. (BTW, nice that uPy was mentioned more than once in the associated hackernews discussion:
https://news.ycombinator.com/item?id=9453677.)