User Tools

Site Tools


building_packages_from_source_code

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
building_packages_from_source_code [2013/03/19 14:47]
jsmoeller
building_packages_from_source_code [2022/07/27 00:01]
waltminer Obsolete - delete page
Line 1: Line 1:
-//Note: You can skip this section if you only want to test the pre-built binary images.//+The [[https://source.tizen.org/documentation/developer-guide|Tizen Developer Guide]] is much improved, and you can find detailed instructions from there:
  
- +  ​* [[https://source.tizen.org/documentation/​developer-guide/installing-development-tools|Installing Development Tools]] 
-==== Setting up your build environment ​ ==== +  ​* [[https://​source.tizen.org/​documentation/developer-guide/cloning-tizen-source|Getting Tizen Sources]] 
- +  ​* [[https://source.tizen.org/documentation/developer-guide/building-packages-locally|Building Packages Locally]]
- +
-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 [[http://download.tizen.org/tools|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 dialog +
-  $ cd dialog +
-  $ 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/2.0/tizen-2.0_20130219.4/repos/​main/​armv7l/​packages/​ +
-  [repo.arm_base] +
-  url = https://​download.tizen.org/​releases/​2.0/​tizen-2.0_20130219.4/​repos/​base/​armv7l/​packages+
-   +
- +
-After these changes  +
-   +
-  $ gbs build -A armv7l +
-   +
- +
-works.+