Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cervantes tweaks #4588

Merged
merged 5 commits into from Feb 16, 2019

Conversation

Projects
None yet
4 participants
@pazos
Copy link
Contributor

pazos commented Feb 14, 2019

  • Move Cervantes 4 to frontlight mixer, like Kobo Forma and Kobo Clara HD.
  • Fix waiting spinner (fallback to sleep in devices where usleep is not present)
  • USB storage support for KOReader, using a thirdparty tool.
  • Allow installation of dicts from the external partition.

I don't want to spend time building safemode as part of koreader so I made a runtime check. USB storage settings and actions are only displayed on devices if 3rd party tools are recent enough to work with KO.

Once this PR is merged I will update the tool and write specific instructions to enable mass storage on mobileread 馃憤

pinging @avsej for feedback (specially about frontlight/natural light changes),

@avsej

This comment has been minimized.

Copy link
Contributor

avsej commented Feb 14, 2019

@pazos thanks for Frontlight fix 馃憤 . Everything works

I had feeling that koreader sets up levels somehow different from stock application, but because I only used stock app for about half an hour, I ignored that feeling :)

@@ -0,0 +1,56 @@
local Device = require("device")

This comment has been minimized.

@Frenzie

Frenzie Feb 14, 2019

Member

This just randomly seems to be here?

This comment has been minimized.

@pazos

pazos Feb 15, 2019

Author Contributor

yup,

leftovers from UsbGadget copy/paste.
I moved the file to ui/elements/mass_storage.lua, since it has nothing to do with device abstraction

@@ -30,7 +30,7 @@ fi
#SPINNER="鈻 鈻 鈻 鈻 鈻 鈻 鈻 鈻"
while :; do
for spin in ${SPINNER}; do
usleep 500000
usleep 500000 2>/dev/null || sleep 0.5

This comment has been minimized.

@Frenzie

Frenzie Feb 14, 2019

Member

I'm actually somewhat surprised that the BusyBox for Kobo supports fractional sleep.

This comment has been minimized.

@NiLuJe

NiLuJe Feb 14, 2019

Member

Yeah, for reference, to recap what was said on gitter:

  • usleep is an "all or nothing" applet
  • fractional sleep support is optional

FW 2.x (and possibly 3.x, too) on Kindle builds busybox with usleep, but without fractional sleep support ;).

@pazos pazos force-pushed the pazos:cervantes_tweaks branch 2 times, most recently from ecc679b to 0b63177 Feb 15, 2019

@@ -95,7 +101,7 @@ while [ "${RETURN_VALUE}" -ge "${RESTART_KOREADER}" ]; do
find /mnt/public/dict -type f -exec mv -v \{\} /mnt/private/koreader/data/dict \; 2>/dev/null

# run KOReader
./reader.lua "${args}" >>crash.log 2>&1
./reader.lua -d "${args}" >>debug.log 2>>crash.log

This comment has been minimized.

@Frenzie

Frenzie Feb 15, 2019

Member

That can be quite a few unnecessary writes on an SD card though (as a default), depending on what kind of internal memory it has.

This comment has been minimized.

@pazos

pazos Feb 15, 2019

Author Contributor

I have no idea about internal storage. Seems the same as other ntx boards (soldered? sdcard).

The partition where KOReader lives is ext3 mounted with noatime. Since it is a debian system there are quite a few logs already and they're not using tmpfs.

But yeah, you're right "-d" probably shouldn't be the default setting.

@pazos pazos force-pushed the pazos:cervantes_tweaks branch from 0b63177 to 3bd11ca Feb 16, 2019

@pazos pazos force-pushed the pazos:cervantes_tweaks branch from 3bd11ca to bc8ee00 Feb 16, 2019

@Frenzie
Copy link
Member

Frenzie left a comment

Could you rebase the changes into the relevant commits and then rebase & merge here on GH?

@pazos pazos force-pushed the pazos:cervantes_tweaks branch from db2364c to 33aa25c Feb 16, 2019

@pazos pazos merged commit de6b637 into koreader:master Feb 16, 2019

1 check passed

ci/circleci Your tests passed on CircleCI!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.