Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 08-27-2016, 04:26 AM   #1
glasnost
Connoisseur
glasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbit
 
Posts: 54
Karma: 60222
Join Date: Aug 2016
Device: PW3, Kobo Aura H2O
Lightbulb OTG Keyboard Support - Kludged Together Solution!

Objective
*Full USB OTG keyboard support so that my kindle can be used as a long-lasting outdoor writing device.
Status
Solution (inelegant, kludged together, but working for now):
lucida's usb otg kindlet (start otg service, then plug in hub/keyboard)
coplate's makexconfig copied to /var/local/kindlekbd per knc1 and:

Code:
# mntroot rw
# mount -o bind /var/local/kindlekbd /etc/upstart/makexconfig
# mntroot ro
# restart x
*work in progress
Current (known) problems & Next Steps

* external battery does not power the hub, so writing time will be shortened
* automate all this in a KUAL extension (probably just modifying lucida's scripts)
* learn more about why my earlier attempts failed in such an odd manner
Hardware/software
Kindle PW3, FW 5.8.1
Jailbroken following knc1's post
KUAL
USB OTG Mouse support by lucida and team
uGreen Powered USB OTG hub
Storm Quickfire Rapid non-LED keyboard
10000mA battery
Earlier aspects of post, put in spoiler b/c I can't seem to format a strikethrough font ;-)

Spoiler:
Setup
Installing lucida's Kindlet was simple and straightforward - put the decompressed files in /mnt/us/extensions/

From the KUAL extension, I started the OTG module/service

Checking that the modules were added to recognize the device:
Code:
#lsmod
...
mousedev                9072  1
usbhid                 18029  0
hid                    67608  1 usbhid
I plug the power into the hub & turn it on; plug the hub into the kindle & see the blue led light up; and plug the keyboard into the hub.

Next to verify that the OS sees the device:
Code:
#dmesg | grep -i input
[  263.772366] input: CM Storm QuickFire Rapid keyboard as /devices/platform/fsl-ehci.0/usb1/1-1/1-1.4/1-1.4:1.0/input/input2
[  263.773820] generic-usb 0003:2516:0004.0001: input: USB HID v1.10 Keyboard [CM Storm QuickFire Rapid keyboard] on usb-fsl-ehci.0-1.4/input0
[  263.819798] input: CM Storm QuickFire Rapid keyboard as /devices/platform/fsl-ehci.0/usb1/1-1/1-1.4/1-1.4:1.1/input/input3
[  263.828242] generic-usb 0003:2516:0004.0002: input: USB HID v1.10 Device [CM Storm QuickFire Rapid keyboard] on usb-fsl-ehci.0-1.4/input1
everything is registered properly, so I verify that input will work:
Code:
#evtest /dev/input/input2

List of supported events i.e. keys I can press
Testing ... (interrupt to exit) 
Q
Event: time 1472263694.041622, type 4 (Misc), code 4 (ScanCode), value 70014
Event: time 1472263694.041639, type 1 (Key), code 16 (Q), value 1
Event: time 1472263694.041647, -------------- Report Sync ------------
Event: time 1472263694.138610, type 4 (Misc), code 4 (ScanCode), value 70014
Event: time 1472263694.138623, type 1 (Key), code 16 (Q), value 0
Event: time 1472263694.138629, -------------- Report Sync ------------
ctrl C
Looks good.
Next Steps
I suspect the easiest path is to simply create a custom xorg.conf file that defines this input device as a keyboard.
*But, will that function in xterm? Presumably yes, but I'm not entirely positive

So, following in the path of coplate, but with further instructions from knc1 I:

Code:
#cat /etc/xorg.conf > /var/local/xorg.conf.project
and added the appropriate input device sections to my new xorg.conf.

Next:
Code:
# mount -o bind /var/local/xorg.conf.project /etc/xorg.conf
#killall -s KILL Xorg
#restart x
And my shiny new xorg? Well, the bind mount didn't stick, and the device reverted to the old code.

Also, the external battery doesn't stay on when just the keyboard is connected to the hub, so there is a slightly higher drain on my kindle battery than I'd like. Not sure where to start with that one. I've tried two different hubs, same thing happens with both. The external battery does not shut off when directly charging the kindle, so I suspect it is some sort of a 'very low amperage' shutoff mechanism.



Any thoughts are welcome and appreciated as I continue to tinker on this. I created a separate thread, as I didn't want to hijack lucida's (which seems to have a different end goal), but I'll merge this if that's the etiquette/most useful idea here here.

Last edited by glasnost; 08-28-2016 at 06:02 AM. Reason: It's WORKING!
glasnost is offline   Reply With Quote
Old 08-27-2016, 08:53 AM   #2
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
you missed making the root filesystem rw
Code:
mntroot rw ; mount --bind whatever ; mntroot ro
Although I am surprised that 'mount' did not give you a failure/warning of the mount point being read-only.

Last edited by knc1; 08-27-2016 at 08:55 AM.
knc1 is offline   Reply With Quote
Advert
Old 08-27-2016, 03:27 PM   #3
glasnost
Connoisseur
glasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbit
 
Posts: 54
Karma: 60222
Join Date: Aug 2016
Device: PW3, Kobo Aura H2O
Quote:
Originally Posted by knc1 View Post
you missed making the root filesystem rw
Code:
mntroot rw ; mount --bind whatever ; mntroot ro
Although I am surprised that 'mount' did not give you a failure/warning of the mount point being read-only.
If I make /etc/ rw, doesn't that defeat the purpose of the bindmount? At that point, why not just cp /etc/xorg.conf to another location and edit the base file?

I'll give it a shot :-)
glasnost is offline   Reply With Quote
Old 08-27-2016, 03:54 PM   #4
coplate
Guru
coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.
 
Posts: 645
Karma: 1888888
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
Quote:
Originally Posted by glasnost View Post

And my shiny new xorg? Well, the bind mount didn't stick, and the device reverted to the old code.

Don't bind '/etc/xorg.conf', copy and bind '/etc/upstart/makexconfig', when X is restarted, it runs this script to delete and recreate /etc/xorg.conf. You can have teh makexconfig make all the same changes that you did to your xorg.conf.

Or bind both of them, and make makexconfig just an empty script, so it doesn't delete the other file.

If you upload your makexconfig, I can add all the changes needed for your device, the only real difference between mine and yours should have been the /dev/input/exentXXX number of the keyboard


You also shouldnt need a 'kill x' and a 'restart x', I would think you can pick 1 or the other, through I recommend 'restart x'

Last edited by coplate; 08-27-2016 at 04:04 PM.
coplate is offline   Reply With Quote
Old 08-27-2016, 04:26 PM   #5
coplate
Guru
coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.
 
Posts: 645
Karma: 1888888
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
I wrote a makexxconfig that will automatically detect keyboard and mouse, that are NOT the touchscreen.

the keyboard checks for key 'F4', and the mouse checks for "relative movement in the X direction" which the touchscreen does not have.

It also comments out the 5 way keypad, so if someone accidentally runs on the device with that, it wont break.


I also attached a copy of the xorg.conf that it generates.


The part to compare to the original in the makexconf is the loop where it checks all the devices:

# Scan for input device and call associate output function
do_input()
Attached Files
File Type: txt makexconfig.keyb_and_mouse.txt (10.5 KB, 500 views)
File Type: txt xorg.conf.txt (2.3 KB, 387 views)
coplate is offline   Reply With Quote
Advert
Old 08-27-2016, 04:54 PM   #6
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by glasnost View Post
If I make /etc/ rw, doesn't that defeat the purpose of the bindmount? At that point, why not just cp /etc/xorg.conf to another location and edit the base file?

I'll give it a shot :-)
It depends on what your true purpose is.

If you wish to give the user a chance to escape from a bad file or other incompatible change with a simple re-boot . . .
Then use a bind mount.
Making sure it is not automatically created by the start-up code, only by the menu entry to enable it.

If neither you nor the computer never makes an in-compatible file change that someone might need to escape from, then change the system file.
knc1 is offline   Reply With Quote
Old 08-27-2016, 06:19 PM   #7
zxczxc
Addict
zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.
 
Posts: 229
Karma: 136002
Join Date: Apr 2013
Device: PW
Keep up the good work, this is very cool, fantastic. Great for ssh-ing into remote servers to perform some tasks. Although funny the keyboard will be by far the biggest thing!
zxczxc is offline   Reply With Quote
Old 08-27-2016, 07:31 PM   #8
glasnost
Connoisseur
glasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbit
 
Posts: 54
Karma: 60222
Join Date: Aug 2016
Device: PW3, Kobo Aura H2O
Quote:
Originally Posted by coplate View Post
I wrote a makexxconfig that will automatically detect keyboard and mouse, that are NOT the touchscreen.

the keyboard checks for key 'F4', and the mouse checks for "relative movement in the X direction" which the touchscreen does not have.

The part to compare to the original in the makexconf is the loop where it checks all the devices:

# Scan for input device and call associate output function
do_input()
coplate - I've tried tailoring your makexxconfig & and mouse.sh script to simply echo in all of my information, as well as using them exactly as you wrote 'em. The xorg.conf that is generated is always incomplete and crashes the xserver. :-( Here is a tails -f of my log (upon connecting the hub) & the xorg.conf that is generated.

* I've tried with both a mouse and keyboard, as well as just a keyboard. Ideally, I'd like just the keyboard (and to use the touchscreen for pointer, so no need for the cursor, though I can always edit that later)

knc1 - when I do a bind mount of xorg.conf directly, it seems to get overwritten by the makexconfig (like coplate has found). I must be missing a step, or need to do the makexconfig phase like coplate.
Attached Files
File Type: txt xorg.conf.log.txt (2.2 KB, 315 views)
File Type: txt mouse.sh.messages.log.txt (19.8 KB, 313 views)
glasnost is offline   Reply With Quote
Old 08-27-2016, 07:49 PM   #9
glasnost
Connoisseur
glasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbit
 
Posts: 54
Karma: 60222
Join Date: Aug 2016
Device: PW3, Kobo Aura H2O
Quote:
Originally Posted by knc1 View Post
It depends on what your true purpose is.

If you wish to give the user a chance to escape from a bad file or other incompatible change with a simple re-boot . . .
Then use a bind mount.
Making sure it is not automatically created by the start-up code, only by the menu entry to enable it.

If neither you nor the computer never makes an in-compatible file change that someone might need to escape from, then change the system file.
Hmm. I think that either I don't understand the situation well enough, or I'm not articulating my problem well enough. Let me try again:

Situation:

#mount -bind /var/local/xorg.conf /etc/xorg.conf
#restart X

/Etc/xorg.conf is overwritten by makexconfig

If / was mounted rw, then bound, then ro - /etc/xorg.conf would still be overwritten by makexconfig because makexconfig would need rw privs in order to write xorg.conf in the first place, no?

And if not, then wouldn't a reboot leave you with the edited xorg.conf? I think this is why coplate is suggesting the 'mount bind and edit makexconfig route.'

Or I'm completely wrong and confusing the situation.
glasnost is offline   Reply With Quote
Old 08-27-2016, 07:53 PM   #10
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
What are you trying to do with this statement?
Code:
InputDevice \"keyboard"\ \"CoreKeyboard"
knc1 is offline   Reply With Quote
Old 08-27-2016, 08:17 PM   #11
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by glasnost View Post
Hmm. I think that either I don't understand the situation well enough, or I'm not articulating my problem well enough. Let me try again:

Situation:

#mount -bind /var/local/xorg.conf /etc/xorg.conf
[1]#restart X

[2] /Etc/xorg.conf is overwritten by makexconfig

If / was mounted rw, then bound, then ro - /etc/xorg.conf would still be overwritten by makexconfig because makexconfig would need rw privs in order to write xorg.conf in the first place, no?

And if not, then wouldn't a reboot leave you with the edited xorg.conf? I think this is why coplate is suggesting the 'mount bind and edit makexconfig route.'

Or I'm completely wrong and confusing the situation.
[2] is caused by [1] - I.E: it was over-written because you told it to (the writing is part of the upstart, start process).

You can't mount to a ro mount point, at least not in Linux, which this is.

The "mount --bind" operation will not persist across re-boots, unless you write code to make it happen as part of the boot process.

The directory name is /etc not /Etc

/var/local is the file system on partition #3, the / file sytem is on partition #1.

The Kindle script provided by Lab126 changes the rw/ro status of the file system mounted as /
The script does not affect any other partitions / file systems.
The change of status of / is not reflected in /var/local (because the file systems are independent backing stores).

In analogy, in some operating systems you can change the rw/ro status of the B:\ drive (backing store) without affecting the A:\ drive (backing store).
Typical of a multi-rooted file tree.

Linux (and all other *nix) uses a single rooted file tree and a backing store(s) per mount point.

X11 is compiled to look at only one place for its configuration file, /etc/xorg.conf

That must be set before X11 starts or re-starts, you can change it while X11 is running because it is only read during X11 start-up.

= = = = = =

Now consider the sequencing of operations all that above implies -

Kindle is running normally, un-modified.

Your scripting is triggered (called) either by a KUAL menu entry or a u-dev rule (however/wherever you program it).

Make the root file system writable (so the mount command does not fail)

Do the bind mount with the custom file.

Return the root file system to ro

Restart X11 without calling upstart -
send: ctrl-alt-backspace to X11 on X11's keyboard input.
(or maybe it also has a restart signal (interrupt), I forget)

I just looked for it, but my google foo is failing today, try sending SIGINT to X11.

You can try the last on your desktop - X11 is X11 is X11 etc
You probably want to bring up an alternate session (ctrl-alt-function-key, other than F7 - which is usually what X11 is running on) before sending SIGINT to the X11 session running your GUI. ;

Last edited by knc1; 08-27-2016 at 08:26 PM.
knc1 is offline   Reply With Quote
Old 08-27-2016, 11:23 PM   #12
glasnost
Connoisseur
glasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbit
 
Posts: 54
Karma: 60222
Join Date: Aug 2016
Device: PW3, Kobo Aura H2O
Quote:
Originally Posted by knc1 View Post
[2] is caused by [1] - I.E: it was over-written because you told it to (the writing is part of the upstart, start process).

You can't mount to a ro mount point, at least not in Linux, which this is.

The "mount --bind" operation will not persist across re-boots, unless you write code to make it happen as part of the boot process.

The directory name is /etc not /Etc
Sorry, was writing on a mobile device (not my kindle with a keyboard ;-) ) damn autocorrect.

Code:
[root@kindle root]# cd /mnt/us/MyProject/
[root@kindle MyProject]# echo "blahblahblah" > ./badxorg.conf
[root@kindle MyProject]# ls
Installbinaries    Keyboard           Uninstallbinaries  badxorg.conf       iptables.log
[root@kindle MyProject]# mount -o bind /mnt/us/MyProject/badxorg.conf /etc/xorg.conf
[root@kindle MyProject]# cat /etc/xorg.conf
blahblahblah
[root@kindle MyProject]#
But:
Code:
[root@kindle MyProject]# mount | grep -i etc
/dev/loop/4 on /etc/kdb.src type cramfs (ro,noatime,nodiratime)
/dev/loop/4 on /chroot/etc/kdb.src type cramfs (ro,noatime,nodiratime)
/dev/root on /chroot/etc/fonts type ext3 (ro,noatime,nodiratime,barrier=0,data=writeback)
/dev/root on /chroot/etc/gtk-2.0 type ext3 (ro,noatime,nodiratime,barrier=0,data=writeback)
/dev/root on /chroot/etc/pango type ext3 (ro,noatime,nodiratime,barrier=0,data=writeback)
/dev/root on /chroot/etc/resolv.d type ext3 (ro,noatime,nodiratime,barrier=0,data=writeback)
This is why I was so confused! It looks like it is bind mounted, but clearly that is not the case. So where is my #cat /etc/xorg.conf getting the blahblahblah statement from? Oddities

Code:
InputDevice \"keyboard"\ \"CoreKeyboard"
That was automatically generated by coplate's makexconfig script.

Let me try again with a custom xorg (just adding the keyboard to the core script) and I'll (hopefully) be able to report back that it works. Thank you for bearing with me, knc1!

Last edited by glasnost; 08-28-2016 at 03:21 AM.
glasnost is offline   Reply With Quote
Old 08-27-2016, 11:57 PM   #13
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Check if the 'mount' command is being provided by busybox or if it is a standalone binary.

It could be you are using the BB 'mount' command and that minimized version is missing the error message about the mount point being on a read-only file system.

Because it certainly failed in the example you give.

Another thing to check - -
Although /etc/xorg.conf is only read once, on start-up - -
It may still be held open by X11 -

So run a listing of open files, see if it is being held open.
Because if it is, it will not matter if it is over-written or even deleted, the /etc directory is on an inode file system, the original data will still be read.

- - - -

If you pause the framework, does that shutdown X11?

I.E: There should be a nice clean way to get upstart to help you, rather than fight you.

Last edited by knc1; 08-28-2016 at 12:04 AM.
knc1 is offline   Reply With Quote
Old 08-28-2016, 05:50 AM   #14
glasnost
Connoisseur
glasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbitglasnost with a running start, can leap into geosynchronous orbit
 
Posts: 54
Karma: 60222
Join Date: Aug 2016
Device: PW3, Kobo Aura H2O
OMG: lucida, coplate, knc1 - I <3 you all!




Between the three of you, my machine is alive!

problem 1 - #mount -o bind wasn't working b/c mntroot was not rw. Busybox wasn't reporting anything and files appeared to be altered, but it wasn't working.

As such, nothing stuck.

That said, xorg.conf is a forced symbolic link from /var/local/xorg.conf and var/local/xorg.conf is always rewritten by upstart when doing 'restart x'

Problem 2 - broken xorg.conf from makexconfig - honestly, I don't know what happened. I do not understand the file interactions well enough to figure out why I was generating those weird conf files using @coplate's cursor2 scripts. Especially because root was not mounted rw when I tried the bind mount.

Solution (inelegant, kludged together, but working for now):
lucida's usb otg kindlet (start otg service, then plug in hub/keyboard)
coplate's makexconfig copied to /var/local/kindlekbd per knc1 and:

Code:
# mntroot rw
# mount -o bind /var/local/kindlekbd /etc/upstart/makexconfig
# mntroot ro
# restart x
And now I can write in vim to my heart's delight :-) Thank you all!!!
glasnost is offline   Reply With Quote
Old 08-28-2016, 10:19 AM   #15
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
The mount point can be a device, a directory or a file -
It can not be a symbolic link.

Sorry, it didn't occur to me to ask you to check for that condition.

I just assumed that the up-start script was changing the rw/ro status of /etc before it generated the config file.

That, and the lack of proper messages from the busybox version of the 'mount' command made this a lot more difficult than it has to be.

- - - - - -

{rant}
Why didn't Lab126 re-configure X11 to get its configure file from /var/local/etc/x11.conf to begin with?

After all, they are doing a custom build-from-source for every firmware release.
{/rant}
Hmm...
that is a rhetorical question, there may be a very good reason that escapes me at the moment.

Last edited by knc1; 08-28-2016 at 10:22 AM.
knc1 is offline   Reply With Quote
Reply

Tags
external, input device, keyboard, otg, pw3


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
OTG support Kumabjorn Kindle Developer's Corner 73 05-05-2024 11:24 AM
USB OTG Mouse Support and page turn on PW3(possible KV/KOA) lucida Kindle Developer's Corner 104 01-01-2022 01:21 AM
[Progress] Jailbreaking Kindle 4.0 (Touch/No Keyboard) yifanlu Kindle Developer's Corner 434 04-22-2016 11:29 AM
CC and USB/OTG support GEB Calibre Companion 2 05-30-2015 01:24 PM
ebook android readers and usb host - otg support sasimako Which one should I buy? 4 02-18-2015 07:26 AM


All times are GMT -4. The time now is 12:07 PM.


MobileRead.com is a privately owned, operated and funded community.