By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,097 Members | 1,529 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,097 IT Pros & Developers. It's quick & easy.

Python for ARM7?

P: n/a
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
Sep 13 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
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
--
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
Sep 13 '05 #2

P: n/a
Sybren Stuvel wrote:
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


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

Sep 13 '05 #3

P: n/a
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
--
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
Sep 13 '05 #4

P: n/a
Ken Seehart <py******@seehart.com> wrote:

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!
Sep 13 '05 #5

P: n/a
Sybren Stuvel wrote:
Ken Seehart enlightened us with:
1. How do I know whether to use sharprom or modern?
If it works, use it.


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


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
Sep 13 '05 #6

P: n/a
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
--
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
Sep 14 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.