![]() |
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 |
a chroot debian with armel arch in a loop file placed on fat32 partition is much better
|
This is very cool! It's like apt-get :) Thanks aleksandyr
|
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 |
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. |
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.
|
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). |
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.
|
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
|
Symlinking has [edit] up my partition, it leaves files I cannot remove.
|
What do you mean exactly? You can always delete a symlink with rm (if you have write permissions).
|
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.
|
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?
|
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.
|
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.
|
| All times are GMT -4. The time now is 09:55 PM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.