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 09-04-2015, 01:02 AM   #31
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 brianinmaine View Post
I never had a Kindle 2, what window manager does it use? Is there no way to use a simple app like dclock:
http://opencircuitdesign.com/~tim/programs/dclock/
I know it was compiled for the Touch, I would like to know if it could work for the 2?
https://www.mobileread.com/forums/sho...d.php?t=222206
No x11, first seen in K4 diags system IIRC.
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.
knc1 is offline   Reply With Quote
Old 09-04-2015, 01:33 AM   #32
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
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 .
NiLuJe is offline   Reply With Quote
Old 09-04-2015, 01:46 AM   #33
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
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
Attached Files
File Type: gz oocairo_1.4.orig.tar.gz (122.7 KB, 147 views)
File Type: gz oocairo_1.4-1.2.debian.tar.gz (4.1 KB, 140 views)
File Type: gz oopango_1.1.orig.tar.gz (286.8 KB, 133 views)
File Type: gz oopango_1.1-1.debian.tar.gz (131.2 KB, 127 views)

Last edited by knc1; 09-04-2015 at 07:49 AM.
knc1 is offline   Reply With Quote
Old 09-04-2015, 07:14 AM   #34
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 knc1 View Post
Works for me.
How are you trying to use it?
A copy and paste?

http://java-gnome.sourceforge.net/do...gInExposeEvent
I hope this link starts to work from everywhere in the world.

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.
knc1 is offline   Reply With Quote
Old 09-04-2015, 10:18 AM   #35
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
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/
Attached Files
File Type: gz cairomm-1.10.0.tar.gz (1.04 MB, 131 views)
File Type: zip luacairo-1.10.2.0-full.zip (879.2 KB, 146 views)
File Type: gz lua-5.1.5.tar.gz (216.0 KB, 148 views)
File Type: gz pixman-0.22.0.tar.gz (565.2 KB, 137 views)

Last edited by knc1; 09-04-2015 at 10:30 AM.
knc1 is offline   Reply With Quote
Old 09-04-2015, 10:32 AM   #36
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
Isn't Open Source just great?
knc1 is offline   Reply With Quote
Old 09-04-2015, 03:39 PM   #37
space_escalator
Member
space_escalator began at the beginning.
 
space_escalator's Avatar
 
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.
space_escalator is offline   Reply With Quote
Old 09-04-2015, 04:54 PM   #38
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 space_escalator View Post
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.
Just think of Lua as Java stripped down to its simplest possible implementation - you'll have no trouble with it.

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
knc1 is offline   Reply With Quote
Old 09-05-2015, 08:14 AM   #39
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 knc1 View Post
- - -
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.
- - -
My bad, iMX31 (never was such a thing as an iMX30).

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.
Attached Files
File Type: pdf MCIMX31RM.pdf (12.18 MB, 144 views)
File Type: zip IMX31_PDK15_LINUXDOCS_BUNDLE.zip (3.78 MB, 121 views)

Last edited by knc1; 09-05-2015 at 08:32 AM.
knc1 is offline   Reply With Quote
Old 09-05-2015, 01:34 PM   #40
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
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
knc1 is offline   Reply With Quote
Old 09-05-2015, 03:35 PM   #41
space_escalator
Member
space_escalator began at the beginning.
 
space_escalator's Avatar
 
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!
space_escalator is offline   Reply With Quote
Old 09-05-2015, 04:17 PM   #42
space_escalator
Member
space_escalator began at the beginning.
 
space_escalator's Avatar
 
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.
space_escalator is offline   Reply With Quote
Old 09-05-2015, 05:49 PM   #43
space_escalator
Member
space_escalator began at the beginning.
 
