前一篇文章已经介绍了如何下载tizen源码,下面我将继续讲述如何编译源码.

1 下载安装gbs编译工具

tizen源码是用gbs工具进行编译的,因此我们首先得将此工具下载下来,并且设置好。

下面的Ubuntu12.04版本为例.

1.1 添加gbs的源

用vim打开source.list文件:

$ sudo vim /etc/apt/sources.list

在最后添加两行:

deb http://download.tizen.org/tools/latest-release/Ubuntu_12.04/ /
deb-src http://download.tizen.org/tools/latest-release/Ubuntu_12.04/ /

如下图:

然后更新源:

$sudo apt-get update

安装gbs工具:

$sudo apt-get install gbs

可以相看当前gbs的版本:

$ gbs -V
gbs 0.16

1.2 修改.gbs.config文件

安装完gbs工具后,会在用户目录下生成一隐藏文件.gbs.config文件,用vim打开:

$vim .gbs.config

初始安装gbs后的.gbs.config文件的默认内容如下:

[general]
#Current profile name which should match a profile section name
profile = profile.tizen [profile.tizen]
#Common authentication info for whole profile
#user =
#CAUTION: please use the key name "passwd" to reset plaintext password
#passwd =
obs = obs.tizen
#Comma separated list of repositories
repos = repo.tizen_latest
#repos = repo.tizen_main, repo.tizen_base [obs.tizen]
#OBS API URL pointing to a remote OBS.
url = https://api.tizen.org
#Optional user and password, set if differ from profile's user and password
#user =
#passwd = #Repo section example
[repo.tizen_latest]
#Build against repo's URL
url = http://download.tizen.org/releases/daily/trunk/ivi/latest/
#Optional user and password, set if differ from profile's user and password
#user =
#passwd = #Individual repo is also supported
#[repo.tizen_base]
#url = http://download.tizen.org/releases/daily/trunk/ivi/latest/repos/base/ia32/packages/
#[repo.tizen_main]
#url = http://download.tizen.org/releases/daily/trunk/ivi/latest/repos/ivi/ia32/packages/

修改为:

[general]
#Current profile name which should match a profile section name
profile = profile.tizen [profile.tizen]
#Common authentication info for whole profile
#user =
#CAUTION: please use the key name "passwd" to reset plaintext password
#passwd =
obs = obs.tizen
#Comma separated list of repositories
#repos = repo.tizen_latest
repos = repo.tizen_main, repo.tizen_base [obs.tizen]
#OBS API URL pointing to a remote OBS.
url = https://api.tizen.org
#Optional user and password, set if differ from profile's user and password
#user =
#passwd = #Repo section example
#[repo.tizen_latest]
#Build against repo's URL
#url = http://download.tizen.org/releases/daily/trunk/ivi/latest/
#Optional user and password, set if differ from profile's user and password
#user =
#passwd = #Individual repo is also supported
[repo.tizen_base]
#url = http://download.tizen.org/releases/daily/trunk/ivi/latest/repos/base/ia32/packages/
url = http://download.tizen.org/releases/daily/2.0alpha/ivi-wayland/tizen-2.0alpha_20130522.2/repos/base/ia32/packages/
[repo.tizen_main]
#url = http://download.tizen.org/releases/daily/trunk/ivi/latest/repos/ivi/ia32/packages/
url = http://download.tizen.org/releases/daily/2.0alpha/ivi-wayland/tizen-2.0alpha_20130522.2/repos/ivi-wayland/ia32/packages/

有关.gbs.config文件的格式说明请参照: http://blog.csdn.net/flydream0/article/details/9018443

2 本地编译源码

编译要求:

OS:Ubuntu12.04(64位)

内存:至少4G

Swap(交换分区大小):至少4G

注:内存和Swap大小都必要至少4G以上,不然会编译不过。操作系统必须是64位的,虽然在32位下也能源码编译通过,但是到后续制作镜像文件(使用mic工具时)会失败。

2.1 编译所有工程

输入如下指令进行编译:

cd到profile目录下, 然后通过如下指令对整个profile进行编译.

$ gbs build -A i586

接下来要花很长一段时间才能编译完。

编译完后如下界面:

2.2 编译单个工程

当然也可以只针对某个project进行编译,方法很简单,只需要cd到某个project的根目录,然后使用

$gbs build -A i586

即可。

