![]() |
#1 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Feb 2014
Device: Kindle 3 keyboard
|
Native graphics demo & How do I attach getty to keyboard?
Good Day,
this is my first post on mobileread. This is about Kindle 3 / Kindle Keyboard I found that the graphical user interface of course big java blob run in the virtual /usr/java/bin/cvm which is launched on boot (with a tonna command line parameters) from /etc/init.d/boot_finished This means that if you want to launch some other program instead (or before) you can add it to this boot_finished file. You may have to make sure paths are set correctly. I have also written a very hasty hack of a simple primitives graphics "library" to draw lines, circles, and rectangles on the display using /dev/fb0 - which by passes the java user interface. (See attached.) I compiled it with scratchbox compiler as described here: https://www.mobileread.com/forums/showthread.php?t=59828 Except I had to use deb2tgz because I was using slackware. Anyway, What I would love to do is have my K3 come up without the java thing going and just present me with a linux command prompt. The keyboard seems to show up as a regular event device in /dev/input/event0 (for keyboard), event1 (for joypad), and event2 for volume buttons. However I really want to do is have the kindle boot up and give me a root prompt on the display/keyboard without ever even loading the javabloat. Then from the command line I can launch whatever of my own compiled C apps I want. Think of it as a little computer that can run the display for days on a charge. I know there are terminals, but don't those run within the java system? I will probably have to write a kernel driver which shows up as a serial port and reads from keyboard and writes to fb0, unless someone already did? Any advice would be much appreciated. Thanks, Jesse EDIT/PS: I've updated graphics library to also support alpha drawing as well as anti-aliasing, as well as polygons with holes. ~Jesse@3-29-2014 Last edited by JesseGordon; 03-30-2014 at 02:52 AM. |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
|
There's a terminal emulator ready for you to use, just search this board. I'm not sure what you want with that serial port emulation, since all you want to do is perfectly fine with running in userspace (reading input events, writing to the framebuffer). See e.g. Luigi's terminal application: https://www.mobileread.com/forums/sho...d.php?t=109472 - but I think there were others featured in this board. Check out the Index (sticky thread).
As for not running the Java framework - that is probably possible, have a look out for what's starting /etc/init.d/framework. Oh, and make a backup (using k3flasher or similar) before locking you out. Just sayin'. |
![]() |
![]() |
![]() |
#3 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 71
Karma: 57134
Join Date: Aug 2013
Device: Kindle 3 GB 3G
|
I use MYTS-8 which you will find in the thread:
https://www.mobileread.com/forums/sho...d.php?t=154500 Its lighter than all the alternatives I tried as all it does is be a terminal. If you are using it from the framework, you need KUAL, KITE, Launchpad or similar to invoke it but it can also be invoked from a script. Its multi-session and you can leave a session then re-attach to any open session. |
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
|
Ah, yes, myts was what I used too on my K3 back then when it still lived :-) Suggested!
|
![]() |
![]() |
![]() |
#5 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Feb 2014
Device: Kindle 3 keyboard
|
Does myts run independently of the java machine? I tried to get myts to work but it just hung and would not appear on the screen.
My goal is a text command line interface that runs instead of the java user interface. Thanks, Jesse |
![]() |
![]() |
![]() |
#6 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
What do you have when you do not start the framework, but do start the shell ?
|
![]() |
![]() |
![]() |
#7 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 71
Karma: 57134
Join Date: Aug 2013
Device: Kindle 3 GB 3G
|
Well, I have just run /etc/init.d/framework stop from myts-8 and on exiting myts the framework was indeed non-responsive (although myts did restore the previous framework display on exit). I have launchpad running so was able to reenter myts with [shift][T][T] and myts is operating normally. I then restarted the framework and the kindle is operating normally.
|
![]() |
![]() |
![]() |
#8 | |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Feb 2014
Device: Kindle 3 keyboard
|
Quote:
Thanks, Jesse |
|
![]() |
![]() |
![]() |
#9 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
|
The linux kernel does have fbcon devices (in general, not in the Kindle's distributed variant, I think), though I guess they don't support 4bpp very well. On the other hand, fbgetty exists.
That said, I'm not sure what is wrong with myts for you. It works without the Java VM of course (its sources are available to check). If it didn't work for you, there's another thing you're missing. One thing that comes to my mind would be simply the standby timeout, after which the keyboard is disabled (look out for the powerd process which manages this). |
![]() |
![]() |
![]() |
#10 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Feb 2014
Device: Kindle 3 keyboard
|
yeah I don't know why myts wouldn't do anything for me. I'll have to try again. I did notice that the keyboard is powered down when the thing goes to sleep, but I don't think it was asleep when I tried. Maybe it was though.
Thanks for the tips on fbcon and fbgetty. It would probably take some tweaking to get it working on kindle since kindle needs refresh signals and such. fbcon is an interesting idea too because I know that the kernel can switch to fb mode to give more text lines on PCs. But I'm afraid I'd have to recompile the kernel for the kindle to turn that on. Thanks, Jesse |
![]() |
![]() |
![]() |
#11 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
|
![]() |
![]() |
![]() |
#12 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 71
Karma: 57134
Join Date: Aug 2013
Device: Kindle 3 GB 3G
|
If I were you, I'd start with a 'vanilla' Launchpad + Myts-8 install, confirm the terminal is operating properly and only then try to start Myts instead of the framework. Hopefully you can then figure out what it needs to work.
As Myts uses a single keypress to exit, running it without some way of re-invoking it is not a good idea. |
![]() |
![]() |
![]() |
#13 | |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Feb 2014
Device: Kindle 3 keyboard
|
Quote:
I am aware that K3 does not run X, and that the framebuffer is already enabled. However, the framebuffer is different than fbcon: the frame buffer is just an output device -- a driver for displaying graphics on the screen. It does not perform any input functionality. fbcon, on the other hand, uses the framebuffer as the output interface, but fbcon also reads from the keyboard and thus provides a full input and output user interface. fbcon is a kernel driver: http://free-electrons.com/kerneldoc/latest/fb/fbcon.txt Actually, a slightly modified fbcon would be splended for the k3. Does anyone know how hard it is to compile a kernel for a k3? I have the arm scratchbox cross compiler set up and can compile simple programs no problem, but I'm not sure if I'd be able to compile a kernel...! Fortunately however the K3's current kernel config is available from /proc/config.gz. Thanks, Jesse |
|
![]() |
![]() |
![]() |
#14 | |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
If you can, then just build that module for the existing kernel. I built full sets of modules for the various kernels awhile back, I may have already built it. If not, then I still put all the info (as small scripts) on how they where built as part of the Bit Bucket repo where they live. I seem to have mis-placed the public repository, so in the meantime: https://www.mobileread.com/forums/sho...5&postcount=47 Same user name on Bit Bucket as here. Last edited by knc1; 03-02-2014 at 05:09 PM. |
|
![]() |
![]() |
![]() |
#15 | |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Feb 2014
Device: Kindle 3 keyboard
|
Quote:
I did get your tarball and unpack it, but there's nothing in there about fbcon - but it was worth a try! Do you have any sage advice for me on how to compile a module all by itself? Do I need a copy of the lab126 rt 2.6.26 kernel to do that, probably? Thank you so much for helping out a clueless me! Jesse |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kindle 3 keyboard usb demo mode | awfargo | Kindle Developer's Corner | 6 | 11-07-2013 05:27 PM |
I compiled LinkX on a deb chroot kindle Keyboard and would like to use Graphics Mode | kindletop | Kindle Developer's Corner | 3 | 08-10-2013 06:49 AM |
Demo Kindle Keyboard USB Problems | tommytomtom | Kindle Developer's Corner | 1 | 01-25-2013 03:42 AM |
Kindle Keyboard 3g/wifi demo unit | DWnMentor | Amazon Kindle | 9 | 06-19-2012 07:30 PM |
Kobo & inline graphics | Slope | Kobo Reader | 7 | 02-21-2011 12:25 PM |