Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 10-18-2016, 06:32 AM   #1
kdusr
Connoisseur
kdusr began at the beginning.
 
kdusr's Avatar
 
Posts: 77
Karma: 13
Join Date: Oct 2016
Location: Mars
Device: KOA, KV, KOA2,PW4,PW5
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 06:35 AM.
kdusr is offline   Reply With Quote
Old 10-18-2016, 08:09 AM   #2
knc1
Going Viral
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: 17,212
Karma: 18210809
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
Advert
Old 10-18-2016, 10:18 AM   #3
kdusr
Connoisseur
kdusr began at the beginning.
 
kdusr's Avatar
 
Posts: 77
Karma: 13
Join Date: Oct 2016
Location: Mars
Device: KOA, KV, KOA2,PW4,PW5
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, 10:23 AM   #4
knc1
Going Viral
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: 17,212
Karma: 18210809
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, 06:02 PM   #5
kdusr
Connoisseur
kdusr began at the beginning.
 
kdusr's Avatar
 
Posts: 77
Karma: 13
Join Date: Oct 2016
Location: Mars
Device: KOA, KV, KOA2,PW4,PW5
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
Advert
Old 10-18-2016, 06:09 PM   #6
kdusr
Connoisseur
kdusr began at the beginning.
 
kdusr's Avatar
 
Posts: 77
Karma: 13
Join Date: Oct 2016
Location: Mars
Device: KOA, KV, KOA2,PW4,PW5
but I really want to transfer this python script to pypy on kindle

Last edited by kdusr; 10-19-2016 at 12:28 PM.
kdusr is offline   Reply With Quote
Old 10-18-2016, 06:29 PM   #7
knc1
Going Viral
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: 17,212
Karma: 18210809
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, 11:41 AM   #8
kdusr
Connoisseur
kdusr began at the beginning.
 
kdusr's Avatar
 
Posts: 77
Karma: 13
Join Date: Oct 2016
Location: Mars
Device: KOA, KV, KOA2,PW4,PW5
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, 11:55 AM   #9
knc1
Going Viral
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: 17,212
Karma: 18210809
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, 12:44 PM   #10
kdusr
Connoisseur
kdusr began at the beginning.
 
kdusr's Avatar
 
Posts: 77
Karma: 13
Join Date: Oct 2016
Location: Mars
Device: KOA, KV, KOA2,PW4,PW5
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 09:44 AM.
kdusr is offline   Reply With Quote
Old 10-19-2016, 01:03 PM   #11
encol
Evangelist
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: 415
Karma: 750442
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


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 06:32 AM
Kindle DX - can't run anything with launcher sergeda Kindle Developer's Corner 0 06-28-2015 10:29 AM
'RUN, RUN, RUN' a crime thriller $1.61 tothepoint Self-Promotions by Authors and Publishers 10 09-01-2014 12:07 PM


All times are GMT -4. The time now is 10:54 AM.


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