Build all Packages Locally with GBS
You can perform a build for all Tizen packages using the Git Build System (GBS).
Before performing the build, study the following instructions:
- Setting up the Development Environment
- Installing Development Tools
- Building Packages Locally with GBS
Note
- To understand the local full build commands, see GBS Build Concepts.
- To speed up the build process when hardware allows, see Speeding up a Local Build.
Clone all Tizen projects
You can clone all Tizen projects over SSH or HTTPS.
NoteProcedures to clone all projects over SSH and HTTPS are almost identical, the only difference being the Git cloning protocol. However, you can only contribute code to Tizen using the SSH method.
Clone all projects over SSH
You can clone the source of all projects over SSH, including the latest source and the snapshot source.
NoteMake sure the SSH configuration file is correctly configured according to Setting up the Development Environment. Otherwise, synchronization cannot be performed successfully and the following error message is displayed:
... nc: connection failed, SOCKS error 1 ssh_exchange_identification: Connection closed by remote host nc: connection failed, SOCKS error 1 ... fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. ssh_exchange_identification: Connection closed by remote host fatal: Could not read from remote repository.
To clone the latest sources of all projects over SSH:
NoteThe latest source does not mean the latest sources in the Gerrit server, but the reference snapshot sources where images generated by the reference snapshot are guaranteed by passing all test cases.
-
Create a new directory for Tizen and switch to it:
$ mkdir ~/<Tizen_Project> && cd ~/<Tizen_Project>
-
Create a
.repo/
directory that contains all the information - for example, Git repositories, commit IDs, and remote URLs - to download all Git repositories to construct all Tizen projects. Initialize the repository by executing the following command:$ repo init -u ssh://<Username>@review.tizen.org:29418/scm/manifest -b <tizen branch> -m <profile>_<repository>.xml
Note
For information on installing and setting up the repo tool, see Setting Up the Repo Tool.
<tizen branch>
istizen
for Tizen latest version, and othertizen_<version>
branches aretizen <version>
for specific Tizen version, including older versions.For example:
-
Tizen Unified / standard:
$ repo init -u ssh://<Username>@review.tizen.org:29418/scm/manifest -b tizen -m unified_standard.xml
-
Tizen Unified / emulator:
$ repo init -u ssh://<Username>@review.tizen.org:29418/scm/manifest -b tizen -m unified_emulator.xml
-
-
(optional) Clone the specific snapshot source of all projects over SSH. Replace the latest manifest with a snapshot manifest and make proper modifications by executing the following commands, as appropriate:
$ wget <Snapshot_Manifest_URL> -O .repo/manifests/<profile>/<repository>/projects.xml
For example:
-
Tizen Unified / standard:
$ wget http://download.tizen.org/releases/weekly/tizen/unified/tizen-unified_20201020.1/builddata/manifest/tizen-unified_tizen-unified_20201020.1_standard.xml -O .repo/manifests/unified/standard/projects.xml
-
-
Synchronize the files for all the projects based on the information downloaded by the
repo init
command by executing the following command:$ repo sync
Note
You can use several options to increase synchronization speed.
For example:
$ repo sync -j 4
You can control jobs number using
-j
option.
Clone all projects over HTTPS
You can clone the source of all projects over HTTPS, including the latest source and the snapshot source.
To clone the latest sources of all projects over HTTPS, follow the steps below:
-
Create a new directory for Tizen and switch to it:
$ mkdir ~/<Tizen_Project> && cd ~/<Tizen_Project>
-
Create a
.repo/
directory. Initialize the repository by executing the following command:$ repo init -u https://git.tizen.org/cgit/scm/manifest -b <tizen branch> -m unified_<repository>.xml
<tizen branch>
istizen
for Tizen latest version, and othertizen_<version>
branches aretizen <version>
for specific Tizen version, including older versions.Note
The
repo init
command using HTTPS is almost identical to that of using SSH. The only difference is the parameter of the'-u'
option. Replace'ssh://<Username>@review.tizen.org:29418/scm/manifest'
with'https://git.tizen.org/cgit/scm/manifests'
.For example:
-
Tizen Unified / standard:
$ repo init -u https://git.tizen.org/cgit/scm/manifest -b tizen -m unified_standard.xml
-
-
Replace the remote ‘fetch url’ in the
_remote.xml
file by executing the following command:$ sed -i 's/ssh://review.tizen.org/https://git.tizen.org//cgit/' .repo/manifests/_remote.xml
This changes the ‘fetch url’ from
fetch="ssh://review.tizen.org/"
tofetch="https://git.tizen.org/cgit/"
. -
(optional) Clone the specific snapshot source of all projects over HTTPS.
Replace the latest manifest with a snapshot manifest and make proper modifications by executing the following commands, as appropriate:
$ wget <Snapshot_Manifest_URL> -O .repo/manifests/<profile>/<repository>/projects.xml
Note
This procedure is the same as for SSH.
-
Synchronize the files for all the projects based on the information downloaded by the
repo init
command by executing the following command:$ repo sync
Build all packages
Build all packages by executing the following commands:
$ cd <Tizen_Project>
$ gbs build <gbs build option>
For example:
$ cd <Tizen_Project>
$ gbs build -A armv7l --threads=4 --clean-once
NoteSince the GBS configuration file (
.gbs.conf
) and build configuration file (build.conf
) are also included inscm/manifests
, they are automatically downloaded in the following paths after therepo sync
:
.gbs.conf
:~/<Tizen_Project>/.gbs.conf
build.conf
:~/<Tizen_Project>/scm/meta/build-config/<Tizen version>/<profile>/<repository>_build.conf
For information on increasing the build speed, see Development Tips.
GBS build concepts
The following build concepts help you understand the full build commands:
- Dependency cycles
- In Tizen versions 2.4 and higher, packages with dependency cycles are only included in the
Tizen:[<Tizen version>]:Base
OBS project. Since building packages with dependency cycles is not supported by GBS, it is impossible to build all packages locally with GBS forTizen:[<Tizen version>]:Base
. Therefore, a remote repo which contains RPMs built by OBS forTizen:[<Tizen version>]:Base
needs to be added in the.gbs.conf
file. - In Tizen versions lower than Tizen 2.3, there is only 1 OBS project and packages with dependency cycles are included in it. To continue the build by breaking the dependency cycles for Tizen versions lower than Tizen 2.3, see Excluding Specific Packages.
- In Tizen versions 2.4 and higher, packages with dependency cycles are only included in the
- Accelerator packages
- Tizen provides cross-compilers and other accelerator packages. For Tizen versions 2.4 and higher, these accelerator packages are included in the
Tizen:[<Tizen version>]:Base
OBS project. - For Tizen versions lower than Tizen 2.3, there is only 1 OBS project and the accelerator packages are included in it. These packages have names ending with
-x64
and need to be excluded to build locally with GBS. Otherwise, built out packages are installed and used, and the accelerator packages fail to work. To exclude these accelerator packages for Tizen versions lower than Tizen 2.3, see Excluding Specific Packages.
- Tizen provides cross-compilers and other accelerator packages. For Tizen versions 2.4 and higher, these accelerator packages are included in the