Embedding Python at the OS level - build problems [success]

Phil Frost indigo at bitglue.com
Wed May 26 14:13:07 EDT 2004


Success! They said it can't be done. "Python is too big", they said.
"Too high level for an OS". And yet, it's done :) Here's a list of what
I remember hacking:

- manually set cross_compile=yes in the configure script, otherwise it
  expects that a program compiled with $CC will run, which it won't, for
  I'm cross compiling.

- remove posixmodule from MODOBJS in Makefile. It wouldn't build, but
  probably would have with just a little tweaking. As of now the OS
  hasn't any filesystem (that's to be implemented in Python), so
  building modules doesn't make much sense anyway.

- Build Parser/pgen using the host toolchain and copy it to the target
  build directory when the build system complains that it can't link it.

That's it, I reckon. I now have a minimal OS that runs Python. If I add
a filesystem, it will be something like preemptive, 32-bit PythonDOS.
w00t.

I'd like to thank those who have helped me, and those who have
contributed to Python. This is some way cool stuff :)

--
Phil Frost

On Tue, May 25, 2004 at 08:34:14PM -0400, Phil Frost wrote:
> Greetings all. I'm attempting to embed a python interpreter at a very
> low level in an OS I am writing. Currently I'm stuck with build issues.
>
> [big chop]




More information about the Python-list mailing list