This repository has been archived by the owner on Apr 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 124
Development on Tizen
Kenneth Rohde Christiansen edited this page Dec 10, 2013
·
55 revisions
- When using GBS, it will download many resources from a server, so you need to set up Gerrit access for doing so.
- Follow Setting up Development Environment
- If you are an Intel blue batch, follow the following: Using git at intel
- On host, you must have gbs and mic installed.
- 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
- What is GBS?
- GBS can create (called 'bake') xwalk rpm.
- When it runs, GBS creates a chroot environment to build the i586 target
- GBS automatically downloads all dependencies from the Tizen server
- Create your own .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/
- If you are curious what happen, refer to Creating a Tizen Platform Image from Scratch through Local Build
- We will work in both HOST and CHROOT.
- I distinguish each as follows:
- In HOST
> command
- In CHROOT
$ command
- Refer to "Building an RPM package for Tizen" in Build-Crosswalk
- If you bake the RPM once, a chroot environment is created. You can now build xwalk inside chroot. Refer to next section.
- If you change your spec file, you need to rebake the RPM to recreate the chroot environment.
- You need to bake the RPM at least once, as GBS creates the chroot environment.
- If you want to bypass that (as it takes a lot of time), check out the trick in the Tips section. Development-on-Tizen#tips
- If you bake rpm once and you don't change the spec file, just build inside chroot. Do not waste time to bake the RPM yet again.
- 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
- 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.
- Refer to Installing Crosswalk
- Refer to Remote-debugging-xwalk-on-Tizen-2.1
- 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/