Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Development on Tizen

Kenneth Rohde Christiansen edited this page Dec 10, 2013 · 55 revisions

Set up your Tizen environment

Setting up Gerrit Access

Install development tools

  • On host, you must have gbs and mic.
  • There are some steps until you can install on Ubuntu by sudo apt-get install gbs mic
  • Until sudo apt-get install gbs mic, follow Installing development tools

Set up gbs environment

  • What is gbs?
  • gbs can bake xwalk rpm.
  • When gbs runs, gbs creates chroot environment to build i586 target
  • gbs automatically downloads all dependencies from tizen server
  • Make .gbs.conf > vi ~/.gbs.conf
  • For example, my .gbs.conf
[general]
profile = profile.mobile_public
buildroot = ~/GBS-ROOT/
work_dir=.

[profile.mobile_public]
repos = repo.mobile_public_2.1

[repo.mobile_public_2.1]
url = http://download.tizen.org/releases/2.1/latest/

Build xwalk

Preface

  • We will work in both HOST and CHROOT.
  • I distinguish each as follows:
  • In HOST > command
  • In CHROOT $ command

Bake rpm

  • Refer to "Building an RPM package for Tizen" in Build-Crosswalk
  • If you bake rpm once, chroot environment is created. You can build xwalk inside chroot! Refer to next section.
  • If you change your spec file, we need to bake rpm to renew chroot environment.

Build XWalk inside chroot.

  • You need to bake rpm once, because gbs creates chroot environment.
  • If you don't want to run rpm (because it takes a lot of time), refer to Tips section. Development-on-Tizen#tips
  • If you bake rpm once and you don't change spec file, just build inside chroot. Don't waste time to bake rpm again.

Build

  • mount your source to chroot
# make directory of mounting point
> cd /home/<yourID>/GBS-ROOT/local/BUILD-ROOTS/scratch.i586.0/home/abuild/
> mkdir workspace
> cd -
# mount your source
> sudo mount --bind <your source path> /home/<yourID>/GBS-ROOT/local/BUILD-ROOTS/scratch.i586.0/home/abuild/workspace
# e.g. <your source path> is /home/<yourID>/chromium if your xwalk is in /home/<yourID>/chromium/src/xwalk
  • manually patch patches
  • spec includes as follows
in crosswalk.spec
Patch1:         %{name}-1.29-do-not-look-for-gtk2-when-using-aura.patch
Patch2:         %{name}-1.29-look-for-pvr-libGLESv2.so.patch
Patch3:         %{name}-1.29-revert-nss-commits.patch
  • patch manually
> cd [your source]
> patch -p1 < <xwalk dir>/package/%{name}-1.29-do-not-look-for-gtk2-when-using-aura.patch
# Apply all patches (some patches might need -p2, not -p1)
  • Enter chroot environment
> sudo gbs chroot /home/<yourID>/GBS-ROOT/local/BUILD-ROOTS/scratch.i586.0
$ cd ~/workspace   # this is your mounting point
  • Prepare GYP build
  • The spec file (packaging/crosswalk.spec) includes the build command with associated flags.
The line starts like this:
export GYP_GENERATORS='make'
./src/xwalk/gyp_xwalk src/xwalk/xwalk.gyp \
...

  • You can call this directly in chroot. Note you need to append -Dtarget_arch=ia32 for it to work.
  • THE BELOW MIGHT BE STALE: AVOID COPYING. Please verify that the below fits with crosswalk.spec
$ export GYP_GENERATORS='make'
$ ./src/xwalk/gyp_xwalk src/xwalk/xwalk.gyp \
--no-parallel \
-Ddisable_nacl=1 \
-Dpython_ver=2.7 \
-Duse_aura=1 \
-Duse_cups=0 \
-Duse_gconf=0 \
-Duse_kerberos=0 \
-Duse_system_bzip2=1 \
-Duse_system_icu=1 \
-Duse_system_libexif=1 \
-Duse_system_libxml=1 \
-Duse_system_nspr=1 \
-Denable_xi21_mt=1 \
-Duse_xi2_mt=0 \ 
-Dtizen_mobile=1 
-Dtarget_arch=ia32
  • Build it!
$ make -j9 -C src BUILDTYPE=Release xwalk

Deploy

  • Copy binary onto device
> sdb root on
> sdb push out/Release/xwalk /usr/lib/xwalk/xwalk
  • You can run xwalk on device using sdb shell. Refer to following section.

Run

Debug

Tips and Tricks

install dependent packages without running gbs fully.

  • You can update your chroot using dummy project that has the same spec file.
> mkdir gbsdummy
> cd gbsdummy
> cp -r [xwalk dir]/packaging ./
> git init
> git add *
> git commit -a -m init
> gbs build -A i586
  • above command will fail but your chroot is updated. \o/
Clone this wiki locally