Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 10-18-2016, 07:32 AM   #1
kdusr
Enthusiast
kdusr began at the beginning.
 
kdusr's Avatar
 
Posts: 45
Karma: 10
Join Date: Oct 2016
Location: Mars
Device: K3, KV, KOA2
Thumbs up run pypy on kindle

last week I jailbreaked my KV, and installed python on it, ( https://www.mobileread.com/forums/sho...d.php?t=153930 )

wrote a test script with UI and touch keyboard , it works petty good on kindle, but a little bit slow

then I try to install pypy on kindle, because it 7-10 times faster than standard python and new version of pypy support Tkinter UI module

there are three diff version of pypy for ARM cpu,
http://pypy.org/download.html
ARM Hardfloat Linux binary (ARMHF/gnueabihf, tar.bz2, Raspbian) (
ARM Hardfloat Linux binary (ARMHF/gnueabihf, tar.bz2, Ubuntu Raring)
ARM Softfloat Linux binary (ARMEL/gnueabi, tar.bz2, Ubuntu Precise)

i do not know which version can be matched with kindle,
then I tried all of them, but do not work

what i did:
download pypy package, unzip to /mnt/us/pypy folder, add a python env file in the folder
python env setting as follow:
#!/bin/sh
export PATH=/mnt/us/pypy/usr/bin/:$PATH

then
try to run ./mnt/us/pypy/bin/pypy
got error, can not find pypy

pypy folder structure :

pypy
....|------bin
............|------pypy
............|------libpypy-c.so
....|-------lib_pypy
................|..blalala
....|-------lib-python
................|..blalbla
....|-------site-packages
....|-------include

anyone can give me a hint? how to make pypy running on kindle, thanks!

Last edited by kdusr; 10-18-2016 at 07:35 AM.
kdusr is offline   Reply With Quote
Old 10-18-2016, 09:09 AM   #2
knc1
On Holiday
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 16,333
Karma: 17324624
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
1) Your Kindle is softfloat, like all others.
2) Do not include a leading period when giving a full path.
I.E: . == current directory, not root directory of the file system tree.
knc1 is offline   Reply With Quote
Old 10-18-2016, 11:18 AM   #3
kdusr
Enthusiast
kdusr began at the beginning.
 
kdusr's Avatar
 
Posts: 45
Karma: 10
Join Date: Oct 2016
Location: Mars
Device: K3, KV, KOA2
Quote:
Originally Posted by knc1 View Post
1) Your Kindle is softfloat, like all others.
2) Do not include a leading period when giving a full path.
I.E: . == current directory, not root directory of the file system tree.
thanks knc1!

looks this version of pypy should be matched with kindle,
ARM Softfloat Linux binary (ARMEL/gnueabi, tar.bz2, Ubuntu Precise)

setup path env , try to run but got this
error while loading shared libraries libffi.so.6
can not find libffi.so.6
kdusr is offline   Reply With Quote
Old 10-18-2016, 11:23 AM   #4
knc1
On Holiday
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 16,333
Karma: 17324624
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by kdusr View Post
thanks knc1!

looks this version of pypy should be matched with kindle,
ARM Softfloat Linux binary (ARMEL/gnueabi, tar.bz2, Ubuntu Precise)

setup path env , try to run but got this :eek:
error while loading shared libraries libffi.so.6
can not find libffi.so.6:(
1) In the advanced editor, scroll down, check "disable smilies" in text.

2) So include libffi.so.6 from the same release.

3) Note: You may need to take your libraries and applications from an earlier release than Precise. In fact, it is better to use Debian, they are a better match to what Lab126 uses.
The libc on your Kindle may be too old to support code for the Precise release.
To tell, just run it (libc is both a library and an executable).
OR - just wait for the 'symbol not found' errors to show up.
knc1 is offline   Reply With Quote
Old 10-18-2016, 07:02 PM   #5
kdusr
Enthusiast
kdusr began at the beginning.
 
kdusr's Avatar
 
Posts: 45
Karma: 10
Join Date: Oct 2016
Location: Mars
Device: K3, KV, KOA2
yes you are right, pypy 5.41 Precise is too new, checked my KV /usr/lib/, found libffi.so.5

then I try to install earlier release
https://bitbucket.org/pypy/pypy/downloads

pypy-2.0-alpha-arm-armel.tar.bz2

this release use libffi.so.5, but another error popup :
Error:libtinfo.so.5: cannot open shared object file: No such file or directory

