Compilation environment: Ubuntu12.0464-bit preparation compiling environment: 1. install the software library required for the software sudoapt-getinstallautoconf2.13ccachebisonflexlibncurses5-devmakecurlbzip2 compiling environment depends on the current system environment, FirefoxOS will check the dependency software library information during compilation, you can install the required software based on the Compilation error information.
Compiling environment:
Ubuntu 12.04 64-bit
Prepare the compiling environment:
1. install required software
Sudo apt-get install autoconf2.13 ccache bison flex libncurses5-dev make curl bzip2
The software library that the compiling environment depends on is related to the current system environment. Firefox OS checks the information of the dependent software library during compilation. you can install the required software library according to the compilation error information.
2. Download the source code
Git clone https://github.com/mozilla-b2g/B2G.git
Cd B2G
Note: If the entire code directory is copied from another computer, run./build. sh clean first.
3. Configure the B2G Device
Select one of the following lists during config. Please select according to your device model. If you do not have the corresponding mobile phone, you can use the command./config. sh emulator to compile the Virtual Machine runtime environment.
./Config. sh
Usage:./config. sh (device name)
Galaxy-s2
-Galaxy-nexus
-Nexus-s
-Otoro
-Pandaboard
-Emulator
Emulator-x86
3. Compile
./Build. sh
Multi-threaded compilation. You can use./build. sh-j8. The parameter-j indicates that the compiler can start several threads for compilation at the same time.
Learn more:
Https://developer.mozilla.org/en-US/docs/Mozilla/Boot_to_Gecko/Preparing_for_your_first_B2G_build