09-04-2015, 01:02 AM | #31 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
I am not even sure if the K2 supports DirectFB. We may have to draw a new screensaver.png every minute. And with a iMX30, we may have to start drawing 30 seconds before hand. @NiLuJe: And if not, we can draw as 8 bit, and imagemagic it down to whatever is needed. Last edited by knc1; 09-04-2015 at 01:08 AM. |
|
09-04-2015, 01:33 AM | #32 |
BLAM!
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@brianinmaine: No WM, no X. Have to talk to the fb directly.
EDIT: Argh. Missed a new page once again . |
Advert | |
|
09-04-2015, 01:46 AM | #33 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
These old devices do represent a challenge.
But since idoit also wants things for his (2.5.8) DXG ... - - - - If we only need Cairo - the binding library I gave earlier is the better (and maintained) one. http://www.dynaset.org/dogusanh/ - - - - Of most interest are the worked examples in: oocairo.orig.tar.gz Last edited by knc1; 09-04-2015 at 07:49 AM. |
09-04-2015, 07:14 AM | #34 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Because not the linked to, next to last, example but the following, last, example is probably more of interest. Code at: http://java-gnome.sourceforge.net/do...inedPaper.html There you'll see how the doodle of a tank (as a png) is overlayed on what is already written on the surface. K2 devices don't have a lot of processing power, but for a clock, we can use pre-rendered textual parts (not unlike what matchbox-keyboard does for its keycaps). See: loading-images.lua in the cairo archive above, examples directory. We would need (rendered in desired font, saved as *.png files): A 12 item array of month names - A 7 item array of day names - A 2 item array of day part name (AM, PM) - A 10 element array of (properly kerned) digits - A colon - Ah, I think that is all that might be found on a clock face. Oh, maybe a rendered background pattern. clocktab site uses a table to align the parts - We could use a pre-computed table (the only datatype that Lua has) of component coordinates - call 'date' with a custom (easy to read) format string - read the parts of the string - lookup that part's coordinates and png - read to pix buffer, set as those coordinates - write the whole thing to a *.png in /tmp - make an eps call to display the png - go back to sleep. I am thinking that even a K2 could do that every minute. Last edited by knc1; 09-04-2015 at 07:29 AM. |
|
09-04-2015, 10:18 AM | #35 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Assuming we will only need Cairo (since we will be loading already rendered png rectangles) - -
The collection of (matching versions) of source code is attached for the whole project. Yes, they date from 2011/2012 but that is more recent than the K2. If your on x86 Linux or Windows, the cairo binding zip has already built binaries. Otherwise - we just need to build this stuff to be run by an iMX30 from USB storage. Oh, and provide a Lua script to implement the K2-Clock. Note1: Going this way, Kindle-Clock can be ported fairly easily to all models. Note2: This **is not** the lua binding from Debian, its the better one from: http://www.dynaset.org/dogusanh/ Last edited by knc1; 09-04-2015 at 10:30 AM. |
Advert | |
|
09-04-2015, 10:32 AM | #36 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Isn't Open Source just great?
|
09-04-2015, 03:39 PM | #37 |
Member
Posts: 22
Karma: 10
Join Date: Aug 2015
Device: kindle 2
|
Sorry I didn't say so earlier, the link did start working again. I guess the website was just down before when I tried to use it.
|
09-04-2015, 04:54 PM | #38 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
The various archives I have attached have a lot of examples (from which code can be lifted). - - - - Grumble, grumble, grumble - - - The only serial port information linked to in the K2 prefix index turns out to be a K1. Here is hoping the K2 is like its big screen cousin, the DX/DXG |
|
09-05-2015, 08:14 AM | #39 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Target cpu: ARM1136JF-S (a.k.a: ARMv6) See attached reference manual. - - - This post may grow to include the binaries required. All except that "script to implement" - that will be up to space_escalator. If I am successful, these binaries should work on models K2 .. KV. Last edited by knc1; 09-05-2015 at 08:32 AM. |
|
09-05-2015, 01:34 PM | #40 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Hmm...
Cairo requires Pixman - Pixman seems to default to ARMv7 (with newer arch options) - And we have an ARMv6 device. Grumble. this might take a bit more than: ./configure; make ; make install |
09-05-2015, 03:35 PM | #41 |
Member
Posts: 22
Karma: 10
Join Date: Aug 2015
Device: kindle 2
|
Hooray for YouTube! After an hour-long video I am ready to delve into Lua. Alright!
|
09-05-2015, 04:17 PM | #42 |
Member
Posts: 22
Karma: 10
Join Date: Aug 2015
Device: kindle 2
|
So I installed cairo via homebrew by entering the command
brew install cairo I hope this was the right thing to do... Oh well. Also, I'm about to start making all of the .png's for Roboto Condensed using screenshots of TextEdit for lack of a better tool. Should work alright as long as I pay attention to the coordinate numbers. Edit: png's complete. Font size 144 seemed large enough. Last edited by space_escalator; 09-05-2015 at 04:58 PM. |
09-05-2015, 05:49 PM | #43 |
Member
Posts: 22
Karma: 10
Join Date: Aug 2015
Device: kindle 2
|
Ugh I feel like a toddler who can't do anything for himself. I've installed lua, but I have no idea how to properly install luacairo. The website has binaries for Linux and Windows, but not Mac. I downloaded the source and tried the 'make' command because I found a makefile, but it just gave me errors because it couldn't find lua.h Furthermore, all help about missing lua.h files suggests lua developer packages in linux.
Is now the time to boot up virtualbox and work from inside Linux? What should I do to get cairo working? |
09-05-2015, 07:19 PM | #44 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
And, I am certainly not a virtualbox on Mac user. Why not use any of the hundreds of Linux LiveCD's? Pick one that lets you store your work on a removable flash stick. The LiveCD list has hundreds to choose from, but try (available even if your Mac is ppc): https://livecdlist.com/lubuntu/ That should either run as a LiveCD or be what you use to install it into a VM machine (if such things let you install from a CD). Last edited by knc1; 09-05-2015 at 07:21 PM. |
|
09-05-2015, 11:39 PM | #45 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
First days effort (built, haven't tried any of it to see if it runs) -
All built ARMv6, hard float, fpu=vfp2, optimized for speed on the ARM1136, and built against the musl libc. Still need to build the Lua bindings for libffi and libcairo - Also fix fbset problems (which looks like a missing header file): Spoiler:
The programs resulting from those packages - Spoiler:
The general plan there is to (other than suppliment a bunch of Amazon 10 year old code) - Parameterize the clock layout and the font rectangles in json - Generate the font rectangles for the clock (once) on the Kindle - Have whatever might be needed to diddle the framebuffer, public time network, hardware clock, fonts, and a kitchen sink worth of other things. Last edited by knc1; 09-06-2015 at 12:06 AM. |
Tags |
browser, clock, html, k2i |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
bulk delete from Amazon's Kindle webpage? | mewmartigan | Amazon Kindle | 16 | 01-30-2014 04:19 PM |
Kindle 4.0.1 password tool webpage | Lorphos | Kindle Developer's Corner | 6 | 02-13-2012 09:20 AM |
Is there a webpage to check a Kindle's warranty status? | travfar | Amazon Kindle | 4 | 07-25-2011 06:19 PM |
Troubleshooting Need help with clock setting , kindle 2 | wayneriette | Amazon Kindle | 15 | 02-15-2011 11:57 AM |
Does the Kindle have a Clock | markbot | Amazon Kindle | 6 | 09-27-2010 01:20 PM |