View Single Post
Old 04-23-2016, 12:27 PM   #6
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
The K1 does not use a FreeScale SoC, and does not support USB downloader mode. I tried all the buttons and keys just to see, while doing a hard reset. The USB vid/pid did not change, so as suspected, no USB downloader mode.

I repackaged NiLuJe's "Dummy Test Hack" from here, so it would run on my K1. This resulted in a number of updates to the kindletool to properly work on Win x64 versions, so I could keep working on my win7 x64 laptop. I am happy to say that the mingw kindletool works great on x64 windows at this time.

I modified the script to give a dir listing of the entire directory tree, and then to dump out various scripts in the file system, and to display various /proc information.

I later started over with a new script, and because I am using it to explore the K1, I named it "k1snoop". It contains an install.sh that runs when you copy the package (k1, ota) to the userstore (or to the installed SD card) and do UYK (Update Your Kindle).

I found that later kindles require OTA2, but the K1 requires OTA update*.bin files.

I am now writing my install script log files to "mnt/us/documents/k1snoop_<version#>" so they are viewable in the kindle document reader, but I set the font (aA key) to its smallest size to minimize wrapped lines.

After I figured out how to use eips (it works rather differently here), I also write some progress and log contents to the eink display. I can modify the framebuffer (/dev/fb/0) and use either eips or writing a 1 to the einkfb proc to force a display update.

As mentioned previously, the embedded apollo eink controller only supports 2 bits per pixel (4 shades of grey). I have not yet tested to see if the eink drivers do a fast refresh when the display contains only saturated black and white pixels, as is done for newer kindle models. I plan to do that soon -- I want my kindle video player working on this too. In fact, I plan to package my player as an update.bin file so it can be run from UYK on compatible kindles, with NO mods required to the filesystem on the kindle (no jailbreak or root shell required). Later, I want a native menu system to aid exploring the kindle, which also runs with no filesystem mods.

Exploration revealed that this K1 does not contain support for usbnetwork (RNDIS). There is no g_ether USB gadget. There is a g_serial gadget, but according to the dmesg logs, it is used by the 3G (EVDO) modem. There is also no wifi support. However, it does support an SD card, so we can get wifi by using a wifi SD card. I prefer using a hacked version of the Transcend SD wifi card, so I can SSH into the SD card processor (also running its own linux). See HACKING TRANSCEND WIFI SD CARDS for details.

The search commands (starting with ~debugOn) do not have "usbNetwork". However, the DO have "Terminal", which presumably starts a shell on the internal serial port (available on a connector accessible under the easily removable back external cover, where you also insert the optional SD card).

Regarding SD cards, though it is claimed at MR that the K1 recognizes 16GB SDHC, it does not support any of the microSDHC cards in my collection, but all the full-sized SD cards (and SDHC) I have work fine. Because microSD is not required to support SPIO (one-bit serial) access mode, I wonder if the K1 is using SPIO to access the SD port. That would make it slower than 4-bit mode, but still very useful.

Because USB networking (i.e. RNDIS) requires support compiled into the linux kernel, I suspect that compiling an adding a compatible g_eth kernel module would not work. Therefore, I plan to go really old-school, and do a "shared file" (mailbox style) interactive shell. This involves a pair of log files for input and output, with each side "tail following" its input log. On the K1, the bash shell would receive commands from its file (written to by the host PC), and it would write its output to the other log file, which the host would follow and display. The downside is that you need some hackery to defeat 4K buffering when writing to a pipe or a file. Even line buffering could be a problem for non-line-oriented character output in programs such as "top" or "nano". However, such a "mass-storage mode terminal" would be useful even on newer model kindles.

Defeating linux stdio buffering is an age-old headache for linux fans, usually involving "screen" or "stdbuf" or "unbuffer", but these are not installed in my K1, and I have not yet been able to successfully have my update.bin install.sh script run my own executable, or script, or even to source my own script into install.sh. That seems strange because install.sh is called by the "otaup" script, and it sources (existing) files just fine. I need to investigate more...

More later, chores to do now...

Last edited by geekmaster; 04-23-2016 at 02:56 PM.
geekmaster is offline   Reply With Quote