Projects/Mobile/MADDE

From KDE TechBase
Revision as of 14:38, 20 February 2010 by HarryF (talk | contribs) (Created page with '==Building KDE for the N900 with the MADDE toolchain== {{warning|This is pretty much work in progress}} Get MADDE: http://wiki.maemo.org/MADDE If you MADDE doesn't have Qt 4.6...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Building KDE for the N900 with the MADDE toolchain

Warning
This is pretty much work in progress


Get MADDE: http://wiki.maemo.org/MADDE

If you MADDE doesn't have Qt 4.6 support, get it from http://chaos.troll.no/~harald/MADDE

CMake

CMake got cross-compiling support in version 2.6. Note that CMake currently can't build ARM and x86 binaries at the same time, so anything that needs a bootstrapped tool needs to be compiled twice, once for x86 and once for ARM.

To ease cross-compiling setup, CMake features toolchain files. Here's an example CMake toolchain file that invokes MADDE's gcc directly:

include (CMakeForceCompiler)

set(CMAKE_SYSTEM_NAME Linux)

CMAKE_FORCE_C_COMPILER($ENV{HOME}/.madde/0.6.14/targets/fremantle-qt-0951/bin/gcc GNU) CMAKE_FORCE_CXX_COMPILER($ENV{HOME}/.madde/0.6.14/targets/fremantle-qt-0951/bin/g++ GNU)

set(CMAKE_FIND_ROOT_PATH ~/.madde/0.6.14/sysroots/fremantle-arm-sysroot-2.2009-51-1-qt453)

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

Save this file somewhere, e.g. to toolchain-madde.cmake and pass -DCMAKE_TOOLCHAIN_FILE=$HOME/toolchain-madde.cmake parameter.

KDElibs

KDElibs has several bootstrapped tools, which need to be compiled for x86. Unfortunately, current CMake doesn't support building them in one go, so we have to do the following:

cd /path/to/kdelibs/sources mkdir build-x86 cd build-x86 cmake .. make -C kdecore/kconfig_compiler make -C kjs icemaker

This builds the kconfig_compiler and icemaker tools for x86.

Now, we can do an ARM build:

cd /path/to/kdelibs/sources mkdir build-arm cd build-arm cmake -DCMAKE_TOOLCHAIN_FILE=$HOME/toolchain-madde.cmake -DKDE_HOST_TOOLS_PATH=/path/to/kdelibs/sources/bld-x86 ..

adapt the pathes above accordingly.