Python for ARM7?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ken Seehart

    #1

    Python for ARM7?

    Hello. Where might I find python binaries for ARM7 (Linux 2.4)?

    I don't have an ARM7 compiler, and I probably don't have enough disk
    space (about 3MB of flash available) for the complete build anyway.

    My plan is to just copy the files I need. This approach seems to work
    on Windows XP, where I have a working python executable with the
    libraries I need (python.exe, SimpleHTTPServe r.py and dependencies), all
    in about 1 MB. The application is basically a web server.

    If I absolutely have to build my own python, I would probably use a
    cygwin (or maybe linux) cross-compiler for ARM7, but that seems like a
    daunting task. I'd much rather find someone who has already done it who
    has the binaries :)

    I'm pretty sure the only files I actually need are the python executable
    and the _socket shared library.

    Thanks,
    - Ken


  • Sybren Stuvel

    #2
    Re: Python for ARM7?

    Ken Seehart enlightened us with:[color=blue]
    > Hello. Where might I find python binaries for ARM7 (Linux 2.4)?[/color]

    Check http://www.vanille.de/projects/python.spy
    [color=blue]
    > If I absolutely have to build my own python, I would probably use a
    > cygwin (or maybe linux) cross-compiler for ARM7, but that seems like a
    > daunting task.[/color]

    It is. From the above URL:

    : The build process of Python compiles a core part of it (the parser
    : generator pgen) and tries to execute that later in the build
    : process. This - of course - doesn't work for cross compiling.

    Sybren
    --
    The problem with the world is stupidity. Not saying there should be a
    capital punishment for stupidity, but why don't we just take the
    safety labels off of everything and let the problem solve itself?
    Frank Zappa

    Comment

    • Ken Seehart

      #3
      Re: Python for ARM7?

      Sybren Stuvel wrote:[color=blue]
      > Ken Seehart enlightened us with:
      >[color=green]
      >>Hello. Where might I find python binaries for ARM7 (Linux 2.4)?[/color]
      >
      >
      > Check http://www.vanille.de/projects/python.spy
      >
      >[color=green]
      >>If I absolutely have to build my own python, I would probably use a
      >>cygwin (or maybe linux) cross-compiler for ARM7, but that seems like a
      >>daunting task.[/color]
      >
      >
      > It is. From the above URL:
      >
      > : The build process of Python compiles a core part of it (the parser
      > : generator pgen) and tries to execute that later in the build
      > : process. This - of course - doesn't work for cross compiling.
      >
      > Sybren[/color]

      Wow thanks!

      Two more questions:

      1. How do I know whether to use sharprom or modern?

      2. What do I do with ipk files? I surfed around and found that in one
      example, the command is "ipkg install foo.ipk", but ipkg doesn't seem to
      exist on my hardware.

      Thanks again!
      - Ken

      Comment

      • Sybren Stuvel

        #4
        Re: Python for ARM7?

        Ken Seehart enlightened us with:[color=blue]
        > 1. How do I know whether to use sharprom or modern?[/color]

        If it works, use it.
        [color=blue]
        > 2. What do I do with ipk files? I surfed around and found that in
        > one example, the command is "ipkg install foo.ipk", but ipkg doesn't
        > seem to exist on my hardware.[/color]

        ipkg doesn't have anything to do with your hardware. It's just a shell
        script. Anyway, an ipkg file is nothing more than a tarball with a
        certain content.

        Sybren
        --
        The problem with the world is stupidity. Not saying there should be a
        capital punishment for stupidity, but why don't we just take the
        safety labels off of everything and let the problem solve itself?
        Frank Zappa

        Comment

        • garabik-news-2005-05@kassiopeia.juls.savba.sk

          #5
          Re: Python for ARM7?

          Ken Seehart <pythonic@seeha rt.com> wrote:[color=blue]
          >
          > 2. What do I do with ipk files? I surfed around and found that in one
          > example, the command is "ipkg install foo.ipk", but ipkg doesn't seem to
          > exist on my hardware.[/color]

          ipk files are basically in two flavours, one of them is a plain tar.gz
          file, use tar xvzj to upnack it
          the second is an ar archive, use ar x to unpack it
          (you mentioned cygwin - assuming you are working under MS windows,
          either use the cygwin commands, or try to open the ipk with winzip or
          something similar)

          once unpacked, you find data.tar.gz inside containing all the necessary
          binary files, and control.tar.gz containing some information and
          installation scripts (in most cases, you can ignore them)

          --
          -----------------------------------------------------------
          | Radovan Garabík http://kassiopeia.juls.savba.sk/~garabik/ |
          | __..--^^^--..__ garabik @ kassiopeia.juls .savba.sk |
          -----------------------------------------------------------
          Antivirus alert: file .signature infected by signature virus.
          Hi! I'm a signature virus! Copy me into your signature file to help me spread!

          Comment

          • Ken Seehart

            #6
            Re: Python for ARM7?

            Sybren Stuvel wrote:[color=blue]
            > Ken Seehart enlightened us with:
            >[color=green]
            >>1. How do I know whether to use sharprom or modern?[/color]
            >
            > If it works, use it.[/color]

            That makes sense :)
            [color=blue][color=green]
            >>2. What do I do with ipk files? I surfed around and found that in
            >>one example, the command is "ipkg install foo.ipk", but ipkg doesn't
            >>seem to exist on my hardware.[/color]
            >
            > ipkg doesn't have anything to do with your hardware. It's just a shell
            > script. Anyway, an ipkg file is nothing more than a tarball with a
            > certain content.[/color]
            [color=blue]
            > Sybren[/color]

            That was a dumb way for me to put it :) What I mean is that the linux
            installation on my hardware is so stripped down I don't have various
            files such as ipkg. It's helpful to know that ipkg is a shell script
            instead of a binary, but I am also missing tar, ar, and gcc (which I
            assume I need libraries from).

            I could try to unpack them on another (non-ARM7) linux box and then move
            the files over to the ARM7 device. Better yet, can I unpack them on
            windows XP somehow?

            If for some reason that is not possible, i suppose my next step is to
            find a compatible ARM7 linux installation to unpack on another machine
            to steal files from. Unfortunately I don't have access to another ARM7
            computer, and I don't have room for a full linux installation on the
            ARM7 device that I am working with (it has a total of 4MB). It there an
            easy to obtain the files I need without attempting to reintall linux?

            The files I know about are:
            libgcc1 (>= 3.4.3) (exact file name unknown)
            libc6 (>= 2.3.2+cvs200407 26) (exact file name unknown)
            ipkg (the shell script)
            tar
            ar
            (any other commands that ipkg runs)

            - Ken


            Comment

            • Sybren Stuvel

              #7
              Re: Python for ARM7?

              Ken Seehart enlightened us with:[color=blue]
              > I could try to unpack them on another (non-ARM7) linux box and then
              > move the files over to the ARM7 device.[/color]

              Yep, that should work.
              [color=blue]
              > Better yet, can I unpack them on windows XP somehow?[/color]

              Don't know.
              [color=blue]
              > If for some reason that is not possible, i suppose my next step is
              > to find a compatible ARM7 linux installation to unpack on another
              > machine to steal files from.[/color]

              Why? You can extract the files just fine on any ARM machine. It's the
              code in the binaries that you can't execute on anything but ARM. Just
              extracting some files can be done on any system.
              [color=blue]
              > It there an easy to obtain the files I need without attempting to
              > reintall linux?[/color]

              Sure, just use a live CD.
              [color=blue]
              > (any other commands that ipkg runs)[/color]

              As I said: you can extract the files even without ipkg. Just untar
              them and take a good look at the contents. You'll figure it out.

              Sybren
              --
              The problem with the world is stupidity. Not saying there should be a
              capital punishment for stupidity, but why don't we just take the
              safety labels off of everything and let the problem solve itself?
              Frank Zappa

              Comment

              Working...