Firefox OS 学习——B2G 源码获取和build code
来源:互联网 发布:英文软件界面翻译工具 编辑:程序博客网 时间:2024/06/07 19:52
参考文章:Building and installing Firefox OS
这篇文件简单说下,自己实践获取B2G的源码并编译。
硬件要求:
1. An installed 64 bit GNU/Linux distribution (we recommend Ubuntu 12.04).
2. At least 4 GB of RAM/swap space.
3. At least 20 GB of available hard disk space.
我的硬件RAM 2GB,自己增加SWAP space到4.1GB,具体方法参考Ubuntu搭建android编译环境总结 这篇文章中第7个错误的位置。
软件要求:
You will also need the following tools installed:
autoconf 2.13
bison
bzip2
ccache
curl
flex
gawk
git
gcc / g++ / g++-multilib
make
OpenGL headers
patch
X11 headers
32-bit ncurses
32-bit zlib
sudo apt-get install autoconf2.13 bison bzip2 ccache curl flex gawk gcc g++ g++-multilib git ia32-libs lib32ncurses5-dev lib32z1-dev libgl1-mesa-dev libx11-dev make zip这里面在安装的时候,可能会涉及到一些依赖的包,按照提示安装即可。如果在64位的系统中编译,需要在执行以下命令
$ sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so获取source code:
$ git clone https://github.com/mozilla-b2g/B2G.git这个完成后,挥发先B2G文件下,只有一些脚本文件,根本没有source code 。接下来要继续执行
$ cd B2G$ ./config.sh emulator
目前Firefox OS 支持的设备和模拟器
$ ./config.shValid devices to configure are:
- galaxy-s2
- galaxy-nexus
- nexus-4
- nexus-s
- nexus-s-4g
- otoro
- unagi
- inari
- keon
- peak
- leo
- hamachi
- helix
- tara
- pandaboard
- emulator
- emulator-jb
- emulator-x86
- emulator-x86-jb
此时,已经在获取source code,下载过android source code的人都应该知道这是一个漫长的过程啊。
其实在你下载完成后,在ubuntu Terminal的最后一行会有run ./build.sh类似的提示。不过在编译之前呢,先获取下最新的code
$ git pull$ ./repo sync
当然,你也可以只更新某一模块的code,比如:
$ ./repo sync gaia$ ./repo sync gecko$ ./repo sync gonk-misc/
build code:
直接执行以下命令
$ ./build.sh -j2
这个-j2 是编译的线程数,这个最好和自己PC的cpu核数一致。当然也可以不需要 -j2这个参数的。build时间可能稍长点。
所有可以单独编译的modules 列表
$ ./build.sh modules
启动emulator:
$./run-emulator.sh模拟器启动后感觉和android的模拟器一样的,其实不然,稍等要进入firefox os home 会发现不同的。
以上这张图片就是启动模拟器后,firefox os的UI中的一部分了。
- Firefox OS 学习——B2G 源码获取和build code
- Firefox OS——B2G for G1 Dream 编译及运行
- Firefox OS 学习——Firefox OS 知识
- Firefox OS启动过程分析-b2g进程启动(序)
- Firefox OS启动过程分析-b2g进程启动
- Firefox OS 学习——学习目录
- Firefox OS 学习——Gaia settings源码分析(一)
- Firefox OS 源码泄露!!!
- Firefox OS 学习——Gaia 编译分析
- Firefox OS 学习——manifest.webapp结构分析
- Chromium OS——下载源码6之获取源码
- Android学习——Mac Os X下载和编译android 4.2.2 源码
- Firefox OS 学习 -- gaia编译
- firefox os 开发踩地雷游戏源码
- Build android source code 2 -- 下载源码
- NFC学习—— code编译和code结构
- NFC学习—— code编译和code结构
- 获取Version 和 Build
- MySql获取某个字段存在于在那个表
- 利用phantomjs抓取js生成的页面
- thinkphp的select和find的区别
- H264源码分析(四)
- Android SoundPool 的使用以及原理分析
- Firefox OS 学习——B2G 源码获取和build code
- 图的匹配问题与最大流问题(四)——计算图的边连通度和点连通度
- 不标准分辨率的适配,S4与Sonyl36h。
- NFC学习——NFC Enable 过程分析(一)
- Linux常见问题归类
- Kinect安装与配置(openNI2)
- Activity的几种跳转及传值方式详解
- PHPUnit&Selenium----------(二)小试牛刀
- configure: error: C++ compiler cannot create executables