I added a script to periodically access the SD card to keep it powered on so it can keep its wifi interface up. But I discovered a race condition on startup. Sometimes the kindle sees 15GB free, and sometimes 0GB free. When 0GB free and connected to a PC over USB, the PC says it needs formatting. Because this card actually runs linux inside, it needs time to boot up, and the kindle probably tries to access it before it is ready (though it sometimes succeeds). It works much better to boot with SD card removed, then hot-plug insert it (when in always sees the 16GB card). The K1 should always have its power switch off when removing the SD card, but insertion works fine.
The problem is when running an update script, where the card is usually not ready. I suppose I need my update script to wait for SD card ready, then manually mount it, the "ping" it to keep it alive (hopefully with its hotspot visible so I can connect and SSH into it). The card already supports a couple of "flag files" which do stuff when deleted from the host device (such as a digicam). Perhaps we can extend that feature to add a "tcp tunnel" file (similar to what I described previously for STDIN command lines in and STDOUT results).
Normal SD cards work just fine, and you can even install update packages from them. Not so when using this SD wifi card (except perhaps on rare occasions I have not yet seen). A race to init the card before the Kindle gives up on it -- as I mentioned, manual SD card mounting in a startup script should be an adequate workaround.
My Transcend 16GB SD wifi card is running this hacked firmware:
http://dmitry.gr/index.php?r=05.Proj...scend%20WiFiSD
Quote:
|
An exciting time indeed - now this WiFiSD card is a perfectly working ARMv5 computer with a kernel and ramdisk we can build, and 16GB of storage. Pity it only has 32MB of RAM. Well, we do have ability to modify the kernel now. I added support for swap, ext4, sysfs, loop, and a few other modern conveniences we all know and love. Once again the card booted. Now I was able to swapon a file on the SD card, loop-mount a 2GB ext4 filesystem and chroot into a version of ubuntu in there. Once inside, it is the nice and comfy environment you'd expect. I was able to bring up sshd with X-forwarding, and even run firefox on the card (it was slow). Modifying the card's boot scripts again, I tried to get it to do all this on boot and succeeded. SWEET! The card has a myriad of uses now. Something cool: it will boot and run outside of a valid SDHC host. In fact, aplying power to it is enough.
|