Mobileread
python on pocketbook ... and on onyx boox m92 too!
#1  jbaach 12-15-2011, 07:54 PM
Just a very short notice (bed calls). It seems that its possible to run python on the pocketbook 903: http://www.mobileread.com/forums/sho...01&postcount=1.

The nice thing: it seems that exactly the same binaries work on onyx boox as well. I just copied the files mentioned in the other thread onto the boox m92, and did a symlink from /mnt/ext1/applications into that python directory.

Code
root@onyx /mnt/ext1/applications$ ln -s /media/flash/python .
root@onyx /mnt/ext1/applications$ cd python
root@onyx /media/flash/python$ echo "print 1+2" > test.py
root@onyx /media/flash/python$ ./bin/python test.py
3
(the testserver is missing a libz.so.1 on the boox, but I am quite optimistic that this can be easily fixed, given the open source nature of the m92.

For me this is really exiting - it would allow lots of existing python code (for e.g. epub or pdf handling) to be run, maybe with an web-interface run off a local webserver. ...easy cross platform development....web servers .... n900.... sweet dreams for me tonight :-)
Reply 

#2  measure 12-16-2011, 12:07 AM
jbaach:

This is quite interesting, and indeed opens many possibilities. I think the M92 could become the perfect mobile reading device if the community gets behind it. Do you know what sort of video server the M92 uses? I haven't really taken too much of a look at the git-hub sources.

A bit off topic, but I would also love to try to get nfs working on the M92 (which I just ordered, mostly because of you!).


Thanks,
Ryan
Reply 

#3  PF4Mobile 12-16-2011, 09:06 AM
Python!? That is fantastic. I am not programmer but in IT and somehow familiar with programming so here is my question, would it run Qt? I would love to have Anki running on it!!!!
Reply 

#4  kamizase 12-16-2011, 05:32 PM
What about a calibre client to communicate with the pc version?

I have to ask though, how fast will such programs work on an 800mhz ARM processor?
Reply 

#5  PF4Mobile 12-16-2011, 10:43 PM
I think you will have to approach the Calibre's programmers for that.
Anki is running fine on Nook. Anki (Ankidroid) in written in Python.
Not sure if the Nook processor is much more powerfull then M92's.
Reply 

#6  tuxor 04-12-2012, 11:58 AM
What about PyQt support?

This looks rather promising: https://bitbucket.org/dboddie/pyqt4-for-embedded-linux/overview But it contains not only PyQt, but the whole package of Qt, Python, SIP and PyQt...
Reply 

#7  tuxor 04-12-2012, 04:56 PM
Today, I had a closer look at cross-compiling PyQt. And everything I can tell at the moment is: It's a horror. Compiling Python 2.7.3 is really easy considering this Howto: http://randomsplat.com/id5-cross-compiling-python-for-embedded-linux.html

But PyQt is so incompatible to cross-compiling. No native parameters for HOST or TARGET and BUILD. And just scan through all those patches here: https://bitbucket.org/dboddie/pyqt4-for-embedded-linux/overview Unfortunately some of them are not fitting the latest version of PyQt, so you will have to check out each one yourself... that's not exactly fun.

I can't believe, cross-compiling PyQt is so damn hard. Isn't Qt about cross-platform compatibility etc? So if somebody runs into a solution to this problem, I would really love to see it...

EDIT:
On M92 we have version 4.7.3 of Qt. Unfortunately that's not compatible with the most recent version of PyQt (4.9.1). So it'd be cool to know where to get older versions of PyQt, 4.8.X preferably...
Reply 

#8  rkomar 04-12-2012, 09:15 PM
I don't know what the OS on the Onyx devices looks like, but maybe you can avoid cross-compiling by building within an emulated ARM linux environment. For my PocketBook, I can use a Debian lenny armel system under qemu to build software that isn't set up for cross-compilation. Maybe you can do the same, or even use the newer Debian sid/squeeze armel system instead.
Reply 

#9  tuxor 04-13-2012, 05:26 PM
That's a nice idea. But don't we have to use the exact same Qt (4.7.3) and gcc (4.4.4) versions to build new software for our M92? If I simply set up a VM with armel debian and the Qt and gcc from the repos, won't I run into problems?
Reply 

#10  rkomar 04-13-2012, 08:40 PM
It depends on the versions of the dynamic libraries. In general, the libraries are backwards compatible for the same major version number. So, if the libraries are slightly newer on the device, the programs will still run. They won't load if they have a different major version number, or if the minor version number is smaller than what the program was built against. So, if the emulated system has QT4, but a version older than 4.7.3, then you're probably okay. If the emulated system has QT3, or a version above 4.7.3, then it won't work.

If worse comes to worst, you can start with a slightly older emulated system, and update the libraries there
that are giving trouble. It's still probably less mental effort than trying to cross-compile a package that isn't prepared for such work.
Reply 

  Next »  Last »  (1/2)
Today's Posts | Search this Thread | Login | Register