如何编译tizen源码(图文教程)?的更多相关文章

  1. [转]如何编译tizen源码(图文教程)?

    http://blog.csdn.net/flydream0/article/details/9004746 前一篇文章已经介绍了如何下载tizen源码(http://blog.csdn.net/fl ...

  2. [转]如何下载tizen源码(图文教程)?

    http://blog.csdn.net/flydream0/article/details/8996654 当前tizen发布的最新源码版本是2.1,本文将以图文教程讲述如何下载tizen源码,关于 ...

  3. 编译android源码官方教程(2)建立编译环境「linux & mac osx」

    https://source.android.com/source/initializing.html Establishing a Build Environment IN THIS DOCUMEN ...

  4. 编译android源码官方教程(6)编译内核

    Building Kernels IN THIS DOCUMENT Selecting a kernel Identifying kernel version Downloading sources ...

  5. 编译android源码官方教程(5)编译完之后刷机、编译fastboot

    Running Builds IN THIS DOCUMENT Building fastboot and adb Booting into fastboot mode Unlocking the b ...

  6. 编译android源码官方教程(4)开始编译

    Preparing to Build IN THIS DOCUMENT Obtain proprietary binaries Download proprietary binaries Extrac ...

  7. 编译android源码官方教程(3)下载代码

    https://source.android.com/source/downloading.html Downloading the Source IN THIS DOCUMENT Installin ...

  8. 编译android源码官方教程(1)硬件、系统要求

    https://source.android.com/source/requirements.html Requirements IN THIS DOCUMENT Hardware requireme ...

  9. 在Ubuntu-14.04.3配置并成功编译Android6_r1源码

    折腾了一周,终于把Android6_r1的源码编译成功.先上图,这是在ubuntu中运行的Android模拟器: 由于我是在win8中安装虚拟机VMware,然后在虚拟机中安装Ubuntu进行编译,所 ...

随机推荐

  1. ViewPager引导页效果实例源码

    首先大家先找到本地的sdk,然后找到Google提供的API,具体查找方法如下:sdk——>docs——>index.html——>develop——>training——&g ...

  2. ThinkPHP - I 函数

    ThinkPHP函数详解:I方法   浏览:144722 发布日期:2013/06/01 分类:文档教程 关键字: 函数 ThinkPHP的I方法是3.1.3版本新增的,如果你是之前的3.*版本的话, ...

  3. 【Hibernate】Illegal attempt to associate a collection with two open sessions

    今天在用Hibernate对对象进行修改操作的时候报了这个错. 之前一直没什么错误,但是今天修改了一下表结构,增加了一个OneToMany的映射. 所以在我获取对象,重新set一个变量之后就报了这个错 ...

  4. ActionBar开启Overlay Mode(覆盖模式)

    以下内容参考自Android官网http://developer.android.com/training/basics/actionbar/overlaying.html#EnableOverlay ...

  5. 轻量级数据库sqlite的接口说明

    原文地址:http://www.cnblogs.com/kfqcome/archive/2011/06/27/2136999.html 一.使用流程 要使用sqlite,需要从sqlite官网下载到三 ...

  6. [Swust OJ 893]--Blocks

    题目链接:http://acm.swust.edu.cn/problem/893/ Time limit(ms): 1000 Memory limit(kb): 65535   Josh loves ...

  7. STL中deque

    以下学习一下STL中另一种序列容器——deque. deque表示double-ended queue,即双向队列,deque是通过作为动态数组的方式实现的,这样可以在两端插入元素.因此,deque可 ...

  8. Gradle构建Java Web应用:Servlet依赖与Tomcat插件(转)

    Gradle的官方tutorial介绍了构建Java Web应用的基本方法.不过在使用Servlet做上传的时候会碰到问题.这里分享下如何通过Servlet上传文件,以及如何使用Gradle来构建相应 ...

  9. block 解析 - 简介

    简介 block 类似标准的c函数,除了一些函数体一些可执行的代码,还可以把变量绑定到自动栈或者托管堆上.....和js里的闭包.c# lambda表达式有些类似,实质是一个函数指针.与函数指针的区别 ...

  10. javascript每日一练(十一)——多物体运动

    一.多物体运动 需要注意:每个运动物体的定时器作为物体的属性独立出来互不影响,属性与运动对象绑定,不能公用: 例子1: <!doctype html> <html> <h ...