New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theoretical Kindle KOA2 & Kobo Mark7 eink framebuffer support #688

Merged
merged 36 commits into from Jun 21, 2018

Conversation

Projects
None yet
3 participants
@NiLuJe
Member

NiLuJe commented Jun 17, 2018

The Mark7 kernel(s?) appears to have kept a degree of backward compatibility in place (I'm guessing because pickel sucks and no-one wants to touch it with a ten-foot pole to update it).

The KOA2, on the other hand, massively broke backward compat, going so far as re-ordering the waveform update modes....

Fortunately, our code was already modular enough that handling these two cases of precious snowflake syndrome were fairly straightforward once the headers were updated.

The headers change were tested w/ FBInk first. There are no changes for Kindle support, for Kobo, we needed to change a few names, but that's it.

Tested on my Mark5 (H2O), and nothing appears to have been broken.


The KOA2 code is 'live', since support for this device is already broken because of missing HW information.

The Mark7 code is commented out, because those device do appear to work with the current codepath for now.

In any case, I'll need strace logs on both fronts to make sure it's correct.

NiLuJe added some commits Jun 17, 2018

Update Kobo mxcfb header
(Up to H2O²r2)
Update Kobo framebuffer code to latest headers
And dry-code a Mk7 codepath. Which is commented out for now, until we
get an actual strace of Nickel to confirm a number of assumptions.
Dry code KOA2 fb handling
Here be giant hungry dragons.
Untested, with 0 data to back some of the assumptions made here...
Not commented out, since we don't entirely support other bits of the
KOA2 HW to begin with anyway...
Simplify _isREAGLWaveFormMode
Because it threatened to become another ifthenelse mess, while we
already have a centralized point to do that ;).
@NiLuJe

This comment has been minimized.

Member

NiLuJe commented Jun 17, 2018

Of course luacheck doesn't like unused functions, but, hey, that was the point ;).

@Frenzie

Looks pretty annoying.

@Frenzie

This comment has been minimized.

Member

Frenzie commented Jun 18, 2018

Just tell it to ignore. :-)

@NiLuJe

This comment has been minimized.

Member

NiLuJe commented Jun 18, 2018

Good point, will do ;p.

@NiLuJe

This comment has been minimized.

Member

NiLuJe commented Jun 19, 2018

Doing a pass on the FFI stuff, because it's a mess.

Please never write those manually, and always use ffi-cdecl (or ask someone to do it for you).
Because right now I have to carefully diff the results to make sure no-one sneaked in stuff manually, and it's a PITA.
Plus, it makes it that much easier to handle updates quickly, as well as catching API/ABI issues.
And, also, it handles data types properly, so we don't use 64bits types on 32bits arches, and vice versa.

@Frenzie

This comment has been minimized.

Member

Frenzie commented Jun 19, 2018

Sorry. 😊

@NiLuJe

This comment has been minimized.

Member

NiLuJe commented Jun 20, 2018

Okay, I think I'm done :).

Quickly tested on my H2O, nothing blew up in my face (FM/ePub/DjVu/PDF/Reflow) ;).

@NiLuJe NiLuJe merged commit 2075a1b into koreader:master Jun 21, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@poire-z

This comment has been minimized.

Contributor

poire-z commented Jun 26, 2018

I get a crash when I try to maximize the emulator:

06/26/18-16:49:06 DEBUG input event => type: 53, code: 6(C), value: cdata<struct SDL_WindowEvent &>: 0x40563860, time: 1530024546.740239
06/26/18-16:49:06 DEBUG input event => type: 53, code: 5(B), value: cdata<struct SDL_WindowEvent &>: 0x40564430, time: 1530024546.740709
./luajit: ./ffi/SDL2_0.lua:112: missing declaration for symbol 'SDL_DestroyTexture'
stack traceback:
        [C]: in function '__index'
        ./ffi/SDL2_0.lua:112: in function 'destroyTexture'
        ./ffi/framebuffer_SDL2_0.lua:38: in function 'resize'
        frontend/device/sdl/device.lua:118: in function 'waitEvent'
        frontend/ui/uimanager.lua:856: in function 'handleInput'

Looks like SDL_DestroyTexture was indeed lost in this cleanup work.

@NiLuJe

This comment has been minimized.

Member

NiLuJe commented Jun 26, 2018

Ouch, nice catch!

I'll fold a fix into #692

NiLuJe added a commit to NiLuJe/koreader-base that referenced this pull request Jun 26, 2018

NiLuJe added a commit that referenced this pull request Jul 1, 2018

Unbreak KOA2 handling (#692)
* Tweak KOA2 mxcfb handling
    Made it more accurate
* Disabled collision_test handling
    Too mysterious, and problematic for KOA2 support.
* Unbreak SDL2 again ;).
    Missed something in #688
* Fix OpenSSL & Evernote rpath

NiLuJe added a commit to NiLuJe/koreader-base that referenced this pull request Jul 18, 2018

Plug missing zmq stuff after koreader#688
Forgot to double-check those -_-"

NiLuJe added a commit that referenced this pull request Jul 19, 2018

Plug missing zmq stuff after #688 (#707)
Forgot to double-check those -_-"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment