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 01-23-2012, 10:53 PM   #121
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Both x64 and x86 produce the "trying to read ota2 file" thing + segfaults when run with the precompiled binary, and both exhibit the same behavior with freshly-compiled binaries using the standard set of libraries (sudo apt-get ... as-mentioned here & on the wiki )...
ixtab is offline   Reply With Quote
Old 01-23-2012, 11:32 PM   #122
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
@ixtab: I know how you feel.

I have been following a lot of different instructions on the net for compiling kindle stuff using my Ubuntu 11.x x64.

I have gone as far as downloading exactly the same crosstool versions and exactly following the instructions for various installations, yet I get missing stuff. Either header files are missing, or the compiled apps are missing libraries (or wrong library versions). The most recent attempt was building SDL so I can run GUI qemu x86 apps (and maybe doom or quake ).

Segfaults are common, even on simple "hello world" apps, but sometimes simple apps work.

This is getting to be a huge time sink.

One example is when I build myts-6, running the resulting app on the kindle touch gives an ASSERT error in calloc(), when the number of bytes to allocate is ZERO. In the source, one place it is computed as zero. Forcing that to a non-zero value just blows up at another place where calloc() is called with an immediate constant of zero. WTF?

So, I copied it to the kindle 3G, and there running myts gives an error about libc must be "glibc version >= 2.7", and libc on the k3 is symlinked to a version 2.5.

So... I want to compile apps that will run on all kindles (even k2). Any idea what version of CodeSourcery (or other crosstools) I should use?

And why does the binary version of myts work on K3 but on the touch it ASSERTS out when trying to allocate zero bytes (actually a calloc(0, 1) in the source code)?

Trying to build working code for the touch is getting real tedious and non-productive. How do you guys do it?

What worked best was a choot loop mount with debian repository build tools installed with apt-get, but my loop mount image died with it was full in mid build of something that uninstalled old libs but did not have room to install the new ones. Trying to fix it just made it worse.

I want to be able to do "make -j 4" on my host linux box anyway, so I need a COMPATIBLE cross tool that will build code compatible with all the kindle versions. Is that even POSSIBLE ???

Last edited by geekmaster; 01-23-2012 at 11:35 PM.
geekmaster is offline   Reply With Quote
Old 01-23-2012, 11:32 PM   #123
yifanlu
Kindle Dissector
yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.
 
Posts: 662
Karma: 475607
Join Date: Jul 2010
Device: Amazon Kindle 3
I should probelty clean up the code one day. I wish someone else would do so for me, since I don't like managing code. The problem is most likely my coding. Worst case, you can use windows and Cygwin. A bit excessive, but it works. I guess I should also write a python version one day. I wrote this tool to learn C basically, not because C was a good language to do this.
yifanlu is offline   Reply With Quote
Old 01-23-2012, 11:53 PM   #124
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
@yifanlu: nevermind, there was absolutely no bad intention. I was just "WTF, this should work, but it doesn't. I come up with a hack". Then on 11.10: "WTF, I added my other dirty hack, and it still just crashes with no indication whatsoever where the problem lies". So much about portable C, haha.

... and to something completely different, namely a (not-so-serious) approach at C and C++ things, but one which I employ successfully: "If it doesn't work, try adding an asterisk. If it still wont' work, try another asterisk, or maybe an ampersand.". Oversimplified of course, but pretty fitting.
ixtab is offline   Reply With Quote
Old 01-24-2012, 12:04 AM   #125
yifanlu
Kindle Dissector
yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.
 
Posts: 662
Karma: 475607
Join Date: Jul 2010
Device: Amazon Kindle 3
Quote:
Originally Posted by ixtab View Post
@yifanlu: nevermind, there was absolutely no bad intention. I was just "WTF, this should work, but it doesn't. I come up with a hack". Then on 11.10: "WTF, I added my other dirty hack, and it still just crashes with no indication whatsoever where the problem lies". So much about portable C, haha.

