I extracted the root filesystem squashfs image file from the amazon FW 1.2 download for K1. I copied this squashfs image file to my SD card. I created a mountpoint dir on the SD card. I successfully loop mounted the squashfs rootfs-1.2 image file, and my RUNME.sh script (launched from a UYK update.bin) did a directory listing for the inner contents of that mounted rootfs, right after mounting it, so it seems to work fine.
Be sure to umount (UNMOUNT) everything on the SD card before exiting, or the kindle GUI framework will complain about a "locked SD card" and refuse to mount it. Likewise, a "busy" SD card does not get exported as a shared USB drive.
Also, a short delay before exiting seems to help, because exiting immediately after unmounting the loop mount sometimes still gets reported as a locked SD card.
Now I am curious how many books I could fit into a highly-compressed squashfs partition on my 16GB microSD card (which works fine in my K1). I believe the kindle should see the books if my mount point is in the "directory" folder where you store your books. I will try that RSN... But I will need to do the loopmount in a startup script AFTER the SD card is mounted, to prevent that "locked card" warning.
One problem though -- it is taking intolerably long for the kindle to exit USB MS (USB drive) mode with my SD card in, because both sides (the kindle AND the host PC) seem to think they need to do a filesystem check (almost) EVERY TIME, even though I am properly ejecting the devices (and waiting awhile before disconnecting USB cables).
One time recently, my PC decided to move ALL the files on my kindle (/mnt/us) into a FOUND.000 directory, renamed as .CHK files (and extended to a multiple of 4K). So I am more than a little wary of LETTING it do that filesystem check it wants to do all too often. It could be that I just need to reboot my host (Windows) PC. Weird crap starts happening if you go too many days without a reboot...
When the K1 is doing a filesystem check on the SD card (after disconnecting the USB cable), it takes nearly a minute before it even starts the "busy spinner" animation, and that is rather hesitant and herky-jerky for awhile before it even performs good spinner "animation".
Perhaps a smaller SD card would be faster to mount and dismount? Or better yet, stop using USB MS altogether and stick with USBnet (and SCP for file transfer). Of course, I need to add USBnet support (missing kernel module) for that...
FYI, the squashfs image supplied in the latest amazon K1 firmware (1.2) is squashfs 3.0, which I cannot mount on a recent linux (format too old, no longer supported). However, it mounts just fine in the K1. I noticed that other partitions in the K1 flash module are also stored in squashfs (read-only) format -- only /opt and /mnt/us are writable ext3 formats.
Last edited by geekmaster; 05-26-2016 at 09:20 AM.
|