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 06-01-2012, 09:52 AM   #1
pwright2
Connoisseur
pwright2 began at the beginning.
 
Posts: 92
Karma: 10
Join Date: Dec 2011
Device: Kindle Touch
KT programming environment/tools

OK, I think I'd like to try some of these programming things that are suggested, at least the scripting based ones. (no chance I'm going to try to learn C). So far I've just been following install processes.

So, at present I've got a KT that is jailbroken, has Launcher and USBnetwork. On my main computer I am usually in Windows. I can install cygwin if necessary. Or I can boot into Kubuntu 11.04 if needed.

I'm guessing the programming process is to write something on the main machine, using SSH to move it onto the KT, restart the KT, trigger the script somehow, and see what happens. Wash, Rinse, Repeat.

Is that reasonably accurate? Do I need any specialized tools like a development kit? Is there a thread somewhere on getting started?

And, more trivially, is there a Launcher something to give a command line?

------Paul-----
pwright2 is offline   Reply With Quote
Old 06-01-2012, 10:24 AM   #2
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 pwright2 View Post
OK, I think I'd like to try some of these programming things that are suggested, at least the scripting based ones. (no chance I'm going to try to learn C). So far I've just been following install processes.

So, at present I've got a KT that is jailbroken, has Launcher and USBnetwork. On my main computer I am usually in Windows. I can install cygwin if necessary. Or I can boot into Kubuntu 11.04 if needed.

I'm guessing the programming process is to write something on the main machine, using SSH to move it onto the KT, restart the KT, trigger the script somehow, and see what happens. Wash, Rinse, Repeat.

Is that reasonably accurate? Do I need any specialized tools like a development kit? Is there a thread somewhere on getting started?

And, more trivially, is there a Launcher something to give a command line?

------Paul-----
The basic "Getting Started" question. A good one to be asking.
Let me jump around a bit in forming an answer.

Technically, no problem about doing the work under Windows. BUT...
As a practical matter, start doing your work under Linux (your Kubuntu).

Why?
Both the development and the target system are running the same OS.
Makes for a lot less mental "shifting of gears" than working between two different operating systems.
Also, your Kubuntu install is a lot more forgiving than the embedded Linux install of the Kindle.
And, you have the documentation (the "man" and the "info" commands) installed on your Kubuntu.

Scripting...
There are several scripting languages you might use. The command shell (/bin/sh) one might be the one to try first.
Under *buntu(s) the command shell provided by "/bin/sh" may will be "/bin/dash"
Under other systems (or even under some *buntu installs) it may be provided by "/bin/bash".
On the Kindles, it is provided by the "ash" command shell of Busybox.
All of those mentioned above work slightly differently.

On *buntu (and many other distos) you can get into a command shell very similar (different version probably) by:
Code:
/bin/busybox ash
# when done
exit
# that gets you back to your default shell
A very good reference to scripting in the command shell provided by Bash is:
http://www.tldp.org/LDP/abs/html/

The next scripting language you might consider is Lua.
That works the same on __anything__, __anywhere__.
You might have to install it:
Code:
sudo apt-get install lua5.1 lua5.1-doc
Many pre-built extension libraries exist for it,
apt-cache search lua
will give you a mind boggling list of add-ons.

The Lua language is small, simple, powerful and not too hard to learn.
For reference materials, visit lua.org

And your not so trival question:
There are two recent threads here about installable terminal emulators to get an on-kindle command line environment.
Any of the ways of installing ssh on your kindle will give you a command line environment on the kindle, displayed on your *buntu distribution.
knc1 is offline   Reply With Quote
Advert
Old 06-01-2012, 01:48 PM   #3
pwright2
Connoisseur
pwright2 began at the beginning.
 
Posts: 92
Karma: 10
Join Date: Dec 2011
Device: Kindle Touch
That appears to give me a good start. I will be doing some reading, I see. And your last line means that running SSH with the USBnetwork means I'm actually inside the Kindle.

It had not occurred to me that terminal and command line were equivalent. Legacy of being more of a DOS/Windows guy than Linux.

OK. Some of the threads speak of using certain folders and advising beware of other folders. Probably common to linux but not something obvious to the noob. Is there a 'sitemap' of the Kindle file structure that shows safe/dangerous areas?

Thanks for the guidance, though I fear my next posts might be to Geekmaster about unbricking. :-)
pwright2 is offline   Reply With Quote
Old 06-01-2012, 02:32 PM   #4
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 pwright2 View Post
Thanks for the guidance, though I fear my next posts might be to Geekmaster about unbricking. :-)
To minimize possibility of bricking, do not change anything in the root, which requires that you do "mntroot rw" to allow changes.

The safest way to begin is with native-mode apps or scripts that you copy to the USB drive and just run. No installation needed.

For native mode programming that does not change anything on your kindle, you might want to check out the "eink algorthmic art scripts" thread:
https://www.mobileread.com/forums/sho...d.php?t=172182

Then later if you want to play with C programs, check out the tcc compiler package that runs on the kindles:
https://www.mobileread.com/forums/sho...d.php?t=175834

Then you can play with some simple C programs:
geekmaster formula 42: https://www.mobileread.com/forums/sho...d.php?t=175632
newtrix: https://www.mobileread.com/forums/sho...d.php?t=176802
geekmater kindle video player: https://www.mobileread.com/forums/sho...d.php?t=177455

Last edited by geekmaster; 07-03-2013 at 11:20 PM.
geekmaster is offline   Reply With Quote
Old 06-01-2012, 02:57 PM   #5
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 pwright2 View Post
That appears to give me a good start. I will be doing some reading, I see. And your last line means that running SSH with the USBnetwork means I'm actually inside the Kindle.
SSH (secure shell) is a replacement for RSH (remote shell).
Where "remote" means anywhere within reach of networking.

With the appropriate changes to the Kindle and your home network, to setup the reguired routing and firewalling -
Even if I was six time zones away, given your permission and a proper username / password, I could have a (ssh) terminal session __on__ your Kindle.

When the folks who put together *nix thought "remote" they didn't mean just down the hall.

Last edited by knc1; 06-01-2012 at 03:00 PM.
knc1 is offline   Reply With Quote
Advert
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Environment varibles ignored silentguy Calibre 1 05-22-2011 03:48 PM
Regarding Calibre devlopment environment Pavanesh Calibre 2 11-15-2010 01:23 AM
Installing dev environment bran iRex Developer's Corner 13 09-28-2010 05:43 PM
setup development environment JeffElkins Calibre 21 10-22-2008 03:25 PM
What is your favorite reading environment? mogui Lounge 16 11-06-2007 08:50 AM


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


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