space_escalator's Avatar
 
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?
space_escalator is offline   Reply With Quote
Old 09-05-2015, 07:19 PM   #44
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 space_escalator View Post
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?
I can not help with that, I have never used a Mac.
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.
knc1 is offline   Reply With Quote
Old 09-05-2015, 11:39 PM   #45
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
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:
Code:
busybox-1.23.2
cairo-1.14.2
expat-2.1.0
fbgrab-1.2
## fbset-2.1 (not built, needs fixing)
fontconfig-2.11.1
freetype-2.6
harfbuzz-1.0.1
htop-1.0.3
libevent-2.0.22-stable
libffi-3.1
libglib2-2.44.1
libpng-1.6.17
lua-5.1.5
lua-cjson-2.1.0-1
musl-1.1.10
nano-2.4.2
ncurses-5.9
ntp-4.2.8p3
pango-1.36.8
pixman-0.32.6
readline-6.3
util-linux-2.26.2
zlib-1.2.8

The programs resulting from those packages -
Spoiler:
Code:
tmp $ ls -1 bin sbin usr/bin usr/sbin
bin:
ash
busybox
cat
catv
chattr
chgrp
chmod
chown
cp
cpio
date
dd
df
dmesg
dnsdomainname
dumpkmap
echo
egrep
false
fdflush
fgrep
findmnt
getopt
grep
gunzip
gzip
hostname
kill
linux32
linux64
ln
login
ls
lsattr
lsblk
mkdir
mknod
mktemp
more
mount
mountpoint
mt
mv
netstat
nice
pidof
ping
pipe_progress
printenv
ps
pwd
rm
rmdir
run-parts
sed
setarch
setserial
sh
sleep
stty
su
sync
tar
touch
true
umount
uname
usleep
vi
watch
zcat

sbin:
arp
blkdiscard
blkid
blockdev
cfdisk
chcpu
ctrlaltdel
devmem
fdisk
findfs
freeramdisk
fsck
fsfreeze
fstrim
getty
halt
hdparm
hwclock
ifconfig
ifdown
ifup
init
insmod
ip
ipaddr
iplink
iproute
iprule
iptunnel
klogd
loadkmap
losetup
lsmod
makedevs
mdev
mkfs
mkswap
modprobe
nameif
pivot_root
poweroff
reboot
rmmod
route
runlevel
setconsole
sfdisk
start-stop-daemon
sulogin
swaplabel
swapoff
swapon
switch_root
sysctl
syslogd
udhcpc
vconfig
watchdog
wipefs

usr/bin:
[
[[
ar
awk
basename
bunzip2
bzcat
cal
chrt
chvt
cksum
clear
cmp
col
colcrt
colrm
column
crontab
cut
dc
deallocvt
diff
dirname
dos2unix
du
eject
env
expr
fbgrab
fc-cache
fc-cat
fc-list
fc-match
fc-pattern
fc-query
fc-scan
fc-validate
find
flock
fold
free
fuser
gapplication
gdbus
gdbus-codegen
getopt
gio-querymodules
glib-compile-resources
glib-compile-schemas
gresource
gsettings
hb-ot-shape-closure
hb-shape
hb-view
head
hexdump
hostid
htop
id
install
ipcmk
ipcrm
ipcs
isosize
json2lua
killall
last
less
linux32
linux64
logger
logname
look
lscpu
lslocks
lslogins
lsof
lspci
lsusb
lua
lua2json
luac
lzcat
lzma
mcookie
md5sum
mesg
microcom
mkfifo
namei
nano
nohup
nslookup
ntpdate
od
openvt
pango-querymodules
pango-view
passwd
patch
pg
printf
prlimit
readlink
realpath
renice
reset
resize
rev
script
scriptreplay
seq
setarch
setkeycodes
setsid
sha1sum
sha256sum
sha3sum
sha512sum
sort
strings
tail
tailf
tee
telnet
test
tftp
tickadj
time
top
tr
traceroute
tty
uname26
uniq
unix2dos
unlink
unlzma
unxz
unzip
uptime
uudecode
uuencode
uuidgen
vlock
wc
wget
whereis
which
who
whoami
xargs
xz
xzcat
yes

usr/sbin:
addgroup
adduser
arping
chroot
crond
delgroup
deluser
dnsd
ether-wake
fbset
fdformat
inetd
killall5
ldattach
loadfont
ntpd
rdate
readprofile
rtcwake
setlogcons


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.
knc1 is offline   Reply With Quote
Reply

Tags
browser, clock, html, k2i


Forum Jump

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


All times are GMT -4. The time now is 02:43 PM.


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