Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 03-11-2019, 12:09 PM   #16
Ken Maltby
Wizard
Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.
 
Ken Maltby's Avatar
 
Posts: 4,331
Karma: 6272771
Join Date: Dec 2009
Location: The Heart of Texas
Device: JetBook Lite (retired), 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.
Ken Maltby is offline   Reply With Quote
Old 03-11-2019, 12:26 PM   #17
BloodRagg
Connoisseur
BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.
 
Posts: 72
Karma: 1342
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.
BloodRagg is offline   Reply With Quote
Old 03-11-2019, 12:37 PM   #18
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 8,428
Karma: 11335577
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O & Forma
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.
NiLuJe is offline   Reply With Quote
Old 03-12-2019, 04:10 AM   #19
Frenzie
Guru
Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.
 
Posts: 602
Karma: 115142
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Quote:
Originally Posted by BloodRagg View Post
Unless mine is different then all others, its in there.
/dev/input/event2
He did say "afaik". My H2O doesn't have an event2 in any case.
Frenzie is offline   Reply With Quote
Old 03-12-2019, 01:26 PM   #20
BloodRagg
Connoisseur
BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.
 
Posts: 72
Karma: 1342
Join Date: Feb 2019
Device: none
Quote:
Originally Posted by NiLuJe View Post
It's an ioctl, so, no idea if anyone ever tried to handle ioctls in shell .
Compiled it and it works more or less, not that great. Its missing something
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:
Originally Posted by NiLuJe View Post
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).
AuraHD doesnt have any brightness that responds afai tested it.

Quote:
Originally Posted by NiLuJe View Post
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.
What would be the reason, except only having to read out event0 ?

Quote:
Originally Posted by Frenzie View Post
He did say "afaik". My H2O doesn't have an event2 in any case.
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.
Attached Files
File Type: zip ioctl.zip (11.0 KB, 9 views)

Last edited by BloodRagg; 03-12-2019 at 02:42 PM. Reason: Added ioctl.zip
BloodRagg is offline   Reply With Quote
Old 03-12-2019, 01:40 PM   #21
pazos
cosiñeiro
pazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watch
 
Posts: 104
Karma: 10628
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).
pazos is offline   Reply With Quote
Old 03-12-2019, 02:39 PM   #22
BloodRagg
Connoisseur
BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.
 
Posts: 72
Karma: 1342
Join Date: Feb 2019
Device: none
Quote:
Originally Posted by pazos View Post
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).
I get your point, but im on 2.6.35.3-850-gbc67621+. So i do not know how that piece would fit.


(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.
BloodRagg is offline   Reply With Quote
Old 03-13-2019, 05:16 AM   #23
Frenzie
Guru
Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.
 
Posts: 602
Karma: 115142
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
@pazos When did they change the kernel? It's been 2.6 for an eternity.

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.
Frenzie is offline   Reply With Quote
Old 03-13-2019, 12:58 PM   #24
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 8,428
Karma: 11335577
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O & Forma
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 .
NiLuJe is offline   Reply With Quote
Old 03-13-2019, 03:00 PM   #25
BloodRagg
Connoisseur
BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.
 
Posts: 72
Karma: 1342
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.
BloodRagg is offline   Reply With Quote
Old 03-13-2019, 04:31 PM   #26
pazos
cosiñeiro
pazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watch
 
Posts: 104
Karma: 10628
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
pazos is offline   Reply With Quote
Old 03-14-2019, 03:27 AM   #27
BloodRagg
Connoisseur
BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.
 
Posts: 72
Karma: 1342
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.
BloodRagg is offline   Reply With Quote
Old 03-14-2019, 12:12 PM   #28
pazos
cosiñeiro
pazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watch
 
Posts: 104
Karma: 10628
Join Date: Apr 2014
Device: BQ Cervantes 4
Quote:
Originally Posted by BloodRagg View Post
@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.
You need a uImage (with headers and crc), not a bzImage. If by upstream you mean a kernel released for kobo, then yes it should work. If you mean a vanilla kernel from kernel.org then noooop.

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
pazos is offline   Reply With Quote
Old 03-15-2019, 01:05 PM   #29
BloodRagg
Connoisseur
BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.BloodRagg is no ebook tyro.
 
Posts: 72
Karma: 1342
Join Date: Feb 2019
Device: none
@pazos, thanks and i will
BloodRagg is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 12:09 AM.


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