Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 03-09-2017, 01:17 PM   #1
pasquale8120
Junior Member
pasquale8120 began at the beginning.
 
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.
pasquale8120 is offline   Reply With Quote
Old 03-09-2017, 01:42 PM   #2
latepaul
Wizard
latepaul ought to be getting tired of karma fortunes by now.latepaul ought to be getting tired of karma fortunes by now.latepaul ought to be getting tired of karma fortunes by now.latepaul ought to be getting tired of karma fortunes by now.latepaul ought to be getting tired of karma fortunes by now.latepaul ought to be getting tired of karma fortunes by now.latepaul ought to be getting tired of karma fortunes by now.latepaul ought to be getting tired of karma fortunes by now.latepaul ought to be getting tired of karma fortunes by now.latepaul ought to be getting tired of karma fortunes by now.latepaul ought to be getting tired of karma fortunes by now.
 
latepaul's Avatar
 
Posts: 1,264
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.
latepaul is offline   Reply With Quote
Old 03-09-2017, 02:07 PM   #3
frostschutz
Linux User
frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.
 
frostschutz's Avatar
 
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
frostschutz is offline   Reply With Quote
Old 03-09-2017, 02:53 PM   #4
pasquale8120
Junior Member
pasquale8120 began at the beginning.
 
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.
pasquale8120 is offline   Reply With Quote
Old 03-09-2017, 05:35 PM   #5
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
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.
davidfor is offline   Reply With Quote
Old 03-09-2017, 06:06 PM   #6
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
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.
tshering is offline   Reply With Quote
Old 01-27-2018, 09:51 AM   #7
jkaltes
Junior Member
jkaltes began at the beginning.
 
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/
jkaltes is offline   Reply With Quote
Old 01-28-2018, 06:22 AM   #8
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,619
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Quote:
Originally Posted by pasquale8120 View Post
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.
There's a pretty big difference between that and a chroot. See, e.g., https://github.com/S-trace/eView/blo...uild_chroot.sh

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.
Frenzie is offline   Reply With Quote
Old 04-05-2018, 02:42 AM   #9
nicolas161
Enthusiast
nicolas161 turned on, tuned in, and dropped out.nicolas161 turned on, tuned in, and dropped out.nicolas161 turned on, tuned in, and dropped out.nicolas161 turned on, tuned in, and dropped out.nicolas161 turned on, tuned in, and dropped out.nicolas161 turned on, tuned in, and dropped out.nicolas161 turned on, tuned in, and dropped out.nicolas161 turned on, tuned in, and dropped out.nicolas161 turned on, tuned in, and dropped out.nicolas161 turned on, tuned in, and dropped out.nicolas161 turned on, tuned in, and dropped out.
 
Posts: 27
Karma: 35026
Join Date: Jun 2014
Device: Kobo Glo HD
Quote:
Originally Posted by tshering View Post
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.
Thanks for this. If I have an ARM machine at hand (same architecture as the Kobo), do I need the toolchain?

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.
nicolas161 is offline   Reply With Quote
Old 04-05-2018, 03:40 AM   #10
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by nicolas161 View Post
Thanks for this. If I have an ARM machine at hand (same architecture as the Kobo), do I need the toolchain?
You should be able to compile directly. I remember, for instance, that some member of this forum compiled for Kobo on a Rasberry board.

Quote:
Originally Posted by nicolas161 View Post
Also, would Qt4.8.X work, or only this exact 4.8.5 version?
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 .
tshering is offline   Reply With Quote
Old 03-19-2019, 02:36 PM   #11
BloodRagg
Zealot
BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.
 
BloodRagg's Avatar
 
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.
BloodRagg is offline   Reply With Quote
Old 03-20-2019, 09:59 AM   #12
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,735
Karma: 6990705
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.
geek1011 is offline   Reply With Quote
Old 03-20-2019, 11:42 AM   #13
BloodRagg
Zealot
BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.
 
BloodRagg's Avatar
 
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
BloodRagg is offline   Reply With Quote
Old 03-20-2019, 12:07 PM   #14
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
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.
NiLuJe is offline   Reply With Quote
Old 03-20-2019, 12:09 PM   #15
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
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.
NiLuJe is offline   Reply With Quote
Reply

Tags
compile, crosscompile, examples, source code


Forum Jump

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


All times are GMT -4. The time now is 01:59 AM.


MobileRead.com is a privately owned, operated and funded community.