OESF Portables Forum
Everything Else => Zaurus - Everything Development => Distros, Development, and Model Specific Forums => Archived Forums => Qt/Qtopia => Topic started by: andyinjapan on July 27, 2004, 02:36:29 am
-
As a Zaurus newbie, I'd like to know how I would install and use Python from the SD card instead of main memory.
I downloaded and tested python-core and a couple of other packages from Python for arm (http://www.vanille.de/projects/python.spy) (a big "Thank-you!" to the maintainer for providing this), but main memory is a bit tight on the C700 and I'd rather have Python run from the SD card. (The Sharp installer complained that it couldn't install Python on the card when I tried.)
My C700 is running the Sharp 1.50JP rom and Qtopia 1.5.4, as well as the "Special kernal" (a Japanese rom update).
Any help would be appreciated...
--------
SL-C700, Sharp 1.50JP rom, Qtopia 1.5.4
-
Hi Andy,
las week I did exactly that. The recipe is:
1) create proper directory in sd card
cd /mnt/card
mkdir python
mkdir python/bin
mkdir python/lib
2) get the python packages from the web, and download them to the sd card
3) extract files to proper location:
for each package you want to install,
3.1) extract the package in a temp directory
ar x python-coreXXXXXXXXX
tar xvf data.tar.gz
3.2) check what files have been extracted, and to which directories, and move them accordingly to the previosly created directories
i.e.
move usr/bin/python /mnt/card/python/bin
NOTE: if your SD card is formatted as fat (as mine), then symlinks cannot be created in the card, and you'll receive lots of errors telling so. To solve this issue, you must write down what symlinks could not be created, and, instead of creating them, just copy the origin file over and over. It will take much more card space, but it's the only way and, anyway, its space in the SD card
4) create a symlink for pythin executable
cd /usr/bin
ln -s /mnt/card/python/bin/python
5) to run an app, just go tho the script directory and run
./py.py
This setup works for me. Hope that helps.
-
A slightly easier option
Start at step 3.
3) extract files to proper location:
for each package you want to install,
tar xzf python-xxxxxxxx.ipk
3.1) extract the package in a temp directory
ar x python-coreXXXXXXXXX
then tar then back up again.
If you have gnu tar then you can do this
gtar czf pyhton-xxxxx.ipk ./data.tar.gz ./debiab-binary ./control.tar/gz
otherwise do it in 2 steps
tar cf pyhton-xxxxx.ipk ./data.tar.gz ./debiab-binary ./control.tar/gz
gzip python-xxxxx.ipk
mv python-xxxxx.ipk.gz python-xxxxx.ipk
The ./ before the files names is important if you want the ipk to work with the qui installer on the Sharp rom
Stu
-
I think a much better appoach will be to rebuild all the python packages into a cramfs image, then just mount it whenever python is needed. I'm gonna do that.
-
maslovsky,
That is a great idea. I would love to have cramfs images of Mickeyl's packages. . .