User Tools

Site Tools


building_packages_from_source_code

This is an old revision of the document!


Note: You can skip this section if you only want to test the pre-built binary images.

Setting up your build environment

If you intend to create or modify any software, you need a working build environment. The build environment consists of a number of command line tools:

  • gbs: Git Build System - use this for building software components
  • mic: MeeGo Image Creator - use this for building system images
  • osc: openSUSE buildsystem commander - use this for remote builds

You can find these tools from download.tizen.org. Use the instructions below to install them to your development system. You can copy-paste the commands below. Note that the osc tool is installed automatically with gbs.

For Ubuntu 12.04 LTS:

$ sudo apt-add-repository 'deb http://download.tizen.org/tools/latest-release/Ubuntu_12.04/ /'
# Enter your password for sudo
$ sudo apt-get update
$ sudo apt-get install gbs
$ sudo apt-get install mic

Building an example package

Getting the source

First step in building is to get the source code and to import it using gbs.

$ mkdir acpid
$ cd acpid
$ wget http://download.tizen.org/snapshots/trunk/ivi/latest/repos/ivi/source/dialog-1.1-9.5.src.rpm
$ gbs import dialog-1.1-9.5.src.rpm

Configuration of gbs

Importing the acpid package with gbs creates a gbs configuration file. By default, gbs configuration file point to a different repository than what is used in this example. So, the mandatory step is setting the correct url.

Start you favourite editor, vi used in this example.

$ vi ~/.gbs.conf

Edit the file and match the url to the following:

[repo.tizen_latest]
url = http://download.tizen.org/snapshots/trunk/ivi/latest

If you have a developer account, and you are planning to use the Tizen building system, you can add your profile data also. This is an optional step for local builds.

[profile.tizen]
user = YOUR_USERNAME
#CAUTION: please use the key name "passwd" to reset plaintext password
passwd = YOUR_PASSWORD

Save the configuration file and exit the editor (in vi, first hit ESC, then type :wq).

Compiling, compiling

The gbs will download needed dependencies from the url set up to the configuration. Thus, everything should be ready for building.

$ gbs build -A i586

This should result in installable repository in ~/GBS-ROOT/local/repos/tizen, containing packages built from your local source code.

ARM target

To build the packages for ARM (armv7 hardfloat) an adaption to your gbs.conf is needed:

$ vi ~/.gbs.conf

We need to add two new repo definitions and change the default for “repo=”:

repos = repo.arm_main, repo.arm_base

[repo.arm_main]
url = https://download.tizen.org/releases/daily/2.0alpha/common/latest/repos/tizen-main/armv7l/packages/

[repo.arm_base]
url = https://download.tizen.org/releases/daily/2.0alpha/common/latest/repos/tizen-base/armv7l/packages/

After these changes

$ gbs build -A armv7l

works.

building_packages_from_source_code.1360079910.txt.gz · Last modified: 2013/02/05 15:58 by jsmoeller