It looks like ipkg does not work on the kindle 4 because it uses parameters not supported by the busybox wget.

As long as the kindle busybox is the parent of the current process, busybox handles all commands built into busybox (including wget) as intrinsics. It does not use PATH for intrinsics. In fact, I even tried "mv /usr/bin/wget /usr/bin/wget-old" and a "find / | grep wget" only finds "/usr/bin/wget-old". Even though no wget file or symlinks exists, the wget command still executes the busybox version.

Before that, I tried bind mounts, and even replacing the root symlink with a physical wget file, before renaming the root symlink from wget to wget-old. That is how I finally discovered the busybox intrinsic problem.

This also means that all those symlinks to busybox in the main partition are obsolete because they are not used for busybox intrinsic commands. the bin directories would be a lot cleaner with all those busybox symlinks deleted.

The ONLY way to execute a non-intrinsic wget is with a fully-qualified path to the replacement wget. Unfortunately ipkg uses the intrinsic version.

Because the Kindle 4 is missing bash from its busybox, it would be possible to run an non-intrinsic bash shell, and then put a non-intrinsic wget earlier in the search path.

This is a huge FAIL for bind mounts UNLESS used from a non-intrinsic shell.

Thanks. I thought the .ipk was specially compiled for the Kindle, but I guess not.

The NSLU2 and the Kindle both use ARM cpu cores. NSLU2 console apps that use ncurses (or other text interface) do not need any changes to run from SSH or onscreen console. If you install apt-get, you can install programs from the full debian ARM repository. You can even install the BSD games collection that includes text-mode oldies such as adventure (colossal cave), trek, snake, tetris, and other classic text-mode favorites. Debian mplayer can play streaming videos on the Kindle eInk display by using aalib in an onscreen console (much better with tiny fonts). After you install gcc, you then can install even more linux goodies from source code with the "wget && tar xzvf && ./configure && make && make install" method.

No, I'm pretty sure the version in the first post is different than the one from NSLU2's site. He says "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."

And after I installed it and tried running "ipkg update" I get an error involving --passive-ftp:

No, I'm pretty sure the version in the first post is different than the one from NSLU2's site. He says "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."

And after I installed it and tried running "ipkg update" I get an error involving --passive-ftp:

When following the instructions in the first post on a Kindle 4 (Non Touch), I got the passive-ftp error using the busybox wget in the k4nt main partition.

The busybox built-in commands are intrinsics. The search path is not followed. To execute an external command you must include a path (like ./wget to run an optware wget). Unfortunately, ipgk does not supply this so the wget built into the parent busybox is used instead.

After much experimentation, I mounted the diags partition in /mnt/mmc and ran bash from its busybox, to get rid of the wget problem. That busybox has more commands, and its wget does not get the passive-ftp error when called by ipkg.

Do not make changes in the mounted diags partition. It would probably be a much better idea to download and run a bash shell that does not contain wget, and put the optware wget folder at the beginning of the search path.

I see. I'll try mounting mmc and see if it can get it to work there. Is there any way to update the busybox of the root partition, or would that mean having to recompile the whole OS? I'm sure that if it was that easy then it would've been done by now.

I see. I'll try mounting mmc and see if it can get it to work there. Is there any way to update the busybox of the root partition, or would that mean having to recompile the whole OS? I'm sure that if it was that easy then it would've been done by now.

Not a good idea to replace the main partition busybox. Better to add another one on the USB Drive and execute that with a full path. The new shell (busybox or standalone optware bash) will have its own instrinsics (if any), but at least will use the search path. That way ipkg will call a wget that supports (or at least ignores) the passive-ftp flag.

Changes to files on the main partition will change their md5sum and can prevent future Kindle firmware updates.

Better to not touch the diags partition, and not change the main partition, and use only replacement files that are stored somewhere on the USB Drive (such as in a loop-mounted ext3 file that is on the USB Drive). The key to making this work was discovering that a new bash (or whatever) shell was needed to break out the the main partition busybox intrinsic limitations.

Does anyone know the difference between nano and emacs22 from that repository? Does emacs22 work on the Kindle? I would guess it does, but I'm hardly even an amateur at Unix anymore.

Nano is a nice simple little "What you see is what you get" editor. The optware one can even be copied to the USB drive and used from there.

When I first got my touch, the first thing I did after jailbreak and SSH was to add /mnt/us/bin, and copy nano from an optware loop mount on my kindle 3 to the touch /mnt/is/bin folder. When added to the search PATH with an export, it works great.

Emacs on the other hand is an editor with its own "Cult of emacs", with devote followers that use emacs as their primary computer interface, and never leave it, doing everything from inside emacs. Religious wars have been fought between lovers and haters of emacs.

And of course the built-in vi editor has its devotees too. But never pronounce it "Vie" around them -- you MUST call it "Vee-Eye". Forget this at your peril!

Do not make changes in the mounted diags partition. It would probably be a much better idea to download and run a bash shell that does not contain wget, and put the optware wget folder at the beginning of the search path.