Python for ARM7?

K

Ken Seehart

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, SimpleHTTPServer.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
 
S

Sybren Stuvel

Ken Seehart enlightened us with:
Hello. Where might I find python binaries for ARM7 (Linux 2.4)?

Check http://www.vanille.de/projects/python.spy
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.

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
 
K

Ken Seehart

Sybren said:
Ken Seehart enlightened us with:



Check http://www.vanille.de/projects/python.spy




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

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
 
S

Sybren Stuvel

Ken Seehart enlightened us with:
1. How do I know whether to use sharprom or modern?

If it works, use it.
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.

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
 
G

garabik-news-2005-05

Ken Seehart said:
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.

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!
 
K

Ken Seehart

Sybren said:
Ken Seehart enlightened us with:


If it works, use it.

That makes sense :)
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.

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+cvs20040726) (exact file name unknown)
ipkg (the shell script)
tar
ar
(any other commands that ipkg runs)

- Ken
 
S

Sybren Stuvel

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

Yep, that should work.
Better yet, can I unpack them on windows XP somehow?

Don't know.
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.

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.
It there an easy to obtain the files I need without attempting to
reintall linux?

Sure, just use a live CD.
(any other commands that ipkg runs)

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top