Author Topic: Python 2.4 Zaurus Image Available  (Read 53838 times)

slapout

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Python 2.4 Zaurus Image Available
« Reply #15 on: January 20, 2005, 02:27:22 pm »
I'm currently using your 2.3 image. To upgrade to 2.4 I know that I need to download the 2.4 image. Do I also need to get the new IPK as well?
SL-5600
Watapon 1.2 Rom

kopsis

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • http://kopsisengineering.com
Python 2.4 Zaurus Image Available
« Reply #16 on: January 20, 2005, 06:00:22 pm »
Quote
To upgrade to 2.4 I know that I need to download the 2.4 image. Do I also need to get the new IPK as well?
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]
Yes. See the "Upgrading" section of [a href=\"http://pyqplayer.sourceforge.net/cgi-bin/bin/view/Main/PythonZaurusImage]this page[/url] for more details.

Bertram Wooster

  • Newbie
  • *
  • Posts: 39
    • View Profile
    • http://
Python 2.4 Zaurus Image Available
« Reply #17 on: January 21, 2005, 10:04:28 am »
dear kopsis, many thanks for your work!
is there a certain order in which python-exe looks for the img?
i copied the img from my SD to home/zaurus/Documents on my C3000 and ran the python-exe from my SD. the installation worked perfectly, though it mounted the img which was still on SD. actually this is not a problem at the moment, as i usually always have this particular SD in my system, but i'm curious of how to change the default location for the img.
c3000, converted sharp rom
sandisk ultraII 512mb sd | d-link dcf-660w | pilot pentopia 3in1 stylus | brando ultra clear protector plus

kopsis

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • http://kopsisengineering.com
Python 2.4 Zaurus Image Available
« Reply #18 on: January 21, 2005, 10:29:53 am »
Quote
is there a certain order in which python-exe looks for the img?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=63459\"][{POST_SNAPBACK}][/a][/div]

The file /etc/rc.d/init.d/mntpython is a "shell script" that controls locating and mounting the image. You can view it in any text editor and you'll see that starting around line 12 is a big block of if/elif statements that are used to locate the image file. I kept the script brutally simple so you don't have to be a shell scripting guru to understand what it's doing  By simply changing the order of those if/elif statements, you can control the order in which the script searches for the images.

clofland

  • Full Member
  • ***
  • Posts: 247
    • View Profile
    • http://www.lofland.net/
Python 2.4 Zaurus Image Available
« Reply #19 on: January 21, 2005, 03:25:25 pm »
Thanks for the 2.4 wrap! It is working great.

I am using the CRAMFS version right now, and it is much faster than the EXT2 2.3 system was.

I don't know if 2.4 is just much faster, or if it is a result of the file system.

Anyway, thanks, it is working great!
C-760 Last Running pdaXrom 1.1.0beta3
- Sandisk UltraII 1GB SD card - Socket LP CF LAN card - Socket LP CF WLAN card - Socket CF Bluetooth Card Rev H -

Optogeek

  • Newbie
  • *
  • Posts: 48
    • View Profile
    • http://optogeek.homelinux.net
Python 2.4 Zaurus Image Available
« Reply #20 on: February 03, 2005, 10:14:56 am »
Kopsis,

Just installed your Python cramfs image on the main memory of my c860 and there is a small error in the mntpython script.  when it searches for the image it looks for /home/zaurus/Documents/${PYTHON}.img but then sets IMAGEDIR="/home/zaurus/" so the mount then fails.

I just changed IMAGEDIR="/home/zaurus/Documents/" and everything works fine.  Just need to learn more than print "Hello World" now
SL-C860 running Cacko 1.23
SL-5500UK with 3.13 Sharp ROM + Cacko Kernel
Origo WLAN and BlueMonkey BT CFs
1GB Crucial SD
1GB Crucial CF

kopsis

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • http://kopsisengineering.com
Python 2.4 Zaurus Image Available
« Reply #21 on: February 03, 2005, 06:15:59 pm »
Thanks for pointing that out! I'll be sure to fix it for the next release

radioz

  • Full Member
  • ***
  • Posts: 102
    • View Profile
Python 2.4 Zaurus Image Available
« Reply #22 on: February 03, 2005, 11:50:06 pm »
Which ROM's will this work with? Would it work with OpenZaurus?
I'm thinking that at least the PyQt library might depend on which rom you have.

p.s. Is there a complete list of all of the Python libraries included in this?

Sounds like great work!

radioz
5600 PXA-255
Hentges OZ 3.5.4.2
PQI 1G SD
PQI 256M SD
Socket LP 10/100 Ethernet
Ambicom WL1100C Wifi

kopsis

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • http://kopsisengineering.com
Python 2.4 Zaurus Image Available
« Reply #23 on: February 04, 2005, 08:07:36 am »
My Python image is designed for ROMs build with gcc 2.95 using the standard Sharp libraries. I'm pretty sure it will not work with OpenZaurus nor pdaXrom since both of those have kernels and libraries built with gcc 3.x using the -msoft-float option. For OZ you may want to check out the Python for ARM-Linux project (though the site appears to be down at the moment).

I don't have a complete list of included modules but my Python image is basically just a complete build of the standard Python 2.4 distribution plus PyQt, PySqlite, and PyMySQL.

sojc

  • Newbie
  • *
  • Posts: 19
    • View Profile
Python 2.4 Zaurus Image Available
« Reply #24 on: February 06, 2005, 08:50:28 pm »
Ok I installed PyQt per instructions and when I run type python it gives me the following errors:

1. Could not find platform independent libraries <prefix>
2. Could not find platform independent libraries <exec_prefix>
3. Could setting $PYTHONHOME to <prefix>[:<exec_prefix>]
4. Process python killed
5. import site' failed; use -v for traceback


Im on the c3000

Im trying to find out, what I need to do to fix this?
« Last Edit: February 06, 2005, 09:01:23 pm by sojc »

freizugheit

  • Sr. Member
  • ****
  • Posts: 409
    • View Profile
    • http://
Python 2.4 Zaurus Image Available
« Reply #25 on: February 06, 2005, 09:08:56 pm »
kopsis,

Thanks for the excellent job.  I have successfully downloaded and installed Python 2.4 on my SL-5600 with original Sharp ROM Version 1.32.

I have tried running widgets.py from PyQt examples and it worked smoothly.  However, my own PyQt program encountered low memory problem.  Is there any way to solve my memory problem?

By the way, which version of PyQt is bundled and will you be able to disclose the details of subdirectories in the ex2 file.

Once again my sincere appreciation for your contribution.
« Last Edit: February 07, 2005, 08:35:33 pm by freizugheit »

kopsis

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • http://kopsisengineering.com
Python 2.4 Zaurus Image Available
« Reply #26 on: February 07, 2005, 08:25:31 am »
Quote
Ok I installed PyQt per instructions and when I run type python it gives me the following errors:
[div align=\"right\"][a href=\"index.php?act=findpost&pid=65900\"][{POST_SNAPBACK}][/a][/div]
This sounds like a case of the Python image not getting mounted. Note that the Python executable is installed to internal storage so it's always available ... but it won't actually work unless the filesystem image gets mounted correctly by the /etc/rc.d/init.d/mntpython script.

You can verify this diagnosis by doing a "mount" command (without any parameters) from a root login in the konsole. You should see a line similar to the following:
Code: [Select]
/dev/loop1 on /home/QtPalmtop/lib/python2.4 type cramfs (rw)The loop device may have a different number and the fs type may be "ext2" instead of "cramfs".

If you don't have a line similar to the above, try the following command (from a root login):
Code: [Select]
/etc/rc.d/init.d/mntpython startPost any error messages and we'll work through what might be tripping things up.

kopsis

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • http://kopsisengineering.com
Python 2.4 Zaurus Image Available
« Reply #27 on: February 07, 2005, 09:19:51 am »
Quote
However, my own PyQt program encountered low memory problem.  Is there any way to solve my memory problem?
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]

The one down side of using Python is that it's a bit memory hungry. The three solutions are to either reduce memory use by other apps, reduce memory use by your Python app, or use a swapfile.

Reducing memory use by other apps may be as simple as turning off "fast load" for the standard Qtopia apps. If you're not familiar with "fast load" settings, a quick forum search will turn up all kinds of info.

You may also find that your Python app is architected such that it's wasting memory. Unfortunately, how to find and fix problems like that is way beyond what can be taught in a forum post. Google can find you [a href=\"http://blog.ianbicking.org/kata-19-an-optimization-anecdote.html]examples[/url] of Python optimization techniques that may help cut your app's memory requirements. For what it's worth, I've been able to run some pretty healthy Python apps on a lowly SL-5500 by carefully designing the apps to minimize memory use. Using a sqlite database to manage the app's persistant data instead of keeping everything in Python data structures in memory can be a big win.

If you've trimmed the memory footprint for running apps and your Python code as much as practical and you still have problems, you'll need to set up a swapfile. Again, a forum search is the best way to find out how to do that. Keep in mind that swapfiles (due to fairly heavy write activity) can be fairly hard on some SD and CF cards. Choose the location wisely (eg. use an old CF card for you swapfile instead of a brand new expensive 1GB SD card) and disable the swapfile any time you don't need it.

Quote
By the way, which version of PyQt is bundled and will you be able to disclose the details of subdirectories in the ex2 file.
The version of PyQt included is PyQt-x11-gpl-3.13 source downloaded from Riverbank's site and built against Python 2.4 and SIP 4.1.1. I'm not planning on posting a dump of the filesystem, but you can always browse the filesystem yourself. The ext2 (and cramfs) file mounts at /opt/QtPalmtop/lib/python2.4 ... everything under there is in the fs image.
« Last Edit: February 07, 2005, 09:21:42 am by kopsis »

freizugheit

  • Sr. Member
  • ****
  • Posts: 409
    • View Profile
    • http://
Python 2.4 Zaurus Image Available
« Reply #28 on: February 07, 2005, 08:32:59 pm »
Kopsis,

Thanks for the pointers.

sojc

  • Newbie
  • *
  • Posts: 19
    • View Profile
Python 2.4 Zaurus Image Available
« Reply #29 on: February 07, 2005, 10:05:11 pm »
ok, I copied the python24.ex2 to /home/zaurus/Documents. I typed: /etc/rc.d/init.d/mntpthon start. These are the errors:

/sbin/fsck.ext2 No such file or directory while trying to open /home/zaurus/python4.ex2

the superblock could not be read or does not describe a correct ext2 ext2 filesystem. ......

mount: Could not setup loop device.

But, when i typed: python at the command prompt I got the python command prompt and I ran a simple program. Hello world.

ty
sojc