Commit Graph

93 Commits (7210fb478d8d0c6aa5bb8e0ae3e0fc67dd730874)

Author SHA1 Message Date
NiLuJe 7210fb478d
Faster blitting @ BB8/BBRGB32 when no processing is needed (#4847)
* Pickup the eponymous blitting performance tweaks from koreader/koreader-base#878
* Cleanup BitOpts usage (require & cache)
* Unify oddness checks (MOD -> AND)
* Enforce the native Portrait orientation on Kobo (except @ 16bpp, i.e., KSM w/ 8bpp swap disabled), to allow for faster blitting when unrotted.
* Switch CRe BB to 32BPP on color screens
* Minor cleanups
5 years ago
NiLuJe 90df2f1997
Fix fb rotation on the Forma w/ KSM (#4779)
* Enforce Portrait rotation on the Forma *everywhere*, KSM included.
KSM is currently emulating a bogus rotation, which causes issues with
FBInk, but also happens to be insidiously quirky in weird corner-cases.
5 years ago
NiLuJe 7c2df53808
Update FBInk (#4765)
* Add a bit of logging before fbdepth calls, to make the progression
easier to grasp.
* Bump base (pickup FBInk update)
5 years ago
NiLuJe bb3f49a566 [feat, Kobo] On Kobo, drop fb to 8bpp on startup (#4637)
* The Great 8bpp Experiment

Swap to 8bpp on Kobo, because we're 'effing grayscale, for pete's sake!

* Always swap to 8bpp, no matter the launch method.

Because it turned out that, even when restarting Nickel, we had to
restore the expected bitdepth ourselves, because pickel/Nickel didn't do
the job completely.

(I'm going to guess the grayscale flag wasn't getting flipped properly).

* Dither every non-transparent icon to the eInk palette

* Make sure hasBGRFrameBuffer is only enabled when the Kobo fb actually is
@ 32bpp...

* Re-process badly grayscaled icons

* And re-grayscale that one w/ gamma correction so the squares show up
better.

* Allow the fbdepth switch to be disabled (in Developer settings).

Also, allow setting debug mode that way.

Also, forcibly disable verbose logging when disabling debug.

* Update setting name to piggyback on the existing check in reader.lua

* Update icons postprocessing info
5 years ago
NiLuJe f6743a45db
Proper Forma support (#4414)
* Enforce a known rotation on startup, to make sure we handle touch input coordinates properly.
* Proper FrontLight warmth support (thanks to @cairnsh & @pazos in #4291)!
* Fix the PageTurn buttons mapping to match Nickel's defaults
* Properly remap PageTurn buttons depending on the current rotation.
* Actually enable the Mk.7 screen refresh codepath on *all* Mk.7 devices (I'd messed up the device check...).
* Full accelerometer handling (includes a touch of refactoring regarding orientation handling in general).
* Fix insidiously broken USBMS behavior in Nickel after we exit on FW >4.8.

Fix #4291
Fix #3002
5 years ago
NiLuJe ababbd7aad
Enhanced visual feedback around tar & zsync! (#4194)
* Move Kindle scripts to FBInk
* Proper progress bars around tar invocations
* Spinner during zsync processing
6 years ago
NiLuJe 0924b57877
Tweak/unbreak my CPUFreq experiment (#4119)
* Only switch to ondemand when we actually can, and when it's better than the current governor...
  This potentially leaves Mk.5 in the lurch, but there's no perfect solution there :/.

* Switch to UI for the unmark event of navigation hints markers
Might help on non-REAGL devices, and doesn't hurt there (re #3983).

* Switch SQLite DBs to WAL
Sounds nice in theory, behaves fine in practice.
6 years ago
NiLuJe b509e54a2a
CPUFreq shenanigans on Kobo (#4114)
* Switch to ondemand CPUFreq governor on Kobo

My H2O boots with the userspace (!!) governor...
Note that the hardware appears to blissfully ignore any of this, because
the stats still show the CPU changing state on its own...
6 years ago
NiLuJe 6835c18ee6
Re-exec startup script on Kindle/Kobo when an OTA update is processed on startup (#4062)
So that we may properly pickup potential updates to the startup script
itself.
6 years ago
NiLuJe 4ffd959df4
Handle OTA updates during the restart loop on Kobo/Kindle (#4049)
* Handle OTA updates during the restart loop on Kobo/Kindle

So we can actually process OTA updates without ever truly exiting
KOReader (i.e., via the "Restart KOReader" menu entry) ;).
6 years ago
NiLuJe 8089d916a5
Visual feedback around tar/zsync on Kobo during OTA updates (#4043)
* With a bonus version normalizer fix.
  * And a zsync bump/fix to avoid softlocks with OpenStack HTTP frontends (also, pull those from the OTA mirror list).
6 years ago
NiLuJe e2a0929c51
Better KOA2 support (#4037)
* Better KOA2 support
    * Fix FL
    * Add physical pageturn keys
    * Add accelerometer support
* Possibly better NaturalLight handling on the Clara
* Fix WiFi module name used in some(?) Mk7 Kobos
* A bunch of kodev fixes
6 years ago
NiLuJe 18db509325 Assorted bag of fixes (#4014)
* Link to the WiKi, it's a bit more explainy ;).

* More WiFi trickery for some HW revs

* Fix Rev2 detection under KSM

That's to future-proof it, the other end of this hasn't made it into
current KSM build yet.

* Resync nickel.sh w/ current rcS

We don't have CPU, but we have PLATFORM, which is based on CPU, so,
that'll do :).

* Go back to using rmmod instead of modprobe -r

Functionally identical on current FW, will potentially avoid getting
outsmarted by modprobe if Kobo ever deigns shipping an actually usable
Linux system one day...

* Don't crash if screensavers directory doesn't exist

c.f., https://www.mobileread.com/forums/showpost.php?p=3706979&postcount=2919
6 years ago
NiLuJe e3b7524d9c Another round of Kobo Fixes (#3939)
* Trim unneeded stuff from startup script

I was somehow convinced I'd already done that...
While we're there, explain why we need to siphon those specific vars

* Fix a stray eth0

-> $INTERFACE

* Be very very sure we have INTERFACE set in our env

re #3936

* Make getFirmwareVersion less fragile on Kobo

Not that we actually use it right now, but, still. :D

* Use the same syntax as the PRODUCT check

* Actually implement getProductId

Instead of a stray c/p ^^

* Properly identify the Rev2/Mark7 variants of existing devices

Namely, the H2O² and Aura SE
Not that the H2O²r2 support is still broken, this just allows us to
implement it cleanyl without breaking handling of the original H2O²

re #3925

* Tweak sleeps a bit around Kobo WiFi modules...

See if that jog things up (re #3936)

* Try harder not to suspend with WiFi on on Kobos

Because otherwise, things go boom. (re #3936)
6 years ago
mezzarobba a3e16b3920 [fix] make wifi control work with my Kobo Touch N905 (#3920) 6 years ago
NiLuJe 3f92525ec7 Fix WiFi on Kobo (#3891)
Regression after bdb82d09c1
TL;DR: That thing is race-y as hell.

The more I play with Kobos, the more it feels like the whole thing's
held together by pieces of fraying strings...
6 years ago
NiLuJe a36407080b Don't use a square icon on Kobo (#3889)
We ship it for use with fmon, and that means it gets processed by
Nickel, which expects an optimal AR of 0.75
6 years ago
NiLuJe bdb82d09c1 [chore] A round of Kobo specific script cleanup (#3876)
* Flag those scripts as executable in git

Somewhat irrelevant because we'll end up living on a FAT32 drive, but,
still.

* Cleanup Kobo startup script

Support KFMon >= 0.9.5

Don't siphon PRODUCT from nickel, it's exported by rcS, so fmon/KFMon
already inherit it.
Siphon NICKEL_HOME, on the off-chance nickel fails to figure that one
out for itself on restart.
Siphon LANG (This may be a terrible idea, rcS sets LANG to en_US.UTF-8,
while we set LC_ALL to en_US.UTF-8, but I don't know if nickel itself
ever updates LANG, since I have mine set to en_US also ;)).
My secret hope if that everything's working as it should and this ensures
we default to Nickel's locale on fresh installs?

Remove the extra sync on startup, both @Baskerville's fmon and KFMon are
smart enough not to do anything overly stupid, and recent FW versions
have a slightly more resilient DB anyway (rollback journal -> WAL).
This effectively shaves over a second off our startup time.

* Slimmed down the nickel restart script.

Based on current rcS
Scrapped a bucketload of irrelevant & legacy crap, since we're never
bootstrapping nickel, only restarting it.

* Update Kobo install instrcutions.

Point to KSM09, @Baskerville's fmon, and KFMon.
Deprecate legacy fmon, and as such, stop shipping a useless KoboRoot
tarball.
6 years ago
Hzj_jie 30378eb2a8 Add restart koreader function and ensure FlushSettings event can be delivered to all widgets (#2772) 7 years ago
Frans de Jonge 1850ebca0d (chore) koreader.sh: remove 32-bit workaround
Final fix for #2502.
7 years ago
Qingping Hou d1cc3bd6c2 ota(fix): always purge ota update files 7 years ago
a-kohout 870c4d3859 Update koreader.sh; fixes #2791
tar fails to apply permissions on fat32 filesystem. thus mv doesn't get executed and consequently OTA package gets applied on every launch.
7 years ago
Frans de Jonge 0eec5b5174 Simplify koreader.sh
`-C "${KOREADER_DIR}"` isn't needed, see https://github.com/koreader/koreader/issues/2752#issuecomment-293698136.
7 years ago
Frans de Jonge 5de8310aa6 Kobo (koreader.sh): install OTA update in working directory
Thanks to @a-kohout

Fixes #2752
7 years ago
Frans de Jonge e8c01274f4 Travis: enforce shellscript coding style
* enormous coding style update

* update luajit-launcher

All changes are formatting only except for:

* new more correct pushd/popd style
	* keeps useful indentation
	* prevents execution of commands when pushd failed (cf. https://github.com/koalaman/shellcheck/wiki/SC2164 and https://github.com/koalaman/shellcheck/issues/863)

```
pushd some_dir && {
    command1
    command2
} || exit
popd
```
7 years ago
Frans de Jonge e5bcdee85e Add ShellCheck and shfmt shell code quality analysis (#2712)
* Add ShellCheck and shfmt shell code quality analysis

* kobo/koreader.sh: remove useless $PREFIX

* kobo/koreader.sh: fix rotation issue caused by #2731

* Travis: speed up (caching Luarocks should shave a minute off install process)
7 years ago
pazos 3a75b6deab use fullpath for reboot 7 years ago
pazos 31b246574b Kobo framebuffer: workaround to support +4.0FW 7 years ago
Qingping Hou c34e04e081 wifi(fix): use -D wext for kobo wpa_supplicant 7 years ago
Qingping Hou 6b50a2783b kobo(fix): load wifi module by ENV
Aura One uses 8189fs instead of dhd module
7 years ago
Martín Fernández 79fd02e020 Kobo: remove useless error messages from ntx_hwconfig 7 years ago
Qingping Hou f95ad00b9e feat: add logger module & rewrite kobo suspend script in lua 7 years ago
poire-z 65881738b5 disable-wifi.sh: decreased sleep duration 8 years ago
Qingping Hou 744115de9f crash.log(fix): obviously I suck at counting zeros 8 years ago
poire-z 08a92de179 Fix: avoid system hang when disabling wifi (#2394) 8 years ago
Qingping Hou b7cdf103e3 chore: fix luacheck error & add comment to release-ip.sh 8 years ago
Hzj_jie 8e5f294902 Return correct result from koreader.sh 8 years ago
Qingping Hou efae2ed16f network(fix): automaticallly obtain IP if network is already authenticated 8 years ago
Qingping Hou 705d3e4cb4 doc(minor): document alternative usb plug event source for kobo 8 years ago
Qingping Hou 0ed95406a4 log(fix): do not pipe stdout to /dev/null during crash log rotation 8 years ago
Qingping Hou 5309a0a47f misc: rotate crash.log for kobo/kindle/pocketbook 8 years ago
Qingping Hou c716fef0e3 minor: change wording in restore-wifi-sync script 8 years ago
Hzj_jie 52bcf87643 always release ip before obtaining a new one 8 years ago
Hzj_jie da2c57f93a Automatically connect WIFI after Kobo has been resumed (#2215)
* Add bash scripts to control WIFI / IP, so we can share them with frontend/device/kobo/device.lua.

* add test cases
8 years ago
NiLuJe 2013a66fdd Some more Kobo suspend tweaks...
Disable wakeup_count handling, that's often causing more harm than
anything else...
Nickel doesn't even use it, that should have been a hint ;).

Make the logging slightly less confusing.
Add commented out debug features (dumping relevant dmesg output).

Re #2188
8 years ago
NiLuJe 0f184e30ed Tweak nickel restart script
Also restart sickel...
8 years ago
NiLuJe 892e3c0f1e Kobo startup script tweak.
When using KFMon, make the reboot on exit user-configurable.
The user can now choose to try to restart Nickel directly, like with
fmon.
For now, we still do a full reboot by default.
8 years ago
Frans de Jonge 8643d38a68 Removed some bashisms 8 years ago
NiLuJe e90f1018db Make the KFMon chekc actually accurate...
Sleep does wonder for your brain!
8 years ago
NiLuJe b406e3591f Update Kobo startup script for KFMon
Takes care of some potentially critical stuff ;p
8 years ago