... and to something completely different, namely a (not-so-serious) approach at C and C++ things, but one which I employ successfully: "If it doesn't work, try adding an asterisk. If it still wont' work, try another asterisk, or maybe an ampersand.". Oversimplified of course, but pretty fitting.
One of my main goals was to learn and be familiar with C memory management, and I also needed a update creation tool, so two birds with one stone. If you look at the source, you can clearly see that I just wanted to "try stuff out". For example, I used a union for no reason.
yifanlu is offline   Reply With Quote
Old 01-24-2012, 12:16 AM   #126
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Woohoo! I have some working SDL apps on my touch! Being persistent usually wins in the end. I just had to read the configure file and disable the "esd audio" and "pulse audio" things that were failing to compile. The kindles use alsa audio anyway. Now the sdl test GUI apps are is complaining about "No video mode large enough for 640x480". I guess you cannot fit 640 pixels on a 600 pixel-wide eInk display.

So I changed orientation to 800x600 with launch menu, and have two ssh sessions. When I md5sum /dev/fb0 before running the sdl testbitmap app, it gives me md5sum=0aff...3c90 before and after running the app, but while the app is running, I get md5sum=1cc8...4e63. Interesting... It seems to be locking the framebuffer because "eips -c" does nothing. Exiting the program turns the screen all black and leaves it locked. killall Xorg fixed it though...

And this uses no loop mounts. I set my compile directory to /mnt/us on my host PC, so the apps now look for libs in /mnt/us/lib. In place of the two symlinks, I just copied the source and rename to the destination libraries. Now that I can build SDL from source and it mostly works, I just need to insert the eInk update trigger. There are a whole lot of SDL apps out there (including QEMU). With QEMU I can run x86 programs too... ;-)

Last edited by geekmaster; 08-06-2012 at 08:00 PM.
geekmaster is offline   Reply With Quote
Old 01-24-2012, 12:25 AM   #127
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
It has no problem fitting a 640x480 window on an 800x600 display though:
Code:
[root@kindle test]# ./testblitspeed
SDL_GetVideoInfo():
  hardware surface available: {true}
  window manager available: {false}
  accelerated hardware->hardware blits: {false}
  accelerated hardware->hardware colorkey blits: {false}
  accelerated hardware->hardware alpha blits: {false}
  accelerated software->hardware blits: {false}
  accelerated software->hardware colorkey blits: {false}
  accelerated software->hardware alpha blits: {false}
  accelerated color fills: {false}
  video memory: (1000)

Details for Source Surface:
  width      : 640
  height     : 480
  depth      : 32 bits per pixel
  pitch      : 2560
  alpha      : 255
  colorkey   : 0x0
  red bits   : 0x00FF0000 mask, 16 shift, 0 loss
  green bits : 0x0000FF00 mask, 8 shift, 0 loss
  blue bits  : 0x000000FF mask, 0 shift, 0 loss
  alpha bits : 0x00000000 mask, 0 shift, 8 loss
  flags      : SDL_SWSURFACE

Details for Destination Surface:
  width      : 640
  height     : 480
  depth      : 32 bits per pixel
  pitch      : 2560
  alpha      : 255
  colorkey   : 0x0
  red bits   : 0x00FF0000 mask, 16 shift, 0 loss
  green bits : 0x0000FF00 mask, 8 shift, 0 loss
  blue bits  : 0x000000FF mask, 0 shift, 0 loss
  alpha bits : 0x00000000 mask, 0 shift, 8 loss
  flags      : SDL_SWSURFACE

Testing blit speed for 10 seconds...
Non-blitting crap accounted for 0 percent of this run.
2012 blits took 10039 ms (200 fps).
geekmaster is offline   Reply With Quote
Old 01-24-2012, 04:05 AM   #128
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Well, after a lot of failure, suddenly SDL started filling the screen with SDL logos, really fast. It seems that you have to do a ctrl-c while it is waiting to set the video mode, and ignore the returned error code, and killall Xorg, then at framework restart about 85% suddenly the SDL app starts doing video updates by calling "eips ''" after each page flip.

It looks like SDL needs to be modified to not mess with framebuffer locking. When Xorg has it, SDL video setting freezes. When SDL holds uses lock, parrts of the framework (menu and status bar) never draw, even when switching to other screens (press power button off and on draws the menu).

