04-25-2016, 01:53 AM | #16 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
I see that the /mnt/us and /mnt/mmc drives get unmounted before posting volumes to g_file_storage gadget, and remounted on USB removal. I suppose that means that the g_file_storage gadget shares the raw (stl) drive partition, and sharing (rw) while mounted (rw) is a recipe for disaster (i.e. data corruption). One side or the other would have to be (ro) to be safe, and there could still by sync issues to deal with. A terminal using this may need /mnt/us for reads and /mnt/mmc for writes, IF we are careful never to write to the side writable by the kindle (yeah, right, like you can keep WINDOWS from writing to a drive, eh?). It is tempting to try loop-mounting image files that windows cannot write to "accidentally". This will take great care to get right...
|
04-25-2016, 09:09 AM | #17 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
I am checking to see if g_file_storage gadget (USB mass storage driver) can export RAM disks as drive letters. That would be better in multiple ways (not just preventing corruption to the userstore partition). If both sides have (rw) access, it would not matter as long as we limit our writes to a pre-defined file for each side (and mount "noatime,nodiratime" on the kindle to prevent writes to partition directory structure). One fixed-size file for the host PC to write to and one fixed-sized file for the kindle to write to should work.
Another option is to skip USB mass storage, unmount both the drives exported by g_file_storage.ko and the zero-byte drives (for charging) exported by g_zero.ko, and use hidapi for USB HID data transfers (on both sides of the USB connection). In any case, I will eventually succeed (or get distracted into some other project). |
Advert | |
|
04-25-2016, 01:59 PM | #18 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
This looks promising:
https://github.com/geekmaster/dxg-di...sb/composite.h A USB composite device driver for the kindle would allow it to provide RNDIS usb networking AND shared USB mass storage at the same time. It seems to be used in this DXG loadable kernel module for making a kindle DXG appear as a "displaylink" USB video device for a host PC. More info here: http://how-to.cc/get-a-displaylink-v...h-ubuntu-12-04 The K1 kernel supports 3G networking over USB serial (attached to the internal 3G radio modem), so perhaps it would also support an RNDIS (g_eth) driver as well? In that case USB shared-file root shell is less necessary (but still an interesting project), in cases where shared files are the only available form of communication (BBS or "mailbox" style messaging), though a shared RAM disk would be preferable to actually writing to flash. There are lots of options open to the imagination... Last edited by geekmaster; 04-29-2016 at 06:12 PM. |
04-25-2016, 08:29 PM | #19 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Okay, it makes more sense to take smaller steps, when update install scripts are so fussy and unforgiving. This K1 has a keyboard. I will do a terminal, based on my "titty" (tiny tty) script, but using a somewhat more readable tiny font (same width, but 8 pixels tall instead of 8 pixels). The free font I selected will allow 100 lines of 150 characters on a 600x800 screen, and supports a huge character set (including Cyrillic and Hebrew).
I am going to figure out all of the K1 keyboard codes now... Last edited by geekmaster; 04-25-2016 at 08:31 PM. |
04-25-2016, 11:32 PM | #20 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Though I have been using a programming editor that supports Unix line-endings (LF), I just looked at my scripts in a hex editor and some of them have Windows line-endings (CR/LF) mixed in. I did not expect that. That could explain a bunch of problems I have been having. Hopefully solved, now to test.
Yes, much better now... Progress should be more predictable now, without all the intermittent script misbehavior... EDIT: Woohoo! I have one of my eink algorithmic art scripts running on my K1, with its 2bpp (4 color) Apollo eink controller! And no-flash fast eink update mode too. Now I need to add 2-bit dithering to gmplay. Last edited by geekmaster; 04-25-2016 at 11:38 PM. |
Advert | |
|
04-27-2016, 12:03 AM | #21 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Another K1 was just delivered tonight. It has the latest firmware on it. My eink animation is now running on it. I was hoping I would not be locked out, so now I can safely update the firmware on my previous K1 as well.
While figuring out how to add K1 support to my kindle video player (another eink packing mode), I realized that all the kindles can be set to use 1 bit-per-pixel display mode instead of just using saturated values on whatever display mode I find when gmplay runs. If I do that in gmplay, I can just display raw data directly from my *.gmv.gz video files (already 1 bit-per-pixel). Hopefully the file uses the pixels in the same order as the eink framebuffer. Adding a new kindle would make gmplay smaller and simpler if I switch video modes. Just a thought... I also thought of ways to do animation including a hybrid mix of dither and greyscale, where I take the pixel partial-flash needed to set grey pixels as part of a "temporal dither" algorithm (i.e. compensate over time and space to incorporate the eink drawing flash as a desirable trait for spatio-temporal dithering that gives true greys. It seems doable if I do not have to fight too hard with the eink controller chips. I could certainly do it if I could drive the eink display pins directly from GPIO pins, bypassing the eink controller, now that I know how to control eink at its lowest level (at the raw pins). |
04-27-2016, 11:33 PM | #22 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
FYI, the K1 does not (and cannot) use a jailbreak (which adds a key for signed update install packages). The K1 uses OTA (unsigned) packages only. Signing a package with the jailbreak key (OTA package) does not enable UYK (Update Your Kindle).
That actually makes it a bit simpler, and it remains that way even after updating to the newest available firmware for the K1. |
04-28-2016, 09:08 PM | #23 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
I have been learning a lot about eink, and eink controllers, and eink waveforms. The K1 uses this eink controller:
https://web.archive.org/web/20100613..._datasheet.pdf And this is excellent information on eink controllers (specifically the one used in the K3, in this case): http://wenku.baidu.com/view/187d5395...5f465e245.html (It seems to be "copy protected" and images only load on demand, but do not save or print. If you cannot view all 38 pages in your browser, try a different browser). Last edited by geekmaster; 04-28-2016 at 09:10 PM. |
04-29-2016, 07:03 AM | #24 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Hint: translate the directions and follow them - register an account and then the download button should work. |
|
04-29-2016, 08:38 AM | #25 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
But yeah, you're right in the general case, in this case... Last edited by geekmaster; 04-29-2016 at 08:40 AM. |
|
04-29-2016, 08:42 AM | #26 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Indeed, that particular company has a reputation for its data-mining.
None of it good. = = = = But I was only answering the technical question. |
04-29-2016, 08:46 AM | #27 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
And for me, there was that little issue of not having a "Chinese mainland mobile phone number" that is a required part of the Baidu registration process... So I just "side-loaded" the document instead... May I ask how you got your Baidu account (so you could test document downloading)?
|
05-03-2016, 12:19 AM | #28 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
I just won a K2 in an online auction, $10 + $11 shipping and handling, so now I will be able to support a K2 properly. The auction site claims it has a good screen, but no power supply. The problem with eink is even a broken screen looks good until you try to redraw it. I hope it is a good screen like they claim (assuming it was never powered up).
I guess I can now find out "first hand" if a K2 really IS a "small screen DX". Last edited by geekmaster; 05-03-2016 at 12:25 AM. |
05-06-2016, 07:52 AM | #29 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
I played with this K1 stuff some more. Though I can successfully execute scripts from /mnt/us on my K1, any time I try to execute a binary (ELF) file on /mnt/us (or copied from /mnt/us to /tmp), I get a "not found" error. I am tempted to see if I can loop mount an ext3 image file and execute binaries from inside that...
Last time I had execution problems, it was CR/LF in my script. Not this time... EDIT: I see that /etc/mtab contains: /dev/stl0/9 /mnt/us vfat rw,noatime,nodiratime,fmask=0022,dmask=0022 0 0 and mtab mask permission 0022 = chmod 755, which should be executable. EDIT2: Okay, perhaps the problem is that the K1 uses an armv5, whilst newer kindles use armv7 (or later)? Last edited by geekmaster; 05-06-2016 at 11:25 AM. |
05-06-2016, 10:45 AM | #30 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
The K1 has a PXA255 processor (armv5 compatible). I found a toolchain that is supposed to support it: ftp://ftp.gwdg.de/pub/linux/misc/lin...1-26-04.tar.gz
Hopefully I can (re)compile stuff (including tcc and gmplay and other apps) to support it. Though if tcc RUNS on it, I suppose that code compiled with tcc may still have compatibility issues... But still, from what I have read so far, compiling anything with softfp OUGHT to work (though it clearly does not)... EDIT2: I tried both toolchains recommended for the PXA255 linux kernel project (for kernels 2.4 and 2.6), and in both cases, executing a "hello world" app compiled with them (both with and without "-static") gives and "Illegal instruction" error. I guess the next step is to try this: http://blog.itswindtw.info/post/47544551971/pxa255 Last edited by geekmaster; 05-06-2016 at 11:47 AM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
geekmaster vacation | geekmaster | Kindle Developer's Corner | 2 | 03-19-2012 09:18 PM |