![]() |
#1 | |||||||||
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,586
Karma: 6299993
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
deadbeef on the kindle touch
deadbeef. http://deadbeef.sourceforge.net/
deadbeef present several of the age old problems when building for the touch. a) how do I build it (see below) b) will the windows be randomly huge or lay over each other (see below) c) will it support alsa (see below) d) can it live on FAT (see below) e) will its configs be wiped everytime I turn it off (see below) f) will keyboard input work (see below) g) does it have a single window interface (no floating toolbars) until at least 6, and ideally 7, of those answers are "Yes or Easily" an app can't be properly released. People will complain. However. as an interim solution i am sharing my build files and some rough notes. a) how do I build it? (assuming linux machine) I personally just debootstrap or multistrap down a built of debian lenny for the 3 (debootstrap pointed to deb http://archive.debian.org/debian-archive/debian/ lenny main) or wheezy for the Touch/Paperwhite(5). Like: sudo debootstrap --arch armel --foreign wheezy ./debian-armel http://http.debian.net/debian/ where debian-armel is some folder you want it in, Then install qemu-user-static on your PC. Copy the qemu-arm-static to the /usr/bin folder of my mounted chroot filesystem and then chroot in. Like so: me@minty16 /opt $ sudo updatedb me@minty16 /opt $ locate qemu-arm-static Quote:
me@minty16 /opt $ cat /etc/issue Quote:
I have no name!@minty16:/# uname -a Quote:
Quote:
Run the 2nd stage from inside the chroot (for the deboostrap stuff) me@minty16 /opt $ DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \ LC_ALL=C LANGUAGE=C LANG=C sudo chroot /opt/debian-armel /debootstrap/debootstrap --second-stage (takes a little while) Then setup any remaining configures. me@minty16 /opt $ DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \ LC_ALL=C LANGUAGE=C LANG=C sudo chroot /opt/debian-armel dpkg --configure -a me@minty16 /opt $ sudo ln -sfn /opt/debian-armel/ /armelfs_debian me@minty16 /opt $ sudo mount -t proc proc /armelfs_debian/proc me@minty16 /opt $ sudo cp /etc/hosts /armelfs_debian/etc/ me@minty16 /opt $ DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true LC_ALL=C LANGUAGE=C LANG=C sudo chroot /opt/debian-armel root@minty16:/# echo "deb http://ftp.debian.org/debian/ wheezy main contrib non-free" >> /etc/apt/sources.list root@minty16:/# echo "deb-src http://ftp.debian.org/debian/ wheezy main contrib non-free" >> /etc/apt/sources.list root@minty16:/# apt-get update root@minty16:/# apt-get install locales dialog root@minty16:/# dpkg-reconfigure locales (en.GB_UTF8 for me) This copies the networking, proc <sys> stuff across as required via an ln -s to a fixed folder for simplicity. repeat until you have what you need to get in and out, with networking working. Quote:
Once the image is nice and stable and you can log in and out of it you can either setup a mount script or just chroot in. If using an .img file a script is usually a good idea. (login script for a 5 in a .img file) Spoiler:
logging into a non .img file is as simple as cd to folder and sudo chroot ./ Then I build any future sources inside this chroot armel image on my local machine "cross compiling natively". it allows for apt-get build-dep <thing> and apt-get source <thing> which is great for building things. without any actual cross-compilation invocations. I use the Exporting Binaries Easily from Debian Script that me and Brianinmaine whipped up to get the full exports. then I rip out the rubbish like pthreads, gcc, librt, libm, libresolv, etc... from the exports, this is usually required to prevent fundamental libs being overridden and the whole thing seggying in a big heap of death. And then I manually try to replace as many of the exported files against the system libs (dull process, not required, propely configured the filechecker script Exporting Binaries Easily from Debian does this for you... I never bother setting it up right) by use of --prefix=/mnt/us/extensions/<thing> and the creating of that empty dummy skeleton (</mnt/debian/>/mnt/us/extensions/<thing>) within the debian on the PC I can easily export into a structure that expects to live on the kindles FAT "/mnt/us" way of doing things. To tell the app where to look for libs when it runs we pass a LD flag to the ./configure command. Quote:
Quote:
Quote:
Each app has it's different niggles. figuring these out gets easier with practice. Quote:
GETTING THE SUPPORTING LIBS we can apt-get bits we need like: apt-get install intltool libtool automake sadly there is no apt-get build-dep deadbeef so in pinch do: apt-get build-dep audacity && apt-get build-dep aqualung they should cover the same bases. run ./configure --help or ./configure and see what you are missing of that which you wanted. The above technique worked for my needs. Ogg, Mp3, wav, wmv etc.. etc.. ) I went with --disable-gtk3 --disable-nls --enable-abstract-socket to get around a bind issue and cut down on extras. do a make && make install your program appears in </mnt/debian>/mnt/us/extensions/<thing>/ where /mnt/debian is the location of your armel debian root via qemu on your host PC. the script I referenced earlier Exporting Binaries Easily from Debian will then rip out all the required libs and shove them in one folder. (settable in the script, I choose /export) and then it is up to you to dump the exported "lib" folder contents into the folder you referred to in the "LDFLAGS="-Wl,-O1 -Wl,-rpath,/mnt/us/extensions/deadbeef/lib" (after ripping out the pthreads, gcc, librt, libm, libresolv, etc...) so - that is to say - create a "lib" dir if you don't have one created by the make of your app in your armel output folder /mnt/us/extensions/<thing>/ like /mnt/us/extensions/<thing>/lib (which is </mnt/debian/>/mnt/us/extensions/<thing>/ from the parent OS remember) and shove the exported libs (from the Exporting Binaries Easily from Debian tool) into it. Then copy all of the folder and its contents from </mnt/debian/>/mnt/us/extensions/<thing>/ into /mnt/us/extensions/<thing>/ on your kindle. via USB or ssh. I personally will zip it before I transfer it and unzip it into the kindle /mnt/us/extensions/ dir. This unrolls symbolic links in a sane way to hard files and stops the permission denied errors that trying to create a sym link on FAT will give you. you are ready to test it via ssh. Spoiler:
b) Will the windows be randomly huge or lay over each other? To combat the naming scheme designed by amazon I personally use the following technique. extract the attached files to /var/tmp/root/.config/awesome (like sftp://<kindle-ip>/var/tmp/root/.config/awesome/rc.lua and sftp://root@<kindle-ip>/var/tmp/root/.config/awesome/lab126LayerLogic.lua for example) and then kill awesome. (killall -9 awesome, for example) the window manager will restart - subsequent loading of windows not matching the naming scheme will be fronted. Complicated application with multiple simultaneous windows are not supported. however file selection/ popups are handled. if you DO get a window that is huge, (ABOUT SCREEN) you can truncate the text before the make in about.txt (in this case) or more generally remove that item from the menu or pass it a gtk maximum window size in the code. usually only ABOUT screens are a pain. c) will it support alsa assuming you included libasounsd2-dev you will be golden d) can it live on FAT it can. to get around the symlink issue on fat. tar.gz the folder when it is exported in </mnt/debian>/mnt/us/extensions/<thing>/ and then unzip that into /mnt/us/extensions/<thing>/ on the kindle, this will neatly unroll the symlinks resulting in a larger supporting library file total but no hassles. you can also electively remove all the links not required by the proggy. I have done both in the past, it is up to you. e) will its configs be wiped everytime I turn it off by default yes. however you could try setting the $HOME variable to something of your liking before you call the application or switch it permanently (as I have) in your /etc/passwd file on the kindle. Both XDG_CONFIG_HOME and HOME are honoured. f) will keyboard input work currently no, the GTK_IM_MODULE=kindle is being ignored as far as I can tell, this may be as a result of the fronting mechanism, further investigation would be required. That's why I personally am not releasing it. but these are my notes for someone who might want to. tbh Im fine using mine without it. g) does it have multiple windows No it doesn't, fortunately, because only single window apps are currently supported. In this build I have edited interface.c in the plugins/gtkui folder to elide the unhelpful HELP window that wont pop down. which ends up in plugin /mnt/us/extensions/deadbeef/lib/deadbeef/ddb_gui_GTK2.so ADDING A DSP in preferences hangs the UI. yep that would require too many levels of nested windows. Any action that requires two levels of windows will hang it. Any action. CONFIGURE CUSTOM SHELL COMMAND currently breaks our "one window + a popup" model and renders the app unusable. they can be configured in the .config I believe instead. I might have missed something else that explodes it. but its usable, minus the keyboard. I did have an idea to scroll thru the available windows with a two fingered swipe... but that isnt implemented here... So all the negatives said: When the app is in place on the kindle I run it like: beef.sh: Spoiler:
That can be setup to allow "tap out" on the power button, that code is elided here. I've updated this guide with the links to the howto's but in a nutshell this is a crash course in building something and running it maverick style on the kindle touch/paperwhite Finally: Don't anyone complain about something missing I mentioned. You can easily grab the files to build it yourself here: http://deadbeef.sourceforge.net/download.html None of the tools mentioned cost any money. Use them. This is just an interim development release POC. Trying to make building for the touch / PW (and eventually kindle 3) easy for everyone. Take from this what is intended. a HOWTO "get going fast" not a perfect multi-format player Last edited by twobob; 06-16-2014 at 04:21 PM. |
|||||||||
![]() |
![]() |
![]() |
#2 | |||
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,586
Karma: 6299993
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
[root@kindle root]# xwininfo -tree -root | awk '!/1x1\+\-1\+\-1/ && !/com\.lab126/ && !/webreader/ && !/pillowd/ && !/"kb" "Kb"/ && /IsViewable/{print $0}'
Quote:
deadlock situation visualised [root@kindle root]# xwininfo -tree -root | awk '!/1x1\+\-1\+\-1/ && !/com\.lab126/ && !/webreader/ && !/pillowd/ && !/"kb" "Kb"/ && /IsViewable/{print $0}' Quote:
for last result or xwininfo -tree -root | awk '!/1x1\+\-1\+\-1/ && !/com\.lab126/ && !/webreader/ && !/pillowd/ && !/"kb" "Kb"/ && /IsViewable/{print $1}' | sort -r | head -n1 for its window ID to pass to xdotool. a ./xdotool windowminimize `xwininfo -tree -root | awk '!/1x1\+\-1\+\-1/ && !/com\.lab126/ && !/webreader/ && !/pillowd/ && !/"kb" "Kb"/ && /IsViewable/{print $1}' | sort | head -n1` is close... ALSO: [root@kindle bin]# ./wmctrl -l -G -x | awk '!/pillowd\.Pillowd/ && !/webreader\.Webreader/ && !/kb\.Kb/ && !/com\.lab126\.booklet\.home/ ' Quote:
Last edited by twobob; 06-16-2014 at 07:11 AM. |
|||
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 457
Karma: 1287375
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
|
Hmm - haven't built anything for a long time for the kindle. Thanks for the handy reference! It's amazing how much I can forget
![]() ![]() |
![]() |
![]() |
![]() |
#4 | |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,586
Karma: 6299993
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
installing .net 4.0 (guts)
Quote:
Good to see you too mate. |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Return Current Kindle Touch? New Kindle Touch Sep 6, 2012? | Ozonation | Amazon Kindle | 19 | 03-06-2013 10:15 PM |
Kindle Touch, Nook Touch or Kobo Touch? | tron_1970 | Which one should I buy? | 33 | 05-01-2012 12:15 PM |
Torn: Nook Simple Touch, Kindle Touch, Basic Kindle | dblb48 | Which one should I buy? | 12 | 12-13-2011 02:34 PM |
ConsumerReport: E-book readers: Nook Simple Touch tops Kindle Touch | afv011 | Barnes & Noble NOOK | 4 | 11-22-2011 03:39 PM |
Kindle 3, Nook Simple Touch, Kobo Touch and Libra Pro Touch | jbcohen | Which one should I buy? | 4 | 06-18-2011 07:58 PM |