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-26-2011, 03:53 AM   #1
aleksandyr
Junior Member
aleksandyr began at the beginning.
 
Posts: 1
Karma: 12
Join Date: Jan 2011
Device: Kindle k3g
OptWare for Kindle

Hello everyone!

I'm not sure how or where I started with this, and it certainly isn't for everyone, but some of you may find this useful.

OptWare is better known as part of NSLU2-Linux - it's a very simple and very lightweight package manager designed to be integrated on top of embedded linuxes. Basically it's perfect for the Kindle although the repository is rather dated...still great for installing nano, wakelan, bitchx, and other fun toys to use from KiTerm.

...however, there's a bugbear. The existing versions of OptWare expect a version of wget that supports the "--passive-ftp" option, and the Kindle's BusyBox simply doesn't. Took enough work to fix this that I figured it was worth posting.

If you'd like to fiddle with this, here are the (slightly modified) instructions originally available at: http://www.nslu2-linux.org/wiki/Optware/HomePage

Note that you can't install packages to the main partition (/mnt/us) as FAT doesn't support symlinks.

Code:
#First, remount root as read/write
mntroot rw

cd /opt
feed=http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable
wget http://devalue.org/kindle/ipkg-opt_0.99.163-10_arm.ipk
tar -xOvzf ipkg-opt_0.99.163-10_arm.ipk ./data.tar.gz | tar -C / -xzvf -
mkdir -p /opt/etc/ipkg
echo "src cross $feed" > /opt/etc/ipkg/feeds.conf

# Usage (with nano as example)
export PATH=$PATH:/opt/bin
ipkg update
ipkg install nano
You may wish to edit your /etc/profile to make the above PATH changes permanent.

Last edited by aleksandyr; 01-26-2011 at 04:44 AM. Reason: Forgot a step!
aleksandyr is offline   Reply With Quote
Old 01-26-2011, 09:59 AM   #2
troyme
Enthusiast
troyme began at the beginning.
 
Posts: 40
Karma: 34
Join Date: Aug 2010
Device: kindle dx US
a chroot debian with armel arch in a loop file placed on fat32 partition is much better
troyme is offline   Reply With Quote
Old 08-18-2011, 06:36 AM   #3
aquarat
Junior Member
aquarat began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2011
Device: Kindle 2 Intl
This is very cool! It's like apt-get Thanks aleksandyr
aquarat is offline   Reply With Quote
Old 09-18-2011, 07:43 AM   #4
danik
Member
danik began at the beginning.
 
Posts: 12
Karma: 14
Join Date: Sep 2011
Device: Kindle3 3G
OptWare in /mnt/us

I figured out how to install OptWare on /mnt/us partition (in an image file):
1. Create an ext3-image file on a Linux machine (e.g. 500MB) and copy it to your Kindle /mnt/us

dd if=/dev/zero of=./local.ext3 bs=1MiB count=500
mkfs.ext3 ./local.ext3
cp local.ext3 /media/Kindle

2. Over UsbNetwork or in KiTerm:

mntroot rw
mkdir -p /mnt/loc
mount -o loop,noatime -t ext3 /mnt/us/local.ext3 /mnt/loc
mkdir -p /mnt/loc/opt/etc /mnt/loc/opt/share /mnt/loc/opt/lib /mnt/loc/opt/bin /mnt/loc/opt/tmp
ln -s /mnt/loc/opt/etc /opt/etc
ln -s /mnt/loc/opt/share /opt/share
ln -s /mnt/loc/opt/lib /opt/lib
ln -s /mnt/loc/opt/bin /opt/bin
ln -s /mnt/loc/opt/tmp /opt/tmp
mntroot ro

3. Now follow the aleksandyr's instruction (instead of "cd /opt" use "cd /opt/etc")

4. Instead of "ipkg" use "ipkg -t /opt/tmp"

Since the root partition remains read-only, one can be pretty sure that it will be not overwhelmed!

