03-11-2019, 12:09 PM | #16 |
Wizard
Posts: 4,465
Karma: 6900052
Join Date: Dec 2009
Location: The Heart of Texas
Device: Boox Note2, AuraHD, PDA,
|
Funny, if I just switch between your two images, I get a portrait or landscape looking display - even with no G-sensor or rotation involved.
Last edited by Ken Maltby; 03-11-2019 at 12:24 PM. |
03-11-2019, 12:26 PM | #17 |
Zealot
Posts: 128
Karma: 842196
Join Date: Feb 2019
Device: none
|
Thats on purpose, fbink cannot rotate images.
Just switch between the 0), you ll see the values. from # 0) msg "x=`printf "%04d\n" $value`" 1 1; 0) [ $value -lt 15 -a $value -gt -15 ] && fbink -g file=portrait.jpg &>-|| fbink -g file=landscape.jpg &>-;; to 0) msg "x=`printf "%04d\n" $value`" 1 1; # 0) [ $value -lt 15 -a $value -gt -15 ] && fbink -g file=portrait.jpg &>-|| fbink -g file=landscape.jpg &>-;; Should have included fbink, but you can get it from this forum Last edited by BloodRagg; 03-11-2019 at 12:30 PM. |
03-11-2019, 12:37 PM | #18 |
BLAM!
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
It's an ioctl, so, no idea if anyone ever tried to handle ioctls in shell .
EDIT³: You might be able to go through sysfs though (at least on *some* devices, f.g, /sys/class/backlight/mxc_msp430.0/brightness on Mk.7). EDIT: Speaking of the fl & ntx_io. (Missed a new page, yet again ). EDIT²: Fun fact: on the Forma, while the gsensor is still accessible @ event2, you only get raw X/Y/Z coords from there. The computed "misc" rotation events have moved to the ntx events @ event0. Last edited by NiLuJe; 03-11-2019 at 12:46 PM. |
03-12-2019, 04:10 AM | #19 |
Wizard
Posts: 1,615
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
|
|
03-12-2019, 01:26 PM | #20 | |||
Zealot
Posts: 128
Karma: 842196
Join Date: Feb 2019
Device: none
|
Quote:
ioctl is used in android toolbox, so i dl the source https://gfiber.googlesource.com/vend...ource/toolbox/ Dumped everything out except ioctl and i can enable the light with: ioctl /dev/ntx_io 241 0 and turn it off with: ioctl /dev/ntx_io 241 for some reason i cannot set the brightness. My luck that id stumble on this thread after that whole escapade: https://www.mobileread.com/forums/sh...d.php?t=200706 Quote:
Quote:
You'd think the HD was the prototype that later became the H20. Its not like they cut corners and changed the hardware ... at least from what i've seen. Last edited by BloodRagg; 03-12-2019 at 02:42 PM. Reason: Added ioctl.zip |
|||
03-12-2019, 01:40 PM | #21 |
cosiñeiro
Posts: 1,271
Karma: 2200049
Join Date: Apr 2014
Device: BQ Cervantes 4
|
I think that's a matter of firmware. Old kernel 2.6 didn't expose the g_sensor as an input device. Probably newer firmwares switched to a newer kernel where that driver is enabled. Not sure about the firmwares but I bet you're on kernel 3.0.2x.
light controller should be exposed too as a sysfs node (on /sys/class/backlight or /sys/class/platform). |
03-12-2019, 02:39 PM | #22 | |
Zealot
Posts: 128
Karma: 842196
Join Date: Feb 2019
Device: none
|
Quote:
(pmic is the powerled) --- [root@(none) ~]# uname -a Linux (none) 2.6.35.3-850-gbc67621+ #1041 PREEMPT Thu Dec 22 16:01:10 CST 2016 armv7l GNU/Linux [root@(none) ~]# find /sys -iname 'backlight*' [root@(none) ~]# find /sys -iname 'platform' /sys/devices/platform /sys/bus/platform [root@(none) ~]# find /sys -iname '*_light*' /sys/devices/platform/pmic_light.1 /sys/bus/platform/devices/pmic_light.1 /sys/bus/platform/drivers/pmic_light /sys/bus/platform/drivers/pmic_light/pmic_light.1 [root@(none) ~]# --- Last edited by BloodRagg; 03-12-2019 at 02:48 PM. |
|
03-13-2019, 05:16 AM | #23 |
Wizard
Posts: 1,615
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
|
That's all the same as mine. Well, except my specific kernel wasn't compiled at the same time:
Code:
Linux (none) 2.6.35.3-850-gbc67621+ #3032 PREEMPT Mon Jan 9 13:37:40 CST 2017 armv7l GNU/Linux Oh, looks like the Forma even uses 4.x. https://github.com/kobolabs/Kobo-Reader/tree/master/hw I don't see any newer kernels for older devices though. Last edited by Frenzie; 03-13-2019 at 05:26 AM. |
03-13-2019, 12:58 PM | #24 |
BLAM!
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
I suspect each new Mk. generation got a new kernel, with perhaps a few device-specific tweaks here and there.
But yeah, basically what you get on launch day is what you'll get, period . |
03-13-2019, 03:00 PM | #25 |
Zealot
Posts: 128
Karma: 842196
Join Date: Feb 2019
Device: none
|
Well at least i got updates on the same kernel, i think i started out with 2.6.18.
My padlock is almost done, only thing left is to call it when the screen wakes up from its slumber. So i was thinking: 1. detect screen wakeup 2. pause koreader/reader.lua processes 3. call padlock 4. resume koreader/reader.lua processes. then off to luks disk encryption @pazos if i can muster up the energy, how long would a build from scratch take ? u-boot, kernel, busybox+base environment, e2fsprogs, cryptsetup (+dependencies) or install arch for arm (but i recall you said it was problematic ) Last edited by BloodRagg; 03-13-2019 at 03:06 PM. |
03-13-2019, 04:31 PM | #26 |
cosiñeiro
Posts: 1,271
Karma: 2200049
Join Date: Apr 2014
Device: BQ Cervantes 4
|
@Frenzie: the kernel update was only a guess based on my (old) tinkering with that specific model. I still got one unit (with broken IR) running as a clock/weather panel. Since I can't get events from event1 (the touchscreen) I explored all the possibilities to generate inputs. Never noticed an "event2" so I though, ok, this is maybe a new kernel. It seems that I'm wrong.
@BloodRagg: if your time is limited then please repurpose stock os, if not the easiest way is building with buildroot with your local patches/branchs for specific package changes. Pleaste take in mind: you need uboot only if you want to experiment with external booting (keeping compatibility with stock os) or you want to nuke the factory reset procedure. you need the kernel only if you want to add a specific driver (like usb host support). be my guess trying to install a new linux distro, but you'll need a devtmpfs enabled kernel, or somewhat create yourself device nodes and skip hotplug entirely. If you want to distribute your work for others I will try to keep the changes at the minimum (repurposing most of stock os) and provide the neccesary patches as a KoboRoot.tgz, so you provide free software and not blobs that are shady or ilegal to share online. Uboot topics: https://www.mobileread.com/forums/sh...d.php?t=200772 https://www.mobileread.com/forums/sh...d.php?t=289206 Kernel topic: https://www.mobileread.com/forums/sh...d.php?t=285266 Rootfs topic (the kind of problems you'll face with udev): https://www.mobileread.com/forums/sh...41#post2854241 The clock I'm running in my Aura HD (without wood frame) https://www.mobileread.com/forums/sh...d.php?t=284784 |
03-14-2019, 03:27 AM | #27 |
Zealot
Posts: 128
Karma: 842196
Join Date: Feb 2019
Device: none
|
@pazos
Thanks, Im thinking of compiling u-boot from the latest upstream source. At least compile it with ext4 and mboot so it can boot zImage from the rootfs instead. That would allow for a bigger kernel and some proper experimenting. Afaict it would be possible to compile the latest kernel and make it work,but then again I'm no expert I've dissected the boot.img (that not so empty space before partition 1) and I can unpack and repack it. (running a clean version now). But i need some more firmwares to create a proper tool. At least one thats not specific for the AuraHD alone. Any idea where i can get a hold of a couple ? EDIT: I can repack an entire firmware image to 125MB compressed. Although i need a tweak to let it one-time boot into the recovery image. Last edited by BloodRagg; 03-14-2019 at 03:33 AM. |
03-14-2019, 12:12 PM | #28 | |
cosiñeiro
Posts: 1,271
Karma: 2200049
Join Date: Apr 2014
Device: BQ Cervantes 4
|
Quote:
Loading a kernel from a partition is A BAD IDEA because partitions can become corrupt and you'll need to replace the sdcard to be able to boot the device. IMHO it is a BAD IDEA to release something that you cannot test yourself. uboot is at offset 0x0(you have 512kb to tinker with), uboot environment is at 768k(128kb, but can grow to 256kb), kernel is at 1m (you have 3mb to tinker with). If you want to tinker with low level stuff you probably want a serial com to catch bootloader & kernel messages. I don't see the point you're trying to achieve, but go ahead. Aaaand if you release something please do it just for devices with a removable internal sdcard and put a big red alert saying "this can soft-brick your device to a state where you will need to open it, and replace the internal sdcard to recover). I think I provided all the info I have for these kind of things, please look again at the threads I linked and the github commits I send you privately. Good luck and have fun |
|
03-15-2019, 01:05 PM | #29 |
Zealot
Posts: 128
Karma: 842196
Join Date: Feb 2019
Device: none
|
@pazos, thanks and i will
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Feature Request: Lock Column | CRussel | Calibre | 31 | 02-11-2018 03:25 AM |
Screen Lock | sherbearjt08 | Nook Developer's Corner | 1 | 06-17-2011 03:57 PM |
Feature Request: Touch Screen Usage | ghostyjack | EPUBReader | 3 | 08-03-2010 07:29 AM |
Feature Request: Lock Metadata | carpii | Calibre | 3 | 02-27-2010 04:34 PM |
PRS-300 Who uses the lock feature? | icemncmth | Sony Reader | 11 | 01-23-2010 11:42 AM |