03-09-2017, 01:17 PM | #1 |
Junior Member
Posts: 4
Karma: 10
Join Date: Mar 2017
Device: Kobo gloHD
|
building Kobo development environment
I want to develop a simple app for the kobo.
It can replace Nickle and is not related to reading boos (it is a sailing app). How do I set a build environment for the Kobo. I have installed the arm cross compiler (arm-linux-gnueabihf-gcc etc) and I can completely compile XCsoar and the build works when installed. At first I though I would modify XCsoar for my needs but..... what a huge piece of confusing software. I have searched for source code to other Kobo programs (koreader, KSM, etc) but none seem to be available as source code. I cannot compile the KoboLabs github code. busybox, glib, libmng fails. I have managed to hack around the glib failure but not the others. But maybe I am on the wrong track. What is the easiest way to create a simple graphics program for the kobo? At first I can make do with the simple display of large fonts in text boxes. |
03-09-2017, 01:42 PM | #2 |
Wizard
Posts: 1,265
Karma: 10203040
Join Date: Dec 2011
Device: a variety (mostly kindles and kobos)
|
Koreader source is on github. Although it probably doesn't qualify as 'simple'.
I haven't tried building the Kobo samples but someone will probably come along in a minute who has. |
Advert | |
|
03-09-2017, 02:07 PM | #3 |
Linux User
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
You can install Debian on the Kobo (in a chroot) that way you could do "native" builds directly on the Kobo itself (but compiling is a lot slower than on PC naturally).
Why do you want to build busybox? You can download a static arm binary from busybox site and it works better for me than Kobo binary. Kobo's busybox has really strange behavior in places, like `ls` showing no files even though they're there. Some people just use the Kobo's browser to display stuff. It runs JavaScript, if all you want is a simple information display and don't mind slightly strange screen refreshes, that may be a simple solution. With my WebPortal mod you can also run shellscripts as CGI... Standalone programs tend to be complicated because they have to do a lot. Touchscreen, eInk, and getting eInk to refresh properly... it's not always so simple. Then for sailing to be useful you need some kind of external input... GPS? Sensors? So you also need serial, or networking support. (again stuff you get "for free" with the Kobo browser, kind of) For my own mods I pretty much avoided the issue altogether... at most I display an image or accept a simple touch input. I haven't done any full blown user interfaces yet (outside of the browser). I think this thread was about using Kobo for sailing as well, might want to contact the OP for details https://www.mobileread.com/forums/sh...d.php?t=256343 |
03-09-2017, 02:53 PM | #4 |
Junior Member
Posts: 4
Karma: 10
Join Date: Mar 2017
Device: Kobo gloHD
|
thanks for the quick replies.
-funny screen refreshes are not acceptable for a sailing display -i need medium fidelity quick refreshes like in XCsoar. -I can connect input data to the serial port (this is easy) -I don't "need" to compile busybox. I was just trying to compile the kobolabs git distro because...... i don't know. i figured that was part of creating a build environment. building XCsoar from source was amazingly straightforward after install armgcc cross compiler. I know that there is lots of talk about debian releases and android etc but 1) none of these work on my gloHD (i have tried many) 2)they all seem to be 3 or 4 years old. |
03-09-2017, 05:35 PM | #5 |
Grand Sorcerer
Posts: 24,905
Karma: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
@pasqale8120: Sorry, can't help you with the app. But, there was someone else here a while ago trying to use the device for sailing. A search should point you to what they did in case that helps.
|
Advert | |
|
03-09-2017, 06:06 PM | #6 |
Wizard
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
|
If you want to create qt applications, there is an (outdated, but still instructive) tutorial, that I used.
For KSM I used (instead of the materials referred to in the tutorial): https://launchpad.net/linaro-toolcha..._linux.tar.bz2 http://www.mirrorservice.org/sites/d...c-4.8.5.tar.gz Instead of QT_drivers.zip that is uploaded to the tutorial, I am using the drivers that are included in Sergey's KoboLauncher/PBChess. Edit: For creating simple Qt apps for Kobo , the tool chain and qt is all you need. Last edited by tshering; 03-09-2017 at 06:09 PM. |
01-27-2018, 09:51 AM | #7 |
Junior Member
Posts: 5
Karma: 10
Join Date: Jan 2018
Device: Boox Tab Ultra C
|
Qt5
I have Kobo Aura One and the mentioned toolchain works well (gcc-linaro-arm-linux-gnueabihf-4.8-2013.04-20130417_linux.tar.bz2) and is also the same version as used to build nickel on Aura One.
Less clear is what version of Qt I should use. Beside /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/ you have directories: /usr/local/Qt-5.2.1-arm/lib/ /usr/local/Trolltech/QtEmbedded-4.8.0-arm/lib/ with symbolic links to the files in /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/ nickel refers to them with Qt5 names: LD_LIBRARY_PATH="/usr/local/Qt-5.2.1-arm:lib:" /lib/ld-2.11.1.so --list ./nickel |grep -i Qt libQtSolutions_IOCompressor-2.3.so.1 (0x2ab7c000) libQt5WebKitWidgets.so.5 => /usr/local/Qt-5.2.1-arm/lib/libQt5WebKitWidgets.so.5 (0x2abd0000) libQt5PrintSupport.so.5 => /usr/local/Qt-5.2.1-arm/lib/libQt5PrintSupport.so.5 (0x2ac00000) libQt5Svg.so.5 => /usr/local/Qt-5.2.1-arm/lib/libQt5Svg.so.5 (0x2c1d5000) libQt5WebKit.so.5 => /usr/local/Qt-5.2.1-arm/lib/libQt5WebKit.so.5 (0x2c206000) libQt5Widgets.so.5 => /usr/local/Qt-5.2.1-arm/lib/libQt5Widgets.so.5 (0x2cf24000) libQt5DBus.so.5 => /usr/local/Qt-5.2.1-arm/lib/libQt5DBus.so.5 (0x2d235000) libQt5Concurrent.so.5 => /usr/local/Qt-5.2.1-arm/lib/libQt5Concurrent.so.5 (0x2ab46000) libQt5Sensors.so.5 => /usr/local/Qt-5.2.1-arm/lib/libQt5Sensors.so.5 (0x2d277000) libQt5Script.so.5 => /usr/local/Qt-5.2.1-arm/lib/libQt5Script.so.5 (0x2d29e000) libQt5Xml.so.5 => /usr/local/Qt-5.2.1-arm/lib/libQt5Xml.so.5 (0x2d36f000) libQt5Network.so.5 => /usr/local/Qt-5.2.1-arm/lib/libQt5Network.so.5 (0x2d396000) libQt5Sql.so.5 => /usr/local/Qt-5.2.1-arm/lib/libQt5Sql.so.5 (0x2d431000) libQt5Gui.so.5 => /usr/local/Qt-5.2.1-arm/lib/libQt5Gui.so.5 (0x2d456000) libQt5Core.so.5 => /usr/local/Qt-5.2.1-arm/lib/libQt5Core.so.5 (0x2d642000) libQt5Multimedia.so.5 => /usr/local/Qt-5.2.1-arm/lib/libQt5Multimedia.so.5 (0x2e776000) And the files themselves also contain Qt5 source directory names: strings libQtCore.so.4.6.2|grep -i qt5|less /home/build/workspace/Devices-Qt5/Qt5/qtbase/src/corelib/animation/qabstractanimation.cpp /home/build/workspace/Devices-Qt5/Qt5/qtbase/src/corelib/animation/qvariantanimation.cpp /home/build/workspace/Devices-Qt5/Qt5/qtbase/src/corelib/animation/qpropertyanimation.cpp /home/build/workspace/Devices-Qt5/Qt5/qtbase/src/corelib/animation/qanimationgroup.cpp /home/build/workspace/Devices-Qt5/Qt5/qtbase/src/corelib/animation/qsequentialanimationgroup.cpp /home/build/workspace/Devices-Qt5/Qt5/qtbase/src/corelib/animation/qpauseanimation.cpp /home/build/workspace/Devices-Qt5/Qt5/qtbase/src/corelib/global/qglobal.cpp ...etc... The directory qtbase is not contained in qt-everywhere-opensource-src-4.8.0, but is included in qt-everywhere-opensource-src-5.2.1. The following paths mentioned in libQtCore.so.4.6.2 are also not contained in 4.8.0, but are included in 5.2.1: src/corelib/thread/qthreadpool.cpp src/corelib/tools/qcommandlineoption.cpp src/corelib/tools/qcommandlineparser.cpp src/corelib/tools/qdatetimeparser.cpp src/corelib/tools/qregularexpression.cpp src/corelib/tools/qcollator_icu.cpp src/corelib/io/qfiledevice.cpp src/corelib/io/qlockfile.cpp src/corelib/io/qtemporarydir.cpp src/corelib/io/qsavefile.cpp src/corelib/io/qlockfile_unix.cpp src/corelib/io/qstandardpaths_unix.cpp src/corelib/itemmodels/qabstractitemmodel.cpp src/corelib/itemmodels/qitemselectionmodel.cpp src/corelib/itemmodels/qsortfilterproxymodel.cpp src/corelib/json/qjson.cpp src/corelib/json/qjsondocument.cpp src/corelib/codecs/qicucodec.cpp src/corelib/mimetypes/qmimetypeparser.cpp src/corelib/mimetypes/qmimeprovider.cpp It looks like the Qt5 files are renamed and placed in /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/ |
01-28-2018, 06:22 AM | #8 | |
Wizard
Posts: 1,645
Karma: 730583
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
|
Quote:
I also use a Debian chroot occasionally, see here: https://github.com/koreader/koreader...ment-359833378 From within a Debian chroot you can execute regular apt install commands and such, which can really simplify some debugging stuff. But it all depends on your goals of course. |
|
04-05-2018, 02:42 AM | #9 | |
Enthusiast
Posts: 27
Karma: 35026
Join Date: Jun 2014
Device: Kobo Glo HD
|
Quote:
Also, would Qt4.8.X work, or only this exact 4.8.5 version? Last edited by nicolas161; 04-05-2018 at 03:08 AM. |
|
04-05-2018, 03:40 AM | #10 | |
Wizard
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
|
Quote:
I cannot remember exactly, but I think I started with 4.8.6 and the compiled executables did not run on the Kobo. It is very likely that I did something wrong then, and by chance got it to work when I tried 4.8.5 . |
|
03-19-2019, 02:36 PM | #11 |
Zealot
Posts: 128
Karma: 842196
Join Date: Feb 2019
Device: none
|
That might explain my horrible segfaults and errors compiling with 4.9.4.
I will try 4.8.5 tomorrow and let everyone know. |
03-20-2019, 09:59 AM | #12 |
Wizard
Posts: 2,784
Karma: 6990707
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
I usually build statically using buildroot and the Bootlin musl toolchains, then use the built binaries.
|
03-20-2019, 11:42 AM | #13 |
Zealot
Posts: 128
Karma: 842196
Join Date: Feb 2019
Device: none
|
There I was hunting for toolchain 4.8.5 ... should read better
Still having horrible segfaults I tried like 10 different toolchains by now and still nothing. I am compiling dropbear as it was small and easy to test. Geeze Louise Im getting pretty annoyed by this. Wrote a script so i can pass two parameters: builder.sh toolchain package Last attempt is to boot into a live cd and try it from there. Otherwise i really need some help here |
03-20-2019, 12:07 PM | #14 |
BLAM!
Posts: 13,491
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
If you don't actually need to play with Qt, unlike this thread implies: https://github.com/koreader/koxtoolchain
If you do need to play with Qt, good luck. If you do, AFAICT, for Qt4, you're better off matching Sergey's toolchain, which is probably documented somewhere... For Qt5, Kobo's latest toolchain, which you can suss out from current FW binaries. Last edited by NiLuJe; 03-20-2019 at 12:12 PM. |
03-20-2019, 12:09 PM | #15 |
BLAM!
Posts: 13,491
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Note that in dropbear's specific case, libtom* is involved. If you opt to build against an external copy, it will not build against current libtomcrypt.
Both options should work though: I build it against external copies, KOReader against the internal ones, and it behaves in both cases. |
Tags |
compile, crosscompile, examples, source code |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Setting up a development environment ... | BWinmill | Kobo Developer's Corner | 27 | 06-16-2014 08:21 AM |
help set up development environment? | brianinmaine | Kindle Developer's Corner | 7 | 01-19-2014 08:23 AM |
Problem with creating the development environment | rozen | Calibre | 6 | 05-29-2011 11:38 PM |
setup development environment | JeffElkins | Calibre | 21 | 10-22-2008 03:25 PM |
Setting up development environment | tompe | OpenInkpot | 9 | 08-27-2008 02:26 PM |