[Tinkerphones] Towards QtMoko2: building QtMoko from sources
H. Nikolaus Schaller
hns at goldelico.com
Sat Jun 3 18:18:49 CEST 2017
Hi all,
I finally managed to build parts of current QtMoko from sources and
even if not completely successful, I think this is a good moment
to write down and share the experiences.
For a long time I had experimented with cross-compiling or using
qemu with a vexpress ARM emulation, but wasn't successful.
So I thought about using our brand new Letux Cortex 8 (LC8) board
(OSD3358 based tiny AM3358 board) and did equip it with a
200GB µSD card.
This looks like a big overkill, but using git and gcc has the
tendency to need a lot of disk space for the full history. This
setup is also planned to be used for building Replicant and there
a simple repo init fills the disk by several 10GB.
So I installed our Letux-Debian-Jessie by using the makesd
script (which was as simple as "DEV=/dev/sdb ./makesd lc8").
The LC8 is then connected and powered through USB and gives
simple network access through ssh root at 192.168.0.202 into the
device. Through ip-forwarding on the host, the LC8 has full
internet access (e.g. for apt-get upgrade or git clone).
Next I did write a driver script that runs on the host and starts a build script
on the LC8. Such a driver script shall finally do everything what we need to get
QtMoko compiled and packed.
For example it does a git fetch to pull the sources or a (c)debootstrap
to create a debian wheezy image. And it finally starts compilation.
Basically it follows the steps described as prose by
https://github.com/radekp/qtmoko/blob/master/README
The first experiments did show a lot of problems but I was able
to overcome most of them. Here is a short summary of the most important ones:
* compiling QtMoko on Debian Jessie fails. At least because libts-dev and libtiff4-dev are missing
* doing a chroot into a Wheezy image makes it work
* since the LC8 has only 512MB RAM (like the GTA04) we need swap space (seems to need up to ca. 300 MB)
* the first build is very very slow - it takes several days to compile
* using ccache and not doing a clean build reduces a recompile (to approx. 1h) but the result may be questionable
* ccache needs more than the default cache size (1GB)
* there are some more prerequisites than described in prose to really build from scratch - but my automatic build scripts should cover them now
* it is better to extract qtmoko specific dependencies automatically
But still I was not yet able to build the latest sources (there is a dependency or search path
issue with libamrrecordplugin and libtimidityplugin).
Here are the scripts:
http://git.goldelico.com/?p=gta04-qtmoko.git;a=tree;f=goldelico;hb=refs/heads/master
(there is still stuff to set up a qemu image but it is no longer used).
After getting parts of QtMoko compiled I have set up a new repository for the
packages (including source packages) and have added Package/Sources/Release files:
http://www.qtmoko.net/download
So with this setup (if it finally succeeds), installation should become even more simple. It should be just
a) get (debootstrap) some minimal Debian Wheezy up and running (e.g.
http://download.goldelico.com/letux-debian-rootfs/20170509-wheezy-7.11-minimal.tbz)
b) add to /etc/apt/sources.list
deb http://www.qtmoko.net/download/ wheezy main
deb-src http://www.qtmoko.net/download/ wheezy main
c) apt-get update
d) apt-get install qtmoko
e) to get sources: apt-get source qtmoko
Well, there are still some limitations I want to work on in the next weeks:
* the repository has no GPG signatures so one has to work around apt-get security complaints
* since some packages do not compile properly there are no complete source packages yet
* compilation is still slow despite ccache. I should try the 200GB card on a Pyra or OMAP5432EVM as soon as there becomes one available for running in background
This is a snapshot on the trail to world domination :)
Some thoughts where we should head to next:
* adapt hard coded file names to latest Letux kernels (many /sys and /dev names have changed since 3.7 kernels) so that it runs on GTA04A5
* get rid of tslib (not available in Jessie)
* try to upgrade to build/run on Jessie (libtiff4 -> libtiff5 and other unknown dependencies)
* fix package dependencies so that 'apt-get install qtmoko' pulls in everything we need
* fix package descriptions (some still refer to the non-existing www.qtmoko.org landing page)
* adapt QtMoko for other devices (may be more difficult since we have different screen resolution/layout)
* split qtmoko.deb into smaller and better manageable .deb packages (even if the sources remain monolithic)
* somehow provide a -dev package for easily building Apps
* somehow move QTMOKO_VERSION_STR to outside of qtopiabase/version.h so that we don't have to recompile everything (incl. the base libraries)
Hope this brief but lengthy summary help others working on QtMoko sources.
I hope you can also share your experiences / results.
BR,
Nikolaus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.goldelico.com/pipermail/community/attachments/20170603/604a7754/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DSC00711.jpeg
Type: image/jpeg
Size: 66747 bytes
Desc: not available
URL: <http://lists.goldelico.com/pipermail/community/attachments/20170603/604a7754/attachment.jpeg>
More information about the Community
mailing list