01-15-2021, 11:29 AM | #1 |
Junior Member
Posts: 2
Karma: 10
Join Date: Jan 2021
Device: Kobo LibraH2O
|
Need help cross-compiling jq lib for kobo
Oh hello MobileReaders, long time reader, first time poster
I noticed the other day that the KoboCloud plugin seems to have stopped working for me. It only syncs files up to a certain number and then just stops. So, I started poking around the source code and thought to myself, wouldn't this be better if we use the dropbox api instead of relying on a parsing urls from a shared folder url? Couple hours of playing around with the dropbox api and I had something that seemed pretty usable and also supported subfolders. Popped it over to my kobo and no dice. I totally forgot that the Kobo runs arm and one of the dependencies I added was jq, a unix json parser. I added the linux_x86_32 version of the binary to the kobo which wont work and there isn't an official arm binary available currently. I'm a bit clueless when it comes to compiled languages and doubly so when dealing with a limited niche environment like the kobo. Would anyone be able to lend a hand in cross-compiling the Jq library over to work with the kobo? Also open to other ways to deal with JSON from the shell on the kobo. If anyone wanted to see the rough hacky code I was working on, thats in the spoiler below. Basically I hooked into how kobo_cloud works but when it reaches a "url" of `dropbox_token:<some_token>` it runs the dropbox script below. The idea here being you have a dropbox app and all the contents of that app's dropbox folder being synced. Spoiler:
Last edited by jtgrenz; 01-15-2021 at 11:33 AM. |
01-15-2021, 11:45 AM | #2 |
BLAM!
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
jq is bundled in KoboStuff.
I don't recall anything heinous about the compilation process, either for jq itself or oniguruma (the RE lib), it's pretty much smooth sailing via autotools. |
Advert | |
|
01-15-2021, 08:38 PM | #3 |
Junior Member
Posts: 2
Karma: 10
Join Date: Jan 2021
Device: Kobo LibraH2O
|
Oh brilliant! Thanks so much. I just copied the jq binary over and it works like a charm. I'll keep poking around and maybe try to upstream my changes.
|
02-24-2021, 12:03 PM | #4 |
Junior Member
Posts: 1
Karma: 10
Join Date: Feb 2021
Device: Kobo Aura
|
Hi there!
I spent some time trying to make a CozyCloud connector for KoboCloud, thinking it would take me a few hours to modify the Drobpox script. Looong story short, it was way more difficult that I would expect, as I'm a real newbie as a kobo developer. I eventually managed to get a token from a shell script, getting complex a JSON book list, which led me to the same realization (I need jq on my kobo) and to your post. Could you maybe detail a little more where did you find the jq binary and how you installed it? I'd be glad to know if you managed to get your script working. Thanks! |
02-24-2021, 12:17 PM | #5 |
BLAM!
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Have you, err, read my answer above? (Hint: there's a link in it).
|
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compiling C++ on the Kobo Glo | fat265 | Kobo Developer's Corner | 16 | 11-22-2016 08:51 AM |
Help with cross-compiling tools? | brianinmaine | Kindle Developer's Corner | 50 | 10-02-2013 09:42 AM |
Cross compiling for the Kindle - wrong glibc version | ninjageckoattack | Kindle Developer's Corner | 14 | 02-25-2012 04:44 PM |
cross compiling links | dent | Kindle Developer's Corner | 1 | 02-07-2011 08:42 AM |
cross-compiling gstreamer for the kindle3 | dent | Kindle Developer's Corner | 9 | 02-04-2011 08:39 AM |