So, the reason everybody has had problems with SDL on the kindles is probably lock contention. Because you can draw to the framebuffer without locking it, SDL just needs to have locking disabled.
geekmaster is offline   Reply With Quote
Old 01-24-2012, 09:58 AM   #129
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
@yifanlu: Just a minor question: I'm building installers/uninstallers for the localization. Everything works, except for one minor thing: I can't figure out how to set the update progressbar to 100%. I checked your usbnetwork code, and I see you're using a function called update_progressbar in your code.

But where on earth is this defined? I can't find it anywhere, neither in your code, nor on the device. I tried src'in the functions as you do in my scripts, then calling update_progressbar 100, but it just won't do anything.

So, what kind of Voodoo magic did you use?

Thanks!
ixtab is offline   Reply With Quote
Old 01-25-2012, 05:59 PM   #130
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
*bump* on that last question
ixtab is offline   Reply With Quote
Old 01-25-2012, 06:58 PM   #131
yifanlu
Kindle Dissector
yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.
 
Posts: 662
Karma: 475607
Join Date: Jul 2010
Device: Amazon Kindle 3
Umm. I just stole from amazon's update scripts. Just extract the 5.0.3 update and see how it works.
yifanlu is offline   Reply With Quote
Old 01-25-2012, 08:02 PM   #132
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Thanks for the pointer. I figured the actual "final" command to use in .ffs scripts is

Code:
lipc-send-event com.lab126.blanket.ota otaSplashProgress -i $PERCENT
ixtab is offline   Reply With Quote
Old 01-28-2012, 10:48 PM   #133
ernalve
Member
ernalve began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jan 2012
Device: kindle 5
Hi, everyone...

I'm a newbie that just installed the last (tar.gz) jailbreak and did it wrongly.

I didn't understand if the jailbreak would work with the tar.gz file alone or if i had to "unzip" it in the root folder... so I did both.

Then, I restarted my kindle (touch, 5.0) and for the last half and hour it has been trying to start but keeps refreshing the image that says kindle and has a person reading behind a tree.

I tried connecting through usb to my laptop, but it won't recognise it...

Any ideas on how to fix this problem?

Thanks in advance,


ernesto
ernalve is offline   Reply With Quote
Old 01-29-2012, 12:16 AM   #134
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by ernalve View Post
Hi, everyone...

I'm a newbie that just installed the last (tar.gz) jailbreak and did it wrongly.

I didn't understand if the jailbreak would work with the tar.gz file alone or if i had to "unzip" it in the root folder... so I did both.

Then, I restarted my kindle (touch, 5.0) and for the last half and hour it has been trying to start but keeps refreshing the image that says kindle and has a person reading behind a tree.

I tried connecting through usb to my laptop, but it won't recognise it...

Any ideas on how to fix this problem?

Thanks in advance,


ernesto
Which data.tar.gz did you use? There are different people posting different versions in different threads, of differing amounts of safety and reliability. We need to analyze the exact one that you used.

What do you mean by "latest"? Did you download it from the wiki, or from a thread?

Please provide a link to the one you used. A *lot* of people seem to be bricking their kindles with data.tar.gz lately. We need to get this under control.
geekmaster is offline   Reply With Quote
Old 01-29-2012, 01:18 AM   #135
yifanlu
Kindle Dissector
yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.
 
Posts: 662
Karma: 475607
Join Date: Jul 2010
Device: Amazon Kindle 3
Updated the first post to include the new jailbreak for Kindle Touch and 4 using ixtab's method. Jailbreak also installs kindlet developer keys now.
yifanlu is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle Touch 5.1, Jailbreak, and Screensaver Hack sparrowlight Kindle Developer's Corner 23 09-26-2012 12:15 AM
[Kindle Touch] Firmware 5.1.0 and jailbreak ixtab Kindle Developer's Corner 85 06-28-2012 04:43 AM
How to Kindle touch - jailbreak, screensaver morgun Kindle Developer's Corner 3 05-21-2012 06:39 PM
Kindle Touch Jailbreak Support Team geekmaster Kindle Developer's Corner 39 01-14-2012 05:26 AM


All times are GMT -4. The time now is 06:07 AM.


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