Developer Tools

From Tizen Wiki
Jump to: navigation, search

Main tool used for platform development is gbs. Most of existent tools however depends on cross compilers. Tizen SDK ships cross compiler for Tizen Mobile but there are many other projects/profiles (often in POC or devel state) that uses compilers incompatible with the one from Tizen SDK. Because of this inconvenience platform developers are often forced to make many hacks like:

  1. mount --bind source directory to GBS sysroot
  2. gbs chroot and invoke cmake
  3. gbs chroot and invoke make

This is troublesome and can't be used with other IDE's, editors. Gbs internal cross compiler is configured with fixed paths so can't be simply used from host environment. That's why idea to create host cross compiler basing on gbs sysroot emerged. Assumptions:

  1. Gbs sysroot is complete (just after building some package e.g. A)
  2. You have access (repository url) to source rpms (they are used to build binutils and gcc)

Creating host tools for Tizen platform/application development

$ git clone -b master http://gitorious.org/tizenbuildtools/tizenbuildtools.git
$ tizenbuildtools/tools/create_cross_compiler_from_gbs_sysroot \
  -p ~/toolchains \
  -s ~/GBS_ROOT/local/BUILD-ROOTS/scratch.armv7l.0 \
  -r http://download.tizen.org/snapshots/tizen/common/latest/repos/arm-wayland/source

create_cross_compiler_from_gbs_sysroot will perform following operations:

  1. check needed dependencies flex, bison ... and print some warning and prompt to install needed packages
  2. invoke tizenbuildtools/tools/create_binutils_from_gbs_sysroot to create binutils if they are not present in ~/toolchains/bin
    1. download appropriate binutils src rpm from http://download.tizen.org/snapshots/tizen/common/latest/repos/arm-wayland/source
    2. extract, apply patches, configure, build and install binutils in ~/toolchains/bin
  3. download appropriate gcc src rpm from http://download.tizen.org/snapshots/tizen/common/latest/repos/arm-wayland/source
  4. extract, apply patches, configure, build and install gcc in ~/toolchains/bin

That's all :) you should have you cross compiler in toolchains/bin set up with ~/GBS_ROOT/local/BUILD-ROOTS/scratch.armv7l.0 sysroot.