Better kobo support#238
Open
pcouy wants to merge 9 commits intormkit-dev:masterfrom
Open
Conversation
- Add kobo/ output dir to .gitignore - Fix `make remux_docker` and other similar targets for kobo => Build is a lot faster than rebuilding everything everytime
Updated the kobo wrapper script. Before this, I would sometimes have 2 remux instances running at the same time when testing, which caused weird issues. This is kind of a dirty hack that was quicker than finding the root cause
Before this, when sending commands through the API, stdout would fill with exceptions with the call eventually working. After a few calls, remux would crash. Changed the locking logic in `TaskQueue`, mainly by repurposing `task_m` (which I could not find the purpose of, or anywhere in the code that acquired this lock) to prevent having more than 1 task thread running at a time.
Updated method signatures for all backends, only implemented it for FBInk
Done by grabbing the inputs on first launch and releasing them only after the nickel process is running. Context : I added a modified version of koreader.sh to my remux, which does not kill nickel before launching koreader. The goal is to seamlessly switch between nickel and koreader, and to use bluetooth on y Elipsa 2E without fearing a wipe on my /mnt/onboard if I accidentaly restart nickel instead of rebooting the e-reader. This introduced an issue where koreader would not handle rotations or the power button because nickel grabs these devices and never releases them. WARNING : I have only tested this on my Kobo Elipsa 2E (Condor), this may break on other devices. Not sure why input grabbing was disabled by the preprocessor for Kobo target, but disabling it did not break anything on Condor. I also needed to add the `gpio` device to inputs, which emits orientation change events on my Condor. The `EV_MSC` + `MSC_RAW` filter might match other input devices on other e-readers. I think this would be harmless anyway, but is worth checking before merging
After commit 2fd7055 most apps would not build for the kobo target. Example build output below : ``` $ TARGET=kobo DOCKERFILE=Dockerfile.kobo FBINK=1 make harmony_docker CXX=arm-kobo-linux-gnueabihf-g++ okp -sh -ig "RMKIT_IMPLEMENTATION" -ns -ni -for -d ../.rmkit.h_cpp/ -o ../build/rmkit.h rmkit.cpy ../build/stb.arm.o -- -D"KOBO=1" -D"RMKIT_IMPLEMENTATION" -ldl -pthread -lpthread -fdata-sections -ffunction-sections -Wl,--gc-sections -L/rmkit/src/vendor/FBInk/Release -l:libfbink.a -D"RMKIT_FBINK=1" -O2 -static -static-libstdc++ -static-libgcc compile flags: -DKOBO=1 -DRMKIT_IMPLEMENTATION -ldl -pthread -lpthread -fdata-sections -ffunction-sections -Wl,--gc-sections -L/rmkit/src/vendor/FBInk/Release -l:libfbink.a -DRMKIT_FBINK=1 -O2 -static -static-libstdc++ -static-libgcc missing file: ../shared/proc.h missing file: ../shared/string.h generating single header /rmkit/src/rmkit/../build/rmkit.h MISSING FILE! /rmkit/src/.rmkit.h_cpp/shared/proc.h MISSING FILE! /rmkit/src/.rmkit.h_cpp/shared/string.h compiled into /rmkit/src/.rmkit.h_cpp missing file: ../shared/proc.h missing file: ../shared/proc.h missing file: ../shared/proc.h missing file: ../shared/proc.h missing file: ../shared/proc.h missing file: ../shared/proc.h missing file: ../shared/proc.h missing file: ../shared/string.h make[2]: Leaving directory '/rmkit/src/rmkit' make[1]: Leaving directory '/rmkit/src/rmkit' cd src/harmony && make make[1]: Entering directory '/rmkit/src/harmony' make compile_kobo make[2]: Entering directory '/rmkit/src/harmony' make[3]: Entering directory '/rmkit/src/vendor/FBInk' make[3]: Nothing to be done for 'staticlib'. make[3]: Leaving directory '/rmkit/src/vendor/FBInk' CXX=arm-kobo-linux-gnueabihf-g++ okp -ig "RMKIT_IMPLEMENTATION" -ns -ni -for -d ../.harmony_cpp/ -o ../build/harmony main.cpy ../build/stb.arm.o -- -D"KOBO=1" -D"RMKIT_IMPLEMENTATION" -ldl -pthread -lpthread -fdata-sections -ffunction-sections -Wl,--gc-sections -L/rmkit/src/vendor/FBInk/Release -l:libfbink.a -D"RMKIT_FBINK=1" -Wno-psabi -O2 -static -static-libstdc++ -static-libgcc compile flags: -DKOBO=1 -DRMKIT_IMPLEMENTATION -ldl -pthread -lpthread -fdata-sections -ffunction-sections -Wl,--gc-sections -L/rmkit/src/vendor/FBInk/Release -l:libfbink.a -DRMKIT_FBINK=1 -Wno-psabi -O2 -static -static-libstdc++ -static-libgcc arm-kobo-linux-gnueabihf-g++ -c /rmkit/src/.harmony_cpp/main.cpp -o /rmkit/src/.harmony_cpp/main.o -DKOBO=1 -DRMKIT_IMPLEMENTATION -ldl -pthread -lpthread -fdata-sections -ffunction-sections -Wl,--gc-sections -L/rmkit/src/vendor/FBInk/Release -l:libfbink.a -DRMKIT_FBINK=1 -Wno-psabi -O2 -static -static-libstdc++ -static-libgcc In file included from /rmkit/src/.harmony_cpp/main.cpp:3: /rmkit/src/.harmony_cpp/../build/rmkit.h: In lambda function: /rmkit/src/.harmony_cpp/../build/rmkit.h:22492:22: error: 'proc' has not been declared 22492 | auto procs = proc::list_procs(bins); | ^~~~ missing file: stb_image.h missing file: stb_image_resize.h Couldn't compile /rmkit/src/.harmony_cpp/main.cpp aborting compiled into /rmkit/src/.harmony_cpp make[2]: *** [../actions.make:42: compile_kobo] Error 1 make[2]: Leaving directory '/rmkit/src/harmony' make[1]: Leaving directory '/rmkit/src/harmony' make[1]: *** [../actions.make:11: compile] Error 2 make: *** [Makefile:18: harmony] Error 2 ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This branch contains a few tweaks I implemented after trying rmkit (more specifically remux) on my Elipsa 2E. The commits can be grouped into a few categories :
perform_redraw(...)to have an optional second boolean parameter to control screen flashing with FBInk, and using it when showing/hiding remux. This fixed ghosting for meThis is a lot of different things, but I tried to make each commit as atomic as possible, and wrote detailed commit messages when the commit changed more than a couple of lines. I hope this helps with the review.
If needed, I can make a separate branch with only the commits you want to merge.