diff options
Diffstat (limited to 'files/de/archive/b2g_os/firefox_os_build_prerequisites/index.html')
-rw-r--r-- | files/de/archive/b2g_os/firefox_os_build_prerequisites/index.html | 446 |
1 files changed, 0 insertions, 446 deletions
diff --git a/files/de/archive/b2g_os/firefox_os_build_prerequisites/index.html b/files/de/archive/b2g_os/firefox_os_build_prerequisites/index.html deleted file mode 100644 index 0c2f90d39c..0000000000 --- a/files/de/archive/b2g_os/firefox_os_build_prerequisites/index.html +++ /dev/null @@ -1,446 +0,0 @@ ---- -title: Firefox OS build prerequisites -slug: Archive/B2G_OS/Firefox_OS_build_prerequisites -translation_of: Archive/B2G_OS/B2G_OS_build_prerequisites ---- -<p>Vor dem Holen des Codes zum Bauen von Firefox OS benötigt man ein geeignet konfiguriertes <a href="https://developer.mozilla.org/en-US/docs/Developer_Guide/Build_Instructions" title="https://developer.mozilla.org/en-US/docs/Developer_Guide/Build_Instructions">Build-System</a>. Im folgenden wird dieser Vorgang beschrieben. Zur Zeit eignen sich 64-bit-Linux-Distributionen und Mac OS X.</p> -<div class="note"> - <p><strong>Anmerkung:</strong> Wenn man Firefox OS auf ein Telefon installieren will, beginnt man, ohne das Telefon an den Computer angeschlossen zu haben. Im Text wird dann später erklärt, wann man das Telefon anschließen muß.</p> -</div> -<h2 id="Kompatibles_Gerät_oder_Emulator_besorgen">Kompatibles Gerät oder Emulator besorgen</h2> -<p><span id="answer_long0" style="display: block;">Das System kann nur für ein kompatibles Gerät (i.a. ein Smartphone) oder einen Emulator gebaut werden. Obwohl wir diverse Geräte unterstützen, gibt es für einige von diesen unterschiedliche Ausführungen. Von diesen Ausführungen unterstützen wir zur Zeit nur bestimmte, und außerdem werden einige Geräte besser unterstützt als andere.</span></p> -<div class="note"> - <p><span style="display: block;"><strong>Anmerkung:</strong> Mozillas <a href="https://github.com/mozilla-b2g/B2G">B2G-Quellcode</a> ist die Referenzimplementation von B2G, aber Telefonherstellern ist es freigestellt, Fehlerkorrekturen ("Patches") hinzuzufügen oder andere Änderungen vorzunehmen. Wenn man zum Beispiel ein Alcatel One Touch kauft, läuft darauf eine herstellerspezifische Version. Das ist für die installierten Apps irrelevant, aber unter Umständen kann es auf Plattform-Ebene Unterschiede geben. Die Version für das Nexus-4 ("Nexus 4 Port") wird direkt von Mozilla gepflegt, also ist es viel wahrscheinlicher, dass dieses Telefon mit unserer Gecko-Version auf Anhieb funktioniert, als zum Beispiel bei Rang-3-Geräten.</span></p> -</div> -<h3 id="Rang_1_(Tier_1)">Rang 1 (Tier 1)</h3> -<p>Tier-1-Geräte werden bei der Entwicklung bevorzugt und sind typischerweise die ersten, die Fehlerkorrekturen ("bugfixes") und Erweiterungen ("feature updates") erhalten.</p> -<dl> - <dt> - Keon</dt> - <dd> - Keon ist ein Gerät der FIrma <a href="http://www.geeksphone.com/" title="http://www.geeksphone.com/">Geeksphone</a> und eines der ersten Entwicklertelefone. Beachte, dass Binärpakete ("builds") für diese Geräte von Geeksphone bereitgestellt werden.</dd> - <dt> - Inari</dt> - <dd> - Inari ist ein weiteres Testgerät. Benutze diese Konfiguration, um FirefoxOS für die ZTE-Open-Geräte zu bauen. <strong>Warnung:</strong> Neuere Firefox-OS-Builds könnten auf ZTE Open Probleme beim Booten von der Standard-Boot-Partition machen.</dd> - <dt> - Flame</dt> - <dd> - Flame is Mozillas neues Standard-Referenztelefon für Firefox OS. Die Konfiguration für Flame sollte auch verwendet werden, wenn man für das Gerät ZTE Open C baut, weil beide Geräte auf der Android-Jellybean-Basis aufbauen.</dd> - <dt> - </dt> - <dt> - <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Using_the_B2G_emulators" title="en-US/docs/Mozilla/Firefox_OS/Using_the_B2G_emulators">Emulatoren (ARM und x86)</a></dt> - <dd> - Zur Zeit gibt es zwei Emulatoren, einen für die Emulation eines ARM-Prozessors und einen für die Emulation eines x86-Prozessors. <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Using_the_B2G_emulators" title="/en-US/docs/Mozilla/Firefox_OS/Using_the_B2G_emulators">Hier erfährt man mehr über die Installation und die Verwendung der Emulatoren</a>.</dd> - <dd> - <strong>Achtung: Der x86-Emulator ist derzeit nicht praxistauglich, sowohl was die Installation angeht als auch die Unterstützung.</strong></dd> - <dt> - </dt> - <dt> - <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Using_the_B2G_desktop_client" title="/en-US/docs/Mozilla/Firefox_OS/Using_the_B2G_desktop_client">Desktop</a></dt> - <dd> - Man kann auch eine Version von Firefox OS für Desktop-Rechner bauen; diese führt <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Gecko" title="/en-US/docs/Mozilla/Gecko">Gecko</a> in einer <a href="https://developer.mozilla.org/en-US/docs/XULRunner" title="/en-US/docs/XULRunner">XULRunner</a>-Anwendung aus und darin Benutzerumgebung <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Gaia/Introduction_to_Gaia" title="/en-US/docs/Mozilla/Firefox_OS/Platform/Gaia/Introduction_to_Gaia">Gaia</a>.</dd> - <dt> - Flatfish</dt> - <dd> - Flatfish ist das erste für Firefox OS entwickelte Tablet, auf dem jedoch einige Telefoniefunktionen fehlen. Es werden ein paar <a href="https://github.com/flatfish-fox/flatfish-kernel">spezielle Einstellungen</a> benötigt, um den Code zu bauen.</dd> -</dl> -<p>Natürlich kann man den <a href="/en-US/docs/Mozilla/Firefox_OS/Using_the_B2G_desktop_client" title="en-US/docs/Mozilla/Firefox_OS/Using_the_B2G_desktop_client">Desktop-Client</a> und die <a href="/en-US/docs/Mozilla/Firefox_OS/Using_the_B2G_emulators" title="en-US/docs/Mozilla/Firefox_OS/Using_the_B2G_emulators">Emulatoren</a> auch bauen, ohne ein Telefon zu benutzen.</p> -<h3 id="Rang_2_(Tier_2)">Rang 2 (Tier 2)</h3> -<p><span id="answer_long1" style="display: block;">Bei den Tier-2-Geräten ist die Grundfunktionalität gegeben, und viele Entwickler, insbesondere App-Entwickler, arbeiten damit, daher sind es üblicherweise die nächsten Geräte (nach Tier-1), für die Änderungen bereitgestellt werden.</span></p> -<dl> - <dt> - <a href="/en-US/docs/Mozilla/Firefox_OS/Samsung_Nexus_S" title="/en-US/docs/Mozilla/Firefox_OS/Samsung_Nexus_S"><span class="link-https">Samsung Nexus S</span></a></dt> - <dd> - Die einzigen Varianten dieses Smartphones, von denen bekannt ist, daß sie mit Firefox OS funktionieren, sind GT-I9020A (mit Amoled-Bildschirm) and GT-I9023 (Billigmodell mit LCD). Möglicherweise funktionieren aber auch weitere.</dd> - <dt> - Samsung Nexus S 4G</dt> - <dd> - The SPH-D720 is supported as a tier 2 device.</dd> -</dl> -<h3 id="Rang_3_(Tier_3)">Rang 3 (Tier 3)</h3> -<p><span id="answer_long1" style="display: block;">Man kann Firefox OS für diese Geräte bauen, aber die Hauptentwickler verwenden sie nicht regelmäßig. Bezüglich Stabilität, Zuverlässigkeit und Funktionsvielfalt stehen sie daher den Tier-1- und Tier-2- Geräten möglicherweise nach.</span></p> -<dl> - <dt> - Samsung Galaxy S2</dt> - <dd> - Nur die Variante i9100 funktioniert, keine andere, zumindest nicht offiziell (i9100P könnte auch funktionieren, da sie sie sich nur durch einen zusätzlichen NFC-Baustein unterscheidet.)</dd> - <dt> - Samsung Galaxy Nexus</dt> - <dd> - Zur Zeit ist keine Variante bekannt, die nicht funktioniert.</dd> - <dt> - Nexus 4</dt> - <dd> - Einige Anwender haben laut IRC dieses Gerät mit Erfolg getestet. Möglicherweise muß man für den Fall, daß man Android 4.4 installiert hat, vorher auf 4.3 zurückgehen (Android- <a href="https://developers.google.com/android/nexus/images#occamjwr66y">Betriebssystem-Images sind bei Google erhältlich</a>)</dd> - <dt> - Nexus 5</dt> - <dd> - Einige Anwender haben laut IRC dieses Gerät mit Erfolg getestet.</dd> - <dt> - Tara</dt> - <dd> - Tara ist ebenfalls ein Testgerät. Das "Manifest" für Tara existiert nur im "master branch". Um den Tara-Code zu erhalten, ruft man folgendes Script auf: "BRANCH=master ./config.sh tara".</dd> - <dt> - Unagi</dt> - <dd> - Unagi ist ein Telefon, das als Test- und Entwicklungsplattform für einfache bis Mittelklasse- Smartphones verwendet wird. Viele Core-Firefox-OS-Entwickler arbeiten auf Unagi.</dd> - <dt> - <a href="/en-US/docs/Mozilla/Firefox_OS/Pandaboard" title="/en-US/docs/Mozilla/Firefox_OS/Pandaboard">Pandaboard</a></dt> - <dd> - Das Pandaboard ist eine Entwicklungsplatine ("Board"), die auf der OMAP-4-Architektur basiert, und wird verwendet, um auf mobilen Plattformen zu entwickeln.</dd> -</dl> -<div class="warning"> - <strong>Wichtig</strong>: Nur solche Geräte werden unterstützt, auf denen mindestens <strong>Android 4</strong> (alias <strong>Ice Cream Sandwich</strong>) lauffähig ist. Für den Fall, daß ein Gerät oben aufgeführt ist, aber ein älteres Android-System installiert ist, muß man erst eine neuere Android-Version installieren.</div> -<div class="note"> - <p>Bemerkung: Tier-2 und Tier-3-Geräte haben einen virtuellen, d.h durch Software dargestellten, Home-Button anstelle eines physikalischen.</p> - <p>Alle Tier-1-Geräte haben dagegen einen physikalischen "Home"-Button, mit dem man bei Betätigen stets auf den Startbildschirm zurückkehrt. Die meisten Android-Geräte für Version 4 oder später haben einen auf dem Bildschirm dargestellten "Home"-Button. Auch Firefox OS kann solch eine Schaltfläche darstellen; sie wird automatisch bei entsprechenden Geräten aktiviert. Wenn dies versagen sollte, muß man die Einstellungen öffnen und zu den Geräteinformationen navigieren, dort dann "<span style="line-height: 1.5em; font-size: 14px;">Weitere Informationen" öffnen und "Entwicklermenü" einschalten (falls noch nicht geschehen). Dann wieder zurück zu den Einstellungen navigieren und das Entwickler-Menü öffnen, dort "Software-Startschaltfläche" einschalten.</span></p> -</div> -<h2 id="Anforderungen_für_Linux">Anforderungen für Linux</h2> -<p>Um auf Linux bauen zu können, benötigt man:</p> -<ul> - <li>eine installierte <strong>64bit GNU/Linux</strong>-Distribution (wir empfehlen Ubuntu 12.04).</li> - <li>mindestens <strong>4 GB</strong> RAM/swap</li> - <li>mindestens <strong>20 GB</strong> verfügbaren Massenspeicher</li> -</ul> -<p>Das ist zwar etwas mehr, als tatsächlich benötigt wird, aber mitunter kommt es vor, daß der Erstellungsprozeß gerade deswegen fehlschlägt, weil ein wenig Speicher fehlt.</p> -<p>Außerdem werden folgende Dienstprogramme benötigt und müssen ggf. nachinstalliert werden:</p> -<ul> - <li><strong>autoconf 2.13</strong></li> - <li><strong>bison</strong></li> - <li><strong>bzip2</strong></li> - <li><strong>ccache</strong></li> - <li><strong>curl</strong></li> - <li><strong>flex</strong></li> - <li><strong>gawk</strong></li> - <li><strong>git</strong></li> - <li><strong>gcc / g++ / g++-multilib</strong></li> - <li><strong>make</strong></li> - <li><strong>OpenGL shared libraries</strong></li> - <li><strong>patch</strong></li> - <li><strong>X11 headers</strong></li> - <li><strong>32-bit ncurses</strong></li> - <li><strong>32-bit zlib</strong></li> -</ul> -<h3 id="Installation_im_Falle_eines_64-Bit-Linux">Installation im Falle eines 64-Bit-Linux</h3> -<p>Im folgenden werden die Kommandos aufgeführt, mit denen man die notwendigen Programmpakete für das Bauen von Firefox OS installieren kann.</p> -<h4 id="Ubuntu_12.04_Linux_Mint_13_Debian_6">Ubuntu 12.04 / Linux Mint 13 / Debian 6</h4> -<p>Diese Kommandos in einem Terminal-Fenster ausführen:</p> -<pre class="language-html"><code class="language-html">sudo apt-get update -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</code></pre> -<p>Für den Fall, daß Firefox OS für das Referenzgerät <a href="https://developer.mozilla.org/en-US/Firefox_OS/Developer_phone_guide/Flame">"Flame"</a> oder Nexus 5 gebaut wird, diese Kommandos auführen:</p> -<p><code class="language-html">sudo apt-get install libxml2-utils</code></p> -<p>Ein Java-Entwicklungspaket ("JDK") kann von <a href="http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html">dieser Paketquelle (ppa</a>) installiert werden.</p> -<p>Bitte auch die obigen Anmerkungen berücksichtigen, die die Probleme beschreiben, die auftreten, wenn man für einen Emulator baut!</p> -<h4 id="Ubuntu_12.10_Debian_7">Ubuntu 12.10 / Debian 7</h4> -<p>Das folgende Kommando im Terminal-Fenster ausführen:</p> -<pre>$ sudo apt-get install autoconf2.13 bison bzip2 ccache curl flex gawk gcc g++ g++-multilib gcc-4.6 g++-4.6 g++-4.6-multilib git ia32-libs lib32ncurses5-dev lib32z1-dev libgl1-mesa-dev libx11-dev make zip</pre> -<p>Zusätzlich zu den oben erwähnte Schwierigkeiten beim Bauen für einen Emlator tritt hier noch das Problem auf, daß standardmäßig der Compiler in der Version gcc-4.7 verwendet wird, welcher den Compiliervorgang mit folgender Fehlermeldung abbricht:</p> -<p>"<code>KeyedVector.h:193:31: error: indexOfKey was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation"</code></p> -<p>Um diesen Fehler zu beheben, muß man auf die ältere Version gcc-4.6 als Standard-Compiler zurückgehen, und zwar am besten unmittelbar, nachdem man die Quellen für B2G heruntergeladen hat. Der Vorgang wird in der Anleitung "<a href="/en-US/docs/Mozilla/Firefox_OS/Customization_with_the_.userconfig_file#Changing_the_default_host_compiler">Changing the default host compiler</a>" (engl.) beschrieben.</p> -<p class="note">Bei einer unveränderten Ubuntu-12.10-Version gibt es eine Fehlermeldung wegen nicht erfüllter Abhängigkeiten der Systembibliotheken "ia32-libs". Dies wird mit diesen Befehlen behoben:</p> -<pre>sudo dpkg --add-architecture i386 -sudo apt-get update -sudo apt-get install ia32-libs</pre> -<h4 id="Ubuntu_13.04">Ubuntu 13.04</h4> -<p>Die folgenden Kommandos sind im Terminal-Fenster auszuführen:</p> -<pre>$ sudo apt-get install --no-install-recommends autoconf2.13 bison bzip2 ccache curl flex gawk gcc g++ g++-multilib gcc-4.6 g++-4.6 g++-4.6-multilib git ia32-libs lib32ncurses5-dev lib32z1-dev zlib1g:amd64 zlib1g-dev:amd64 zlib1g:i386 zlib1g-dev:i386 libgl1-mesa-dev libx11-dev make zip</pre> -<p>Auch hier muß von gcc-4.7 auf gcc-4.6 zurückgegangen werden, wie oben für Ubuntu 12.10 beschrieben.</p> -<h4 id="Ubuntu_13.10">Ubuntu 13.10</h4> -<p>With Ubuntu 13.10, multi-arch packages are now the main way to support multiple architectures (e.g. 32-bit on a 64-bit install). You must tell your Ubuntu system that you want to support 32-bit packages as well:<br> - </p> -<pre class="language-html"><code class="language-html">sudo dpkg --add-architecture i386 -sudo apt-get update</code></pre> -<p>Once you've completed that, then you can install the necessary packages:</p> -<pre class="language-html" style="font-family: 'Open Sans', sans-serif; line-height: 21px;"><code class="language-html">sudo apt-get install --no-install-recommends autoconf2.13 bison bzip2 ccache curl flex gawk gcc g++ g++-multilib gcc-4.6 g++-4.6 g++-4.6-multilib git lib32ncurses5-dev lib32z1-dev zlib1g:amd64 zlib1g-dev:amd64 zlib1g:i386 zlib1g-dev:i386 libgl1-mesa-dev libx11-dev make zip libxml2-utils - -sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 1 - -sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 2 - -sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 1 - -sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 2 - -sudo update-alternatives --set gcc "/usr/bin/gcc-4.6" - -sudo update-alternatives --set g++ "/usr/bin/g++-4.6"</code></pre> -<p>you can install the jdk via <a href="http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html">this ppa</a>.</p> -<h4 id="Ubuntu_14.04">Ubuntu 14.04</h4> -<p>Follow the instructions given for Ubuntu 13.10.</p> -<h4 id="Fedora_1920">Fedora 19/20</h4> -<p>Run the following command in Terminal:</p> -<pre class="note language-html"><code class="language-html">sudo yum install autoconf213 bison bzip2 ccache curl flex gawk gcc-c++ git glibc-devel glibc-static libstdc++-static libX11-devel make mesa-libGL-devel ncurses-devel patch zlib-devel ncurses-devel.i686 readline-devel.i686 zlib-devel.i686 libX11-devel.i686 mesa-libGL-devel.i686 glibc-devel.i686 libstdc++.i686 libXrandr.i686 zip perl-Digest-SHA wget</code></pre> -<p>The project should build correctly using the default compiler shipped with Fedora but if you encounter compilation errors you might need to install GCC 4.6.x:</p> -<ul> - <li><a href="http://people.mozilla.org/%7Egsvelto/gcc-4.6.4-fc19.tar.xz">Pre-compiled GCC 4.6.x for Fedora 19/20</a></li> -</ul> -<p>Download the tarball then install it to <code>/opt,</code> with the following command on Fedora 19/20:</p> -<pre class="note language-html"><code class="language-html">curl -O http://people.mozilla.org/~gsvelto/gcc-4.6.4-fc19.tar.xz -sudo tar -x -a -C /opt -f gcc-4.6.4-fc19.tar.xz</code></pre> -<p>To use GCC 4.6.x as the default host compiler you will have to set it explicitly after having retrieved the B2G sources: read <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Customization_with_the_.userconfig_file#Changing_the_default_host_compiler">Changing the default host compiler</a> to find out how to do it.</p> -<h4 id="Arch_Linux"><strong>Arch Linux</strong></h4> -<p>Run the following command in Terminal:</p> -<pre class="note language-html"><code class="language-html">sudo pacman -S --needed alsa-lib autoconf2.13 bison ccache curl firefox flex gcc-multilib git gperf libnotify libxt libx11 mesa multilib-devel wget wireless_tools yasm zip lib32-mesa lib32-mesa-libgl lib32-ncurses lib32-readline lib32-zlib</code></pre> -<p>To install the lib32-* packages you need to have the multilib repository enabled.</p> -<p>B2G <a href="https://developer.mozilla.org/en-US/Firefox_OS/Building#KeyedVector.h.3A193.3A31.3A_error.3A_indexOfKey_was_not_declared_in_this_scope">can only be compiled with gcc4.6.4</a>, and because Arch Linux always has bleeding edge software you will need to install <a href="https://aur.archlinux.org/packages/gcc46-multilib">gcc46-multilib from AUR</a>. Note that you will have to edit the PKGBUILD and add <code>staticlibs</code> to the <code>options</code> array, or gcc will be unable to compile B2G and give you a <code>cannot find -lgcc</code> error when compiling. You will also need to add the following to your <code>.userconfig</code> file:</p> -<pre class="language-html"><code class="language-html">export CC=gcc-4.6.4 -export CXX=g++-4.6.4</code></pre> -<p>By default, Arch Linux uses Python3. You'll have to force it to use the old python2. You can do that by linking the python2 executable to python but this is discouraged and considered error-prone. This will also break python 3 if it is installed on your system. A better way is to use <code>virtualenv</code>/<code>virtualenvwrapper</code>:</p> -<pre class="language-html"><code class="language-html">sudo pacman -S python-virtualenvwrapper -source /usr/bin/virtualenvwrapper.sh -mkvirtualenv -p `which python2` firefoxos -workon firefoxos</code></pre> -<p>Android will complain that you need make 3.81 or make 3.82 instead of 4.0. You can download <a href="https://aur.archlinux.org/packages/make-3.81/">make 3.81 from AUR</a>. This will install the make-3.81 binary on your path, you need to create a symlink named make to a location earlier in the PATH variable for the build to use the correct version.</p> -<pre class="language-html"><code class="language-html">mkdir -p ~/bin -ln -s `which make-3.81` ~/bin/make -export PATH=~/bin:$PATH</code></pre> -<p>Android also needs the Java6 SDK and Arch only has Java7. Unfortunately the aur build is broken, but you can still download the <a href="http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html#jdk-6u45-oth-JPR">Java 6 SDK</a> and install it manually. You will then need to put it in your path.</p> -<pre class="language-html"><code class="language-html">cp ~/Downloads/jdk-6u45-linux-x64.bin /opt -su -cd /opt -chmod +x jdk-6u45-linux-x64.bin -./jdk-6u45-linux-x64.bin -exit -ln -s /opt/jdk1.6.0_45/bin/java ~/bin/java</code></pre> -<h4 id="Gentoo_Linux"><strong>Gentoo Linux</strong></h4> -<h5 id="Installing_ccache">Installing ccache</h5> -<p>You will need to install <strong><a href="http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=3#doc_chap3">ccache</a></strong>, a tool for caching partial builds.</p> -<pre class="language-html"><code class="language-html"># emerge -av ccache</code></pre> -<p>Because ccache is known to frequently cause support issues, Gentoo encourages you to use it <em>explicitly</em> and <em>sparingly</em>.</p> -<p>To enable the required use of ccache, on <em>the subsequent step</em> of this guide where the <code>./build.sh</code> script is called, Gentoo users should instead run the command with an explicitly extended path, ie.</p> -<pre class="language-html"><code class="language-html">PATH=/usr/lib64/ccache/bin:$PATH ./build.sh</code></pre> -<h5 id="Generating_Partition_Images">Generating Partition Images</h5> -<p>If you are building B2G for actual physical hardware, then you may at some point also wish to generate some partition images for upload to your device. (For example, to restore backed up files to the device via the <strong><em>fastboot</em></strong> utility)</p> -<p>The filesystem image format used in this case is YAFFS2 (Yet Another Filesystem 2). Gentoo has support for the very latest (ie. git HEAD) <code>yaffs2-utils</code> userland package in portage. (Note: You will also need kernel patches if you want to mount YAFFS2 images, but this is not really required since you can deconstruct and rebuild them instead.)</p> -<pre class="language-html"><code class="language-html"># emerge --autounmask-write yaffs2-utils; etc-update; emerge -av yaffs2-utils</code></pre> -<p>In order to generate such an image, simply change to the parent directory of the partition filesystem tree you wish to package, and issue a command like this:</p> -<pre class="language-html"><code class="language-html">mkyaffs2image system/ system.img</code></pre> -<h2 id="sect1"> </h2> -<h2 id="Anforderungen_für_Mac_OS_X">Anforderungen für Mac OS X</h2> -<p>Um Firefox OS unter Mac OS X zu bauen, benötigt man etwas Vorarbeit, die unten detailiert beschrieben ist. Außerdem werden typische Irrtümer und Fehler und ihre Lösungen erläutert.</p> -<div class="note"> - <p><strong>Anmerkung: Das Bauen (und Konfigurieren der Quellen) von B2G für das Gerät Keon funktioniert nicht auf einem Mac OS-Rechner</strong>. Stattdessen muß man unter Linux bauen, ggf. auf demselben Rechner, auf dem auch Mac OS läuft.</p> -</div> -<h3 id="Passende_XCode-Versionen_für_Mac_OS_10.9"><strong>Passende XCode-Versionen</strong> für Mac OS 10.9</h3> -<p>XCode 4.2 oder älter sind nicht kompatibel mit OS X 10.9 ("Mavericks") und fallen daher ganz aus. Ansonsten gilt, daß man den ICS-Emulator nicht mit OS X 10.9 oder neuer bauen kann, und für das Gerät "flatfish" scheitert das Bauen mit allen Entwicklungsumgebungen der Versionen XCode 5.x.</p> -<table class="standard-table"> - <caption> - Version compatibility of OS X 10.9.x</caption> - <tbody> - <tr> - <td> </td> - <td>emulator (ICS)</td> - <td>flatfish/vixen (JB-4.2)</td> - <td>emulator-jb (JB-4.3)</td> - <td>emulator-kk (KitKat-4.4)</td> - </tr> - <tr> - <td>XCode 4.3.3</td> - <td style="text-align: center;">X</td> - <td style="text-align: center;">X</td> - <td style="text-align: center;">X</td> - <td style="text-align: center;">X</td> - </tr> - <tr> - <td>XCode 4.4.1</td> - <td style="text-align: center;">X</td> - <td style="text-align: center;">O[1]</td> - <td style="text-align: center;">O</td> - <td style="text-align: center;">O</td> - </tr> - <tr> - <td>XCode 4.5.2</td> - <td style="text-align: center;">X</td> - <td style="text-align: center;">O[1]</td> - <td style="text-align: center;">O</td> - <td style="text-align: center;">O</td> - </tr> - <tr> - <td>XCode 4.6.3</td> - <td style="text-align: center;">X</td> - <td style="text-align: center;">O[1]</td> - <td style="text-align: center;">O</td> - <td style="text-align: center;">O</td> - </tr> - <tr> - <td>XCode 5.0.2</td> - <td style="text-align: center;">X</td> - <td style="text-align: center;">X</td> - <td style="text-align: center;">O</td> - <td style="text-align: center;">O</td> - </tr> - <tr> - <td>XCode 5.1.1</td> - <td style="text-align: center;">X</td> - <td style="text-align: center;">X</td> - <td style="text-align: center;">O</td> - <td style="text-align: center;">O</td> - </tr> - <tr> - <td>XCode 6.0.1</td> - <td style="text-align: center;">X</td> - <td style="text-align: center;">X</td> - <td style="text-align: center;">X</td> - <td style="text-align: center;">X</td> - </tr> - <tr> - <td>XCode 6.1beta2</td> - <td style="text-align: center;">X</td> - <td style="text-align: center;">X</td> - <td style="text-align: center;">X</td> - <td style="text-align: center;">X</td> - </tr> - </tbody> -</table> -<ol> - <li>You must have environment variable <strong>BUILD_MAC_SDK_EXPERIMENTAL=1</strong> exported to build flatfish/vixen.</li> -</ol> -<h3 id="Install_XCode_Command_Line_Utilities"><strong>Install XCode Command Line Utilities</strong></h3> -<p>You need to install Xcode's Command Line Utilities. You can download <em>just</em> the Command Line Utilities from <a href="https://developer.apple.com/downloads/" title="https://developer.apple.com/downloads/">Apple's developer downloads page</a> for your particular version of OS X, however if you would like the entire Xcode suite of applications, you can <a class="external" href="http://itunes.apple.com/us/app/xcode/id497799835?mt=12" style="line-height: 1.572;" title="http://itunes.apple.com/us/app/xcode/id497799835?mt=12">install Xcode</a><span style="line-height: 1.572;"> through the Mac App Store. </span></p> -<p>Xcode 4.3.1 (OS X 10.7 "Lion") and other newer versions such as 4.4.1+ (that is, Mac OS X10.8 "Mountain Lion"), won't necessarily include the required Command Line Utilities. When you install Xcode, make sure to go into Preferences, then the Downloads panel, and install the Command Line Utilities. In addition, make sure you have at least 20 GB of free disk space.</p> -<p><img alt="Screenshot of Xcode Downloads Command Line Tools" src="/files/4557/xcode_downloads_command_line_tools.png" style="width: 750px; height: 528px;"></p> -<div class="note"> - <strong>Note:</strong> The Firefox OS emulator requires a Core 2 Duo processor or later; that is, a system that is compatible with Mac OS X 10.7 "Lion." You do not actually have to be running Lion, you just have to be compatible with it. You can, however, build any Firefox OS build on many older Macs.</div> -<h3 id="Run_Firefox_OS_Mac_Bootstrap">Run Firefox OS Mac Bootstrap</h3> -<p>Next, open a terminal and run the following command:</p> -<pre class="brush: bash">curl -fsSL https://raw.github.com/mozilla-b2g/B2G/master/scripts/bootstrap-mac.sh | bash</pre> -<p>This will pull and run a bootstrap script that makes sure you have all the prerequisites met to build the emulator. It will also prompt you for permission to install anything you're missing, and provide warnings and suggested fixes to problems. The script will check for and install the following items:</p> -<ul> - <li><code>git</code></li> - <li><code>gpg</code></li> - <li><code>ccache</code></li> - <li><code>yasm</code></li> - <li><code>autoconf-213</code></li> - <li><code>gcc-4.6</code></li> - <li><code>homebrew</code></li> -</ul> -<h4 id="Xcode_wrangling">Xcode wrangling</h4> -<p>If you have already upgraded to Xcode 4.4+ and get the message that Xcode is outdated, check the Xcode path with:</p> -<pre>xcode-select -print-path</pre> -<p>If it still points to <code>/Developer</code> you can update the path with:</p> -<pre>sudo xcode-select -switch /Applications/Xcode.app</pre> -<h4 id="Making_the_Mac_OS_X_10.6_SDK_available">Making the Mac OS X 10.6 SDK available</h4> -<p>You also need to have the Mac OS X 10.6 SDK available. The SDK needs to be available at</p> -<pre>/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/</pre> -<p>If it cannot be found there you will need to extract and copy it from Xcode 4.3. To do this:</p> -<ol> - <li>Download the XCode 4.3 .dmg file from the <a class="external" href="https://developer.apple.com/downloads/index.action">Apple Developer</a> portal (you'll need an <a href="https://developer.apple.com/register/index.action" title="https://developer.apple.com/register/index.action">Apple Developer account</a>).</li> - <li>Download the utility <a href="http://www.charlessoft.com/" title="http://www.charlessoft.com/">Pacifist</a> and use it to extract the 10.6 SDK from the XCode 4.3 .dmg file. Click on the "Extract Package" button, find the SDK by searching for 10.6 in the search box, then <em>Ctrl + click</em> on the MacOSX10.6.sdk directory and Extract it to a suitable location.</li> - <li>Add a symlink from the 10.6 SDK location to the <code>/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/</code> directory. For example, if you put the 10.6 SDK on your desktop, the comment would be</li> -</ol> -<pre>ln -s /Users/<em><yourusername></em>/Desktop/MacOSX10.6.sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/</pre> -<div class="note"> - <p><strong>Note</strong>: We can drop the 10.6 SDK requirement after <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=784227" title="https://bugzilla.mozilla.org/show_bug.cgi?id=784227">bug 784227</a> has been fixed, and our version of <a href="https://github.com/mozilla-b2g/B2G/issues/189" title="https://github.com/mozilla-b2g/B2G/issues/189">platform_build has been updated</a>.</p> -</div> -<h3 id="Be_aware_of_Mac_file_system_case_sensitivity">Be aware of Mac file system case sensitivity</h3> -<p>By default, Mac OS X ships with a case-insensitive file system. This is problematic because the Linux kernel has a number of files with the same name, but different case. For example, see the header files <code>xt_CONNMARK.h</code> and <code>xt_connmark.h</code>. This results in a number of files appearing to be modified in <code>/kernel</code> after a fresh <code>./config.sh</code>.</p> -<p>In many cases you can run the build just fine; for some platforms, however, you may encounter the following error:</p> -<pre><span class="quote">ERROR: You have uncommited changes in kernel -You may force overwriting these changes -with |source build/envsetup.sh force| - -ERROR: Patching of kernel/ failed.</span></pre> -<p><span class="quote">Please see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=867259" title="https://bugzilla.mozilla.org/show_bug.cgi?id=867259">bug 867259</a></span> for more discussion and possible fixes for this problem.</p> -<p>Alternatively, it will always be safest to build on a case sensitive file system. The easiest way to do this is to create a separate, mountable disk image with case-sensitivity enabled. You can do this using Apple's Disk Utility application or from the command line:</p> -<pre>hdiutil create -volname 'firefoxos' -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 40g ~/firefoxos.sparseimage</pre> -<p>Mount the drive with:</p> -<pre>open ~/firefoxos.sparseimage</pre> -<p>Change into the mounted drive with:</p> -<pre>cd /Volumes/firefoxos/</pre> -<p>You can then check out the code and compile from this location without worrying about case-sensitivity problems.</p> -<h3 id="Mountain_Lion_homebrew_gotcha">Mountain Lion homebrew gotcha</h3> -<div> - <div> - If you are on Mountain Lion and you receive an error during the installation of the dependencies via homebrew, such as:</div> -</div> -<div> - <pre>clang: error: unable to execute command: Segmentation fault: 11</pre> - ... try reinstalling the dependency manually adding the --use-gcc flag, for example: - <pre>brew install mpfr --use-gcc</pre> -</div> -<h3 id="Follow_Samsung_Galaxy_S2_extra_steps">Follow Samsung Galaxy S2 extra steps</h3> -<p>If you plan to build for the Samsung Galaxy S2, you will also need to install heimdall. See {{ anch("Installing heimdall") }} for details. This is <strong>not</strong> done for you by the bootstrap script!</p> -<div class="note"> - <strong>Note:</strong> If you have installed the <a class="external" href="http://www.samsung.com/us/kies/" title="http://www.samsung.com/us/kies/">Samsung Kies</a> tool, which is used to manage the contents of many Samsung phones, you will have to remove it before you can flash Firefox OS onto your device. You can use the standard application removal process on Windows; on Mac, the Kies install disk image has a utility to fully remove Kies from your system. Flashing <strong>will not work</strong> if you have Kies installed. If you forget to remove Kies, the build system will detect it and remind you to uninstall it. Note also that the uninstall tool does not correctly remove the folder <code>~/Library/Application Support/.FUS</code>, and leaves a reference to a utility there in your user startup items list. You will want to remove these manually.</div> -<h3 class="note" id="Fix_libmpc_dependency_if_broken">Fix libmpc dependency if broken</h3> -<p>gcc 4.6 was built with libmpc 0.9; if you then use homebrew to update packages, libmpc gets updated to version 1.0, but homebrew doesn't rebuild gcc 4.6 after the library version changes. So you need to create a symlink to make things work again, like this:</p> -<pre>cd /usr/local/lib/ -ln -s libmpc.3.dylib libmpc.2.dylib</pre> -<h3 id="Optional_Install_HAX">Optional: Install HAX</h3> -<p>Intel provides a special driver that lets the B2G emulator run its code natively on your Mac instead of being emulated, when you're using the x86 emulator. If you wish to use this, you can <a class="external" href="http://software.intel.com/en-us/articles/intel-hardware-accelerated-execution-manager/" title="http://software.intel.com/en-us/articles/intel-hardware-accelerated-execution-manager/">download and install</a> it. It's not required, but it can improve emulation performance and stability. </p> -<p>Before you install HAX you will need to install the <a href="http://developer.android.com/sdk/index.html" title="http://developer.android.com/sdk/index.html">Android SDK</a>.</p> -<h2 class="note" id="Install_adb">Install adb</h2> -<p>The build process needs to pull binary blobs from the Android installation on the phone before building B2G (unless you're building the emulator, of course). For this, you will need <code>adb</code>, the Android Debug Bridge.</p> -<p>You can download and install <code>adb</code> as part of the Android SDK package, for Mac, Linux or Windows - visit the <a href="http://developer.android.com/sdk/index.html">Get the Android SDK</a> page.</p> -<p>Newer Linux distributions have <code>adb</code> already in their repositories. For Ubuntu 12.10 and later, run the following command:</p> -<pre>sudo apt-get install android-tools-adb</pre> -<p>Or for Fedora 18/19:</p> -<pre>sudo yum install android-tools</pre> -<p>If your distribution does not have packages for <code>adb </code>available (i.e. Ubuntu 12.04 or Fedora 17), you'll need to install the <a class="external" href="http://developer.android.com/sdk/index.html" title="http://developer.android.com/sdk/index.html">Android SDK starter package</a> for your platform (you'll want the <em>ADT Bundle</em>, not the <em>SDK Tools Only</em> option). Then run their package manager, <code>$SDK_HOME/tools/android</code>, and use the GUI to install "Android SDK Platform-tools".</p> -<p>Find out where <code>adb</code> is installed (usually in <code>usr/bin</code>, possibly additionally inside <code>adt/platform-tools</code>, depending on how you installed it). Be sure to add this directory to your <code>PATH</code>. This can be done by adding the line</p> -<pre>PATH=$SDK_HOME:$PATH</pre> -<p>replacing <code>$SDK_HOME</code> with the location of the android sdk, to your <code>~/.bashrc</code> or equivalent.</p> -<h2 class="note" id="Install_heimdall">Install heimdall</h2> -<p>Heimdall is a utility for flashing the Samsung Galaxy S2. It's used by the Boot to Gecko flash utility to replace the contents of the phone with Firefox OS, as well as to flash updated versions of B2G and Gaia onto the device. You'll need it if you want to install Firefox OS on a Galaxy S2; it is <strong>not</strong> needed for any other device. For other devices, we build and use the fastboot utility instead.</p> -<div class="note"> - <strong>Note:</strong> Again, it's important to note that this is <strong>only required for installing Firefox OS on the Samsung Galaxy S2</strong>.</div> -<p>There are two ways to install heimdall:</p> -<ul> - <li>You can <a class="link-https" href="https://github.com/Benjamin-Dobell/Heimdall" title="https://github.com/Benjamin-Dobell/Heimdall">download the code</a> GitHub and build it yourself.</li> - <li>Use a package manager to install it. - <ul> - <li>On Linux: <code>sudo apt-get install libusb-1.0-0 libusb-1.0-0-dev</code></li> - <li>On Mac, you can <a class="link-https" href="https://github.com/downloads/Benjamin-Dobell/Heimdall/heimdall-suite-1.3.2-mac.dmg" title="https://github.com/downloads/Benjamin-Dobell/Heimdall/heimdall-suite-1.3.2-mac.dmg">download an installer package</a> and use that.</li> - </ul> - </li> -</ul> -<h2 id="Configure_ccache">Configure ccache</h2> -<p>The B2G build process uses ccache. The default cache size for ccache is 1GB, but the B2G build easily saturates this; around 3GB is recommended. You can configure your cache by running the following command inside terminal:</p> -<pre><code>$ ccache --max-size 3GB</code></pre> -<h2 id="For_Linux_configure_the_udev_rule_for_your_phone">For Linux: configure the udev rule for your phone</h2> -<div class="note"> - <p>Note: This section is specific to Linux; Mac OSX has the necessary device permissions set up already.</p> -</div> -<p>Next, you need to confingure the udev rule for your phone,</p> -<p>You can get the USB vendor ID by running <code>lsusb</code> with your phone plugged in, but typically it's Google <code>18d1,</code> Samsung <code>04e8</code>, ZTE <code>19d2</code>, Geeksphone/Qualcomm <code>05c6</code>. Add this line in your <code>/etc/udev/rules.d/android.rules</code> file (replacing <code>XXXX</code> with the ID for your device):</p> -<pre>SUBSYSTEM=="usb", ATTR{idVendor}=="XXXX", MODE="0666", GROUP="plugdev"</pre> -<p>Take ZTE for example, the content in android.rules will be</p> -<pre style="font-size: 14px;">SUBSYSTEM=="usb", ATTR{idVendor}=="19d2", MODE="0666", GROUP="plugdev"</pre> -<div class="note"> - <p><span style="line-height: 1.572;">If the file doesn't exist, create it. The <code>rules.d</code> directory is usually read only by default, so you may have to use <code>chmod</code> to make the directory writeable, or the file, or both.</span></p> -</div> -<p><span style="line-height: 1.572;">Once you've saved the file, and closed it, make the file readable:</span></p> -<pre>$ sudo chmod a+r /etc/udev/rules.d/android.rules -</pre> -<p>Now that the udev rules have been updated, restart the udev daemon. For ubuntu:</p> -<pre>sudo service udev restart</pre> -<p>Finally, unplug and the USB cable but don't replug it in because we need to enable remote debugging on the phone first.</p> -<h2 id="Enable_remote_debugging">Enable remote debugging</h2> -<p>Before you plug your phone back into your USB port, put it USB developer mode. This allows you to debug and flash the phone. To enable developer mode, on your phone select <code>Settings app</code> -> <code>Device information</code> -> <code>More Information</code> -> <code>Developer</code> -> <code>Remote debugging</code> (this was called Developer mode on older versions.) Once the option is checked, remote debugging is enabled, and you are ready to go.</p> -<p>At this point, connect your phone to your computer via a USB cable (if you created the udev rule before, this will trigger udev to detect the phone and create the device node with the right permissions). Now you can check if you can list your device via the <code>adb devices</code> command. If everything has worked ok, you should see an output similar to this (the following is for a Geeksphone Keon):</p> -<pre style="font-size: 14px;">$ adb devices -List of devices attached -full_keon device</pre> -<p>If the device did not list as expect, check the file name and the script are all correct (see previous section), then restart the computer and retype the command again. Note also that if your device uses fastboot, the bootloader may identify itself with a different vendor ID than the one you see when the device boots normally.</p> -<h2 id="Backup_the_phone_system_partition">Backup the phone system partition</h2> -<div class="warning"> - <p><strong>Note:</strong> You have to do this before you build your device if you do not have existing system backup. Because some libraries will be referenced in build time. These library might be proprietary so we can't provide in our code base.</p> -</div> -<p>It is recommended to back up the entire Android system partition on your phone.</p> -<p>You can use this copy of the binary blobs for Android in case you later delete your B2G tree. To do this, run:</p> -<pre>adb pull /system <backup target dir>/system -</pre> -<p> Depending on the phone, you may also need to pull the /data and/or /vendor directories:</p> -<pre>adb pull /data <backup target dir>/data -adb pull /vendor <backup target dir>/vendor -</pre> -<p>If the pull commands fail with "insufficient permission" message, try the following:</p> -<ul> - <li>stop and restart the adb server, or if that fails,</li> - <li>double-check that you have granted <em>root</em> permissions to the 'adb' tool within your custom ROM (e.g. under CyanogenMod, change 'Settings -> System -> Developer Options -> Root Access' to 'Apps and ADB' or 'ADB only').</li> - <li>Verify that you have set up the udev rule correctly (see {{ anch("For Linux: configure the udev rule for your phone") }}.</li> -</ul> -<h2 id="On_to_the_next_step">On to the next step</h2> -<pre>At this point, you should be ready to <a href="/en-US/docs/Mozilla/Firefox_OS/Preparing_for_your_first_B2G_build" title="en-US/docs/Mozilla/Firefox_OS/Preparing_for_your_first_B2G_build">fetch the Firefox OS code</a>!</pre> |