FAQ
Hi,
We are looking to use Python on an embedded Linux ARM system.
What I gather from googling the subject is that it is not that
straight forward (a fair amount of patching & hacking).
Nobody out there that has done it claims it is easy, which makes me
worried.

I haven't seen a description on porting Python 2.6 or 3.0 yet. Is it
much different than for the earlier versions (the latest I have seem
is Python 2.5).

Does it matter whether Python is cross compiled to Linux 2.4 or Linux
2.6 ?

Can anyone point to a howto they know works well ?

What are the chances of an 'officially' supported ARM-Linux Python
distribution ?
(or is it safer to wait for industrial spec Intel Atom boards to avoid
the cross compilation altogether ?

What would it take for the Linux version of Python to be easily cross
compiled (i.e. would the Linux-Python maintainers be willing to
include and maintain cross-compilation specific functions) ?

Let's say we can get it done.
How is the performance and stability of a working Python on an
embedded ARM-Linux system ?

Does cross compiling Python automatically include the standard Python
library, or is that yet another adventure ?

thanks

Search Discussions

  • Tino Wildenhain at Mar 19, 2009 at 5:56 pm

    jefm wrote:
    Hi,
    We are looking to use Python on an embedded Linux ARM system.
    What I gather from googling the subject is that it is not that
    straight forward (a fair amount of patching & hacking).
    Nobody out there that has done it claims it is easy, which makes me
    worried.
    Yes unfortunately its quite difficult. Been there, stopped at some
    point. But for arm however you have some chances, see below.
    I haven't seen a description on porting Python 2.6 or 3.0 yet. Is it
    much different than for the earlier versions (the latest I have seem
    is Python 2.5).

    Does it matter whether Python is cross compiled to Linux 2.4 or Linux
    2.6 ?

    Can anyone point to a howto they know works well ?

    What are the chances of an 'officially' supported ARM-Linux Python
    distribution ?
    (or is it safer to wait for industrial spec Intel Atom boards to avoid
    the cross compilation altogether ?
    Easier for sure.
    What would it take for the Linux version of Python to be easily cross
    compiled (i.e. would the Linux-Python maintainers be willing to
    include and maintain cross-compilation specific functions) ?
    Either throw the automake stuff away or correct it accordingly
    to support target platforms different from build platform.
    Let's say we can get it done.
    How is the performance and stability of a working Python on an
    embedded ARM-Linux system ?
    Its working quite nice on my Psion 5MX installed via debian
    packages. So I believe you should be able to work from
    debian source packages since they are cross compiles as far
    as I know.
    Does cross compiling Python automatically include the standard Python
    library, or is that yet another adventure ?
    The standard lib is in python mostly so no worries. The only problematic
    part can be various C extensions like zlib, curses, pthreads ... which
    are all optional anyway.

    Regards
    Tino
    -------------- next part --------------
    A non-text attachment was scrubbed...
    Name: smime.p7s
    Type: application/x-pkcs7-signature
    Size: 3241 bytes
    Desc: S/MIME Cryptographic Signature
    URL: <http://mail.python.org/pipermail/python-list/attachments/20090319/6be1a22d/attachment.bin>
  • Nick Craig-Wood at Mar 19, 2009 at 8:30 pm

    jefm wrote:
    We are looking to use Python on an embedded Linux ARM system.
    What I gather from googling the subject is that it is not that
    straight forward (a fair amount of patching & hacking).
    Nobody out there that has done it claims it is easy, which makes me
    worried.

    I haven't seen a description on porting Python 2.6 or 3.0 yet. Is it
    much different than for the earlier versions (the latest I have seem
    is Python 2.5).

    Does it matter whether Python is cross compiled to Linux 2.4 or Linux
    2.6 ?

    Can anyone point to a howto they know works well ?
    I gave up trying to cross compile and just used the python from debian
    ARM which works very well.
    What are the chances of an 'officially' supported ARM-Linux Python
    distribution ?
    Depending on your definition of "officially" and "supported" :-

    http://packages.debian.org/lenny/arm/python2.5/download
    (or is it safer to wait for industrial spec Intel Atom boards to avoid
    the cross compilation altogether ?
    We often compile stuff on our 200 MHz TS-7200 boards. We NFS mount
    the build environment, type make then go out for lunch ;-)

    For builds of our application (which embeds python) we normally use
    the headers and libraries from the debian ARM packages and cross
    compile on something a big beefier.
    How is the performance and stability of a working Python on an
    embedded ARM-Linux system ?
    Works very well.
    Does cross compiling Python automatically include the standard
    Python library, or is that yet another adventure ?
    If you use the debian compiled version then you get the lot.

    --
    Nick Craig-Wood <nick at craig-wood.com> -- http://www.craig-wood.com/nick
  • Paul McGuire at Mar 19, 2009 at 8:52 pm

    On Mar 19, 11:54?am, jefm wrote:
    Hi,
    We are looking to use Python on an embedded Linux ARM system.
    What I gather from googling the subject is that it is not that
    straight forward (a fair amount of patching & hacking).
    Nobody out there that has done it claims it is easy, which makes me
    worried.
    I've been able to use Debian to create a gumstix (I'm pretty sure this
    is ARM-based) build root with Python, and I am a mere Linux dabbler.
    Once built, I had the full standard Python lib, and was able to import
    my custom pure Python code without a hitch.

    -- Paul
  • JanC at Mar 21, 2009 at 3:22 am

    jefm wrote:

    We are looking to use Python on an embedded Linux ARM system.
    What I gather from googling the subject is that it is not that
    straight forward (a fair amount of patching & hacking).
    Nobody out there that has done it claims it is easy, which makes me
    worried. [...]
    What would it take for the Linux version of Python to be easily cross
    compiled (i.e. would the Linux-Python maintainers be willing to
    include and maintain cross-compilation specific functions) ?

    Let's say we can get it done.
    How is the performance and stability of a working Python on an
    embedded ARM-Linux system ?

    Does cross compiling Python automatically include the standard Python
    library, or is that yet another adventure ?
    Python (including (most of) the standard library) is available for several
    linux distributions for ARM:
    - Debian (see packages.debian.org)
    - OpenWRT, e.g. http://downloads.openwrt.org/kamikaze/8.09/ixp4xx/packages/
    - the next Ubuntu release will support some ARM chips
    - several other (embeded) distributions...

    You should check whether your specific hardware is supported though. There
    are several ARM designs from very simple embeded systems with very limited
    CPU & memory resources and lacking a FPU up to chips for netbooks and
    low-end desktop/server systems that have built-in 3D graphics.
    Obviously, python won't work if your system doesn't even have enough space
    to store python... ;-)


    BTW: you can run many of those linux distributions on qemu too, if you want
    to test some things before you have the hardware (it's obviously only an
    emulation though).


    --
    JanC
  • Tomasz Rola at Mar 21, 2009 at 3:26 am

    On Thu, 19 Mar 2009, jefm wrote:

    Hi,
    We are looking to use Python on an embedded Linux ARM system.
    What I gather from googling the subject is that it is not that
    straight forward (a fair amount of patching & hacking).
    Nobody out there that has done it claims it is easy, which makes me
    worried.
    From my ocassional googling, I was quite convinced that ARM (and
    StrongARM) were well supported targets. Besides Debian, already mentioned
    by OPs, you can also try Familiar Linux Distribution, aimed at
    StrongARM-based devices:

    http://www.handhelds.org/geeklog/index.php

    They have a wiki, maybe you can find some pointers there:

    http://www.handhelds.org/moin/moin.cgi/BuildSystem?action=highlight&value=crosscompile

    http://www.handhelds.org/moin/moin.cgi/FamiliarUnderQemu?action=highlight&value=crosscompile
    (or is it safer to wait for industrial spec Intel Atom boards to avoid
    the cross compilation altogether ?
    Depends. If you know for sure when they are going to be here and if they
    will be price-performance-competitive.

    Regards
    Tomasz Rola

    --
    ** A C programmer asked whether computer had Buddha's nature. **
    ** As the answer, master did "rm -rif" on the programmer's home **
    ** directory. And then the C programmer became enlightened... **
    ** **
    ** Tomasz Rola mailto:tomasz_rola at bigfoot.com **
  • David Boddie at Mar 21, 2009 at 3:59 pm

    On Thursday 19 March 2009 17:54, jefm wrote:

    We are looking to use Python on an embedded Linux ARM system.
    What I gather from googling the subject is that it is not that
    straight forward (a fair amount of patching & hacking).
    Nobody out there that has done it claims it is easy, which makes me
    worried.
    I think the hard part is often getting a working cross-compiler. The changes
    to Python are just inconvenient, not difficult.
    I haven't seen a description on porting Python 2.6 or 3.0 yet. Is it
    much different than for the earlier versions (the latest I have seem
    is Python 2.5).

    Does it matter whether Python is cross compiled to Linux 2.4 or Linux
    2.6 ?
    Unless Python has been changed to rely on features only provided by Linux
    2.6, it shouldn't matter. Of course, you need to make sure your toolchain
    matches the kernel on your device, and that may be a constraint you can't
    easily change.
    Can anyone point to a howto they know works well ?
    Not really. There are plenty of sites that claim to have good "recipes" for
    cross-compiling, but many of them are out of date.
    What are the chances of an 'officially' supported ARM-Linux Python
    distribution ?
    (or is it safer to wait for industrial spec Intel Atom boards to avoid
    the cross compilation altogether ?

    What would it take for the Linux version of Python to be easily cross
    compiled (i.e. would the Linux-Python maintainers be willing to
    include and maintain cross-compilation specific functions) ?
    There are tickets and patches in the Python bug tracker for this, waiting
    for people with enough time to review them. Here's a recent submission:

    http://bugs.python.org/issue1006238
    Let's say we can get it done.
    How is the performance and stability of a working Python on an
    embedded ARM-Linux system ?
    It seemed OK to me the last time I tried this, but then I used to use Python
    on a non-Linux, 48MHz ARM system in the late 1990s and performance wasn't
    really a serious problem then, either.
    Does cross compiling Python automatically include the standard Python
    library, or is that yet another adventure ?
    Parts of it. I had problems with one or two modules, so I just excluded
    them from the build.

    David

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedMar 19, '09 at 4:54p
activeMar 21, '09 at 3:59p
posts7
users7
websitepython.org

People

Translate

site design / logo © 2022 Grokbase