searched google, on kindle, libtinfo called libncurses
then I try this:
su
ln -s /usr/lib/libncurses.so.5 /usr/lib/libtinfo.so.5
ln -s /usr/lib/libtinfo.so.5 /usr/lib/libtinfo.so
but does not work , when i run pypy, same error popup again

it looks difficult to run pypy on kindle (for a linux fresher)
ps : is that possible ? install some lib so files to kindle /usr/lib/ folder??
kdusr is offline   Reply With Quote
Old 10-18-2016, 07:09 PM   #6
kdusr
Enthusiast
kdusr began at the beginning.
 
kdusr's Avatar
 
Posts: 45
Karma: 10
Join Date: Oct 2016
Location: Mars
Device: K3, KV, KOA2
but I really want to transfer this python script to pypy on kindle

Last edited by kdusr; 10-19-2016 at 01:28 PM.
kdusr is offline   Reply With Quote
Old 10-18-2016, 07:29 PM   #7
knc1
On Holiday
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 16,333
Karma: 17324624
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Do you have USBnetworking installed?
Then you also have nano installed, problem solved.
knc1 is offline   Reply With Quote
Old 10-19-2016, 12:41 PM   #8
kdusr
Enthusiast
kdusr began at the beginning.
 
kdusr's Avatar
 
Posts: 45
Karma: 10
Join Date: Oct 2016
Location: Mars
Device: K3, KV, KOA2
Quote:
Originally Posted by knc1 View Post
Do you have USBnetworking installed?
Then you also have nano installed, problem solved.
USBnetworking & nano ==> to get pypy ?????????
could you tell me some detail about that? I will try, thansk!
kdusr is offline   Reply With Quote
Old 10-19-2016, 12:55 PM   #9
knc1
On Holiday
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 16,333
Karma: 17324624
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by kdusr View Post
USBnetworking & nano ==> to get pypy ?????????
could you tell me some detail about that? I will try, thansk!
You never described what your panel's use was.
So I only guessed file management.

You don't have to waste time on that, we already have:

kTerm : on-Kindle terminal with command line access
MC (Midnight Commander) : file management
ssh : command line access

Otherwise, do as I first told you, draw from Debian Jessie.

Also, twobob has written a lot of scripting in support of locating all dependences in a Debian application.
Use either our Wiki master index, or our search to search his posts to find it.

You will spend a lot less time re-inventing wheels if you take the advice that you requested.
knc1 is offline   Reply With Quote
Old 10-19-2016, 01:44 PM   #10
kdusr
Enthusiast
kdusr began at the beginning.
 
kdusr's Avatar
 
Posts: 45
Karma: 10
Join Date: Oct 2016
Location: Mars
Device: K3, KV, KOA2
Quote:
Originally Posted by knc1 View Post
You never described what your panel's use was.
So I only guessed file management.

You don't have to waste time on that, we already have:

kTerm : on-Kindle terminal with command line access
MC (Midnight Commander) : file management
ssh : command line access

Otherwise, do as I first told you, draw from Debian Jessie.

Also, twobob has written a lot of scripting in support of locating all dependences in a Debian application.
Use either our Wiki master index, or our search to search his posts to find it.

You will spend a lot less time re-inventing wheels if you take the advice that you requested.

as you know, python is fast for development but running slow, thats why I want to install pypy on kindle, if pypy can run on kindle, it would be a general power tool like java, c,
I just surprise until now why no one try config pypy to run on kindle

Last edited by kdusr; 12-07-2017 at 10:44 AM.
kdusr is offline   Reply With Quote
Old 10-19-2016, 02:03 PM   #11
encol
Addict
encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.
 
Posts: 387
Karma: 750286
Join Date: Apr 2016
Location: Italy
Device: Kindle PW3 5.8.5.0.1
Quote:
Originally Posted by knc1 View Post
Also, twobob has written a lot of scripting in support of locating all dependences in a Debian application.
Maybe is this?
encol is offline   Reply With Quote
Reply

Tags
arm, gui, pypy, python

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to run Aeris' Kindle Menu without KUAL on Kindle Oasis homeceo43 Kindle Developer's Corner 27 10-26-2016 07:32 AM
Kindle DX - can't run anything with launcher sergeda Kindle Developer's Corner 0 06-28-2015 11:29 AM
'RUN, RUN, RUN' a crime thriller $1.61 tothepoint Self-Promotions by Authors and Publishers 10 09-01-2014 01:07 PM


All times are GMT -4. The time now is 11:15 PM.


MobileRead.com is a privately owned, operated and funded community.