If you do a restart, you will have to mount /mnt/us/local.ext3 again (but you don't need write-privilege for that).

You can also change in ipkg.conf (will be in /opt/etc ) the destination to "dest root /mnt/loc". Then new directories (like man or games) will be created in /mnt/loc/opt

Last edited by danik; 09-21-2011 at 05:50 PM.
danik is offline   Reply With Quote
Old 09-20-2011, 06:16 AM   #5
wiccan2
Connoisseur
wiccan2 knows the difference between 'who' and 'whom'wiccan2 knows the difference between 'who' and 'whom'wiccan2 knows the difference between 'who' and 'whom'wiccan2 knows the difference between 'who' and 'whom'wiccan2 knows the difference between 'who' and 'whom'wiccan2 knows the difference between 'who' and 'whom'wiccan2 knows the difference between 'who' and 'whom'wiccan2 knows the difference between 'who' and 'whom'wiccan2 knows the difference between 'who' and 'whom'wiccan2 knows the difference between 'who' and 'whom'wiccan2 knows the difference between 'who' and 'whom'
 
wiccan2's Avatar
 
Posts: 57
Karma: 10288
Join Date: Aug 2011
Location: West Sussex
Device: Kindle 3 - 3g, Samsung Galaxy Note
Hi, I have previously installed optware per the original instructions here and installed a few items from it. danik's instructions on installing it in an image file seem to be a much better solution because it keeps the root partition of the kindle read only.

Could anyone provide some instructions on how to remove optware safely so that I can reinstall it per the new instructions.
wiccan2 is offline   Reply With Quote
Old 09-21-2011, 06:06 AM   #6
danik
Member
danik began at the beginning.
 
Posts: 12
Karma: 14
Join Date: Sep 2011
Device: Kindle3 3G
With "ipkg list_installed" you can see what's installed and then remove the packages with "ipkg remove <package1> <package2>". Then you should delete the following directories in /opt: bin, etc, share, lib . You can also delete ipkg-opt_0.99.163-10_arm.ipk and configuration file of ipkg.
danik is offline   Reply With Quote
Old 10-07-2011, 07:30 AM   #7
anthonyb
Member
anthonyb began at the beginning.
 
Posts: 16
Karma: 24
Join Date: Sep 2011
Device: Kindle 3 WiFi v3.2.1
You may also want to add:
ln -s /mnt/loc/opt/sbin /opt/sbin

If you choose to install man and man-pages with:
ipkg -t /opt/tmp install man
ipkg -t /opt/tmp install man-pages
then will want to add additional sym links for the /opt/man and /opt/info directories else man won't by default find your man pages (or edit man.conf to point to /mnt/loc/opt/man).
anthonyb is offline   Reply With Quote
Old 10-07-2011, 08:24 AM   #8
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,083
Karma: 2114647
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
Note that symlinking is not needed, you can do everything with bind mounts. Also, there's no real reason to create another directory in /mnt either, it can very well be beneath /mnt/us. So you don't need writes to the root partition at all.
hawhill is offline   Reply With Quote
Old 10-07-2011, 02:41 PM   #9
danik
Member
danik began at the beginning.
 
Posts: 12
Karma: 14
Join Date: Sep 2011
Device: Kindle3 3G
For mount bind you still need mount points in /opt (except you mount to /opt directory itself but then you will hide the original opt directory of Kindle...), so you have to modify the root directory anyway, and with symlink it is easier to remount the image-file after reboot
danik is offline   Reply With Quote
Old 10-07-2011, 04:47 PM   #10
dasmoover
Connoisseur
dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.
 
Posts: 84
Karma: 26720
Join Date: Mar 2011
Device: Kindle 3 WIFI
Symlinking has [edit] up my partition, it leaves files I cannot remove.

Last edited by dreams; 01-03-2012 at 03:11 AM. Reason: language edit by moderation
dasmoover is offline   Reply With Quote
Old 10-08-2011, 05:59 PM   #11
danik
Member
danik began at the beginning.
 
Posts: 12
Karma: 14
Join Date: Sep 2011
Device: Kindle3 3G
What do you mean exactly? You can always delete a symlink with rm (if you have write permissions).
danik is offline   Reply With Quote
Old 10-09-2011, 07:09 AM   #12
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,083
Karma: 2114647
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
Well, technically it would also be possible that the main partition file system is just hosed. I think it could easily happen if you forget to remount it read-only and then the power runs out in a bad moment. Linux might refuse to mount such a file system r/w, so you would need to go into rescue mode (with something like yifanlus kernel/initramfs) and fix the file system.
hawhill is offline   Reply With Quote
Old 10-18-2011, 08:11 AM   #13
anthonyb
Member
anthonyb began at the beginning.
 
Posts: 16
Karma: 24
Join Date: Sep 2011
Device: Kindle 3 WiFi v3.2.1
Is anyone using nano? Sometimes the screen isn't refreshed properly while I'm editing and what I see no longer matches the file contents. It's really annoying. Don't know if ncurses needs to be fixed for the e-ink display or if the TERM variable is not set correctly?
anthonyb is offline   Reply With Quote
Old 10-18-2011, 09:23 AM   #14
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,083
Karma: 2114647
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
You don't really tell about the terminal program you're using, but I think it will be the culprit here. The terminal should be the program to handle e-ink updates, I think, using ncurses wouldn't really work because ncurses knows about rows and columns of a terminal, but knows nothing about the corresponding pixel coordinates.
hawhill is offline   Reply With Quote
Old 10-18-2011, 06:22 PM   #15
anthonyb
Member
anthonyb began at the beginning.
 
Posts: 16
Karma: 24
Join Date: Sep 2011
Device: Kindle 3 WiFi v3.2.1
Hi hawhill. I'm using PoP's build of kiterm (20110408). When I have some time I should probably turn on usbNetwork and try ssh in and try nano again to see what happens.
anthonyb 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
The Frugal Kindle ~ Frugal Finds Under $9 for the Kindle (Kindle eBook Resource) eTrubrown Self-Promotions by Authors and Publishers 3 10-10-2010 06:12 PM
Transfer Kindle books from Kindle PC to Kindle 3 ppearce Amazon Kindle 15 09-16-2010 05:11 PM
Font hacks for the Kindle 2, Kindle International and Kindle DX edge777 Kindle Developer's Corner 17 04-30-2010 04:11 PM
$0.01 in Kindle Store: Interactive Sudoku for Kindle 2 and Kindle DX - Volume 1 Xia Deals, Freebies, and Resources (No Self-Promotion) 2 11-07-2009 10:06 AM


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


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