05-27-2018, 12:38 PM | #1 |
Connoisseur
Posts: 80
Karma: 63118
Join Date: May 2018
Device: Kobo Aura One
|
Kobo Development Tutorial: 0 to Hero
Hey folks
I have noticed that getting into Kobo development can be very confusing if you have no experience in the field, so I decided to write a guide for those who want to get into it. For this guide I am assuming you are using Window as your primary OS. So the first step is seting up a Linux virtual machine. I am using VirtualBox and Lubuntu 18.4 32bit (Kobos use 32bit processors so this might save us some truble), but any Linux should be fine. Make sure you assign enought Processors, RAM and VRAM to the VM and run through the installation process. Once it is up and running open up a terminal and update the system by typing the following commands: Code:
sudo apt update sudo apt upgrade Click on the insert guest additions menu item and type: Code:
sudo apt install dkms sudo /media/YOURUSERNAME/VBox_GAs_5.2.8/VBoxLinuxAdditions.run Now here comes the interesting part. We have to setup the arm toolchain and build Qt. Download the toolchain form: https://github.com/kobolabs/Kobo-Rea..._linux.tar.bz2 Extract it and move it to your home directory (or any other). Code:
tar xf ~/Downloads/gcc-linaro-arm-linux-gnueabihf-4.8-2013.04-20130417_linux.tar.bz2 -C ~ Code:
sudo nano ~/.bashrc Code:
PATH=$PATH:~/gcc-linaro-arm-linux-gnueabihf-4.8-2013.04-20130417_linux/bin Code:
source ~/.bashrc Building Qt will be a bit harder. Download the Qt 4.8.5 sources from: https://download.qt.io/archive/qt/4....c-4.8.5.tar.gz Again extract it to your home directory and cd into it: Code:
tar xf ~/Downloads/qt-everywhere-opensource-src-4.8.5.tar.gz -C ~ cd ~/qt-everywhere-opensource-src-4.8.5/ Code:
cp -r ./mkspecs/qws/linux-arm-gnueabi-g++ ./mkspecs/qws/linux-arm-gnueabihf-g++ Code:
# # qmake configuration for building with arm-linux-gnueabihf-g++ # include(../../common/linux.conf) include(../../common/gcc-base-unix.conf) include(../../common/g++-unix.conf) include(../../common/qws.conf) QMAKE_CFLAGS_RELEASE = -O3 -march=armv7-a -mfpu=neon -mfloat-abi=hard -D__arm__ -D__ARM_NEON__ QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO = -O3 -g -march=armv7-a -mfpu=neon -mfloat-abi=hard -D__arm__ -D__ARM_NEON__ QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO = $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO # modifications to g++.conf QMAKE_CC = arm-linux-gnueabihf-gcc QMAKE_CXX = arm-linux-gnueabihf-g++ QMAKE_LINK = arm-linux-gnueabihf-g++ QMAKE_LINK_SHLIB = arm-linux-gnueabihf-g++ # modifications to linux.conf QMAKE_AR = arm-linux-gnueabihf-ar cqs QMAKE_OBJCOPY = arm-linux-gnueabihf-objcopy QMAKE_STRIP = arm-linux-gnueabihf-strip load(qt_config) We need to install some dependencies: Code:
sudo apt install gettext autoconf libglib2.0-dev build-essential libtool libdbus-1-dev sudo apt install zlib1g-dev libpng-dev libxext-dev libssl-dev sudo ln -s /usr/include/i386-linux-gnu/openssl/opensslconf.h /usr/include/openssl/ Code:
./configure -embedded arm -xplatform qws/linux-arm-gnueabihf-g++ -opensource -confirm-license -prefix ~/qt_kobo_4_8_5 \ -qt-libjpeg -svg -nis -dbus -openssl -sql-sqlite \ -nomake demos -nomake docs -nomake translations \ -no-stl -no-webkit -no-qt3support -no-phonon -no-phonon-backend -no-multimedia -no-accessibility \ -no-javascript-jit -no-script -no-scripttools -no-opengl -no-gtkstyle -no-gif -no-cups -no-largefile \ -no-accessibility -no-audio-backend -no-declarative -no-libtiff -no-libmng -no-pch -no-declarative-debug \ -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc -no-sql-psql -no-sql-sqlite2 -no-sql-sqlite_symbian \ -no-sql-tds -no-mmx -no-3dnow -no-sse -no-sse2 \ -qt-gfx-linuxfb -qt-gfx-transformed \ -no-gfx-qvfb -no-gfx-vnc -no-gfx-multiscreen -no-gfx-directfb -no-gfx-qnx -no-gfx-integrityfb \ -no-kbd-qvfb -no-kbd-tty -no-kbd-linuxinput -no-kbd-qnx -no-kbd-integrity \ -no-mouse-qvfb -no-mouse-linuxtp -no-mouse-pc -no-mouse-tslib \ -DQT_KEYPAD_NAVIGATION -DQT_NO_QWS_CURSOR \ -little-endian -make tools -release -continue \ -I /usr/include/dbus-1.0 -I /usr/lib/i386-linux-gnu/dbus-1.0/include Finally we can start the build process. Grab a tea and type: Code:
make -j4 make install Code:
sudo apt install qtcreator Congratulations! You are now able compile qt aplications for your Kobo device To run them on the device check out sergeyvl12's Kobo Launcher: https://www.mobileread.com/forums/sh...d.php?t=201632 |
05-27-2018, 02:23 PM | #2 |
Member
Posts: 13
Karma: 10
Join Date: Mar 2018
Location: Toronto
Device: Kobo Aura One
|
Nice guide! It's great to see all the information compiled in one place
|
Advert | |
|
05-27-2018, 03:14 PM | #3 |
Wizard
Posts: 2,736
Karma: 6990705
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
Looks good!
|
07-11-2018, 05:30 AM | #4 |
Junior Member
Posts: 8
Karma: 9886
Join Date: Jul 2018
Device: Kobo Clara HD
|
Thank you, this is a great post. It should be set as sticky by the admins
|
02-27-2022, 10:26 PM | #5 |
Junior Member
Posts: 4
Karma: 10
Join Date: Feb 2022
Device: Kobo Libra 2
|
Is there an updated version of this guide? I recently bought a Libra 2 and wanted to try something fun with it. I have no experience with Qt or Linux, so I would really appreciate some help.
I looked at the Qt's download archives and the kobolabs github page and it seems like there is an updated version of the toolchain and I also see Qt 5 and 6. So I tried using this guide (on Ubuntu 20.4), just substituting Qt 4.8.5 with 5.15.2 and gcc linaro 4.8 with 4.9.4. Unfortunately, things didn't work out. Some things have changed, like the folder structured of the extracted Qt source files, no qws, some configuration options have changed, etc. I was able to figure some things out, but still got a lot of warnings and errors when I run "make". I think I must have done a lot of things wrong, but I have no idea what. I have creeped around and this is the only guide which comprehensively details all the steps and the commands that need to entered in the terminal. You've done a really good job at explaining things for newbies like me. It would be great if you could post an update to it. Thanks! |
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
building Kobo development environment | pasquale8120 | Kobo Developer's Corner | 36 | 03-29-2019 09:02 AM |
Can someone get me up to speed with Kobo development? | xfbs | Kobo Developer's Corner | 4 | 05-27-2018 12:41 PM |
Wired - Free eBook of Jonathan Wood Novels (No Hero; Yesterday's Hero) | charlesatan | Deals and Resources (No Self-Promotion or Affiliate Links) | 5 | 08-02-2012 05:39 PM |
Kobo Development forum | PeterT | Feedback | 2 | 07-17-2012 04:00 PM |
iLiad iLiad Full Development Tutorial | Hamatole | iRex Developer's Corner | 5 | 10-12-2009 06:29 AM |