12
edits
(Added section on contributing back) |
(→Flash the images you build: Changed a link. The previous link redirected twice before showing the correct page.) |
||
| (18 intermediate revisions by 9 users not shown) | |||
| Line 1: | Line 1: | ||
= Developing for the Tablet = | = Developing for the Tablet = | ||
<p>The primary Firefox OS build documentation, including pre-requisites, set-up, building, flashing, and FAQs are all available at https://developer.mozilla.org/en-US/Firefox_OS/Building_and_installing_Firefox_OS</p><p>This is meant to be a quick reference guide specific to the Tablet Contribution Program and the first tablet device which is named in the project as "flatfish".</p> | <p>The primary Firefox OS build documentation, including pre-requisites, set-up, building, flashing, and FAQs are all available at https://developer.mozilla.org/en-US/Firefox_OS/Building_and_installing_Firefox_OS</p><p>This is meant to be a quick reference guide specific to the Tablet Contribution Program and the first tablet device which is named in the project as "flatfish".</p> | ||
Here's a great [https://speakerdeck.com/eragonj/introduction-to-firefox-os introductory slide deck on hacking Firefox OS]. | |||
== Preparation == | == Preparation == | ||
<p>The following instructions of this document are all verified on Ubuntu 12.04 & 12.10 and also Mac OS.</p> | <p>The following instructions of this document are all verified on Ubuntu 12.04 & 12.10 and also Mac OS.</p> | ||
# <p>Firefox OS (B2G) environment, including Android ADB and fastboot</p> <p>https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_build_prerequisites</p> | # <p>Firefox OS (B2G) environment, including Android ADB and fastboot</p> <p>https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_build_prerequisites</p><p><code><span style="color:#006400; background:#D3D3D3">sudo apt-get install libxml2-utils</span></code></p> | ||
# <p>Create an account in github</p> <p>https://github.com/</p> | # <p>Create an account in github</p> <p>https://github.com/</p> | ||
=== Gotcha: udev rules for Linux === | |||
When building on Linux, you may need to manually set up udev rules as noted in the above directions. Beware that the Flatfish appears to report different USB vendor IDs depending on whether it's already booted up or in the fastboot mode! You may need to add both of these udev rules to ''/etc/udev/rules.d/51-android.rules'' in order to do a full system flash: | |||
<pre> | |||
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev" | |||
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev" | |||
</pre> | |||
== Download B2G and AOSP source codes of flatfish == | == Download B2G and AOSP source codes of flatfish == | ||
| Line 13: | Line 24: | ||
== Start to build flatfish == | == Start to build flatfish == | ||
# <p>Connect flatfish device for extract necessary files at first build</p> <p>The first build will pull necessary files into backup-flatfish which is automatic created by extract-files.sh. You DO NOT need to connect flatfish device if backup-flatfish is created.</p> | # <p>Connect flatfish device for extract necessary files at first build</p> <p>The first build will pull necessary files into backup-flatfish which is automatic created by extract-files.sh. You DO NOT need to connect flatfish device if backup-flatfish is created.</p> | ||
# <p>How to build all of B2G</p><p>For flatfish, we need some prefix to support tablet distribution and enable some functions. | # <p>How to build all of B2G</p><p>For flatfish, we need some prefix to support tablet distribution and enable some functions. GAIA_DEVICE_TYPE=tablet is used for supporting tablet distribution of gaia (older versions used GAIA_DISTRIBUTION_DIR=distribution_tablet instead). B2G_SYSTEM_APPS=1 is for moving webapp from /data to /system, and B2G_UPDATER=1 is enable OTA.</p><p><code><span style="color:#006400; background:#D3D3D3">GAIA_DEVICE_TYPE=tablet B2G_SYSTEM_APPS=1 B2G_UPDATER=1 ./build.sh</span></code></p><p>Building whole system might take a long time, you can take a rest or try to build gecko/gaia if you just modify gecko/gaia.</p> | ||
# <p>How to build Gecko or Gaia only</p><p>Gecko only</p><p><code><span style="color:#006400; background:#D3D3D3">B2G_UPDATER=1 ./build.sh gecko</span></code></p><p>Gaia only</p><p><code><span style="color:#006400; background:#D3D3D3"> | # <p>How to build Gecko or Gaia only</p><p>Gecko only</p><p><code><span style="color:#006400; background:#D3D3D3">B2G_UPDATER=1 ./build.sh gecko</span></code></p><p>Gaia only</p><p><code><span style="color:#006400; background:#D3D3D3">GAIA_DEVICE_TYPE=tablet B2G_SYSTEM_APPS=1 ./build.sh gaia</span></code></p> | ||
== Flash the images you build == | == Flash the images you build == | ||
<p>Please make sure adb can connect to your device successfully before flash images. You can do simple test to check adb connection | <p>Please make sure adb can connect to your device successfully before flash images. You can do a simple test to check adb connection; you will see something like “FLATFISH_123456 device” after typing “adb devices” if adb connection successfully.</p> | ||
# <p>Flash whole images</p><p><code><span style="color:#006400; background:#D3D3D3">./flash.sh</span></code></p> | # <p>Flash whole images</p><p><code><span style="color:#006400; background:#D3D3D3">./flash.sh</span></code></p> | ||
# <p>Flash gecko only</p><p><code><span style="color:#006400; background:#D3D3D3">./flash.sh gecko</span></code></p> | # <p>Flash gecko only</p><p><code><span style="color:#006400; background:#D3D3D3">./flash.sh gecko</span></code></p> | ||
# <p>Flash gaia only</p><p><code><span style="color:#006400; background:#D3D3D3">./flash.sh gaia</span></code></p> | # <p>Flash gaia only</p><p><code><span style="color:#006400; background:#D3D3D3">./flash.sh gaia</span></code></p> | ||
=== Flashing problems === | |||
If you have problems with the flashing process failing with timeout errors try disabling any USB 3.0 controllers in the BIOS | |||
If your tablet becomes bricked, please follow the steps in [[Firefox OS/TCP/Flashing the Flatfish bootloader#Repairing a bricked device|Repairing a bricked device]] to reflash your device. | |||
If you need the driver for your Windows computer, see this [http://megaswf.com/file/2672515 Jing] for instructions. | |||
== Subsequent code pulls == | == Subsequent code pulls == | ||
| Line 37: | Line 56: | ||
== Contributing your code == | == Contributing your code == | ||
You can either submit a GitHub pull request or | You can either submit a GitHub pull request or file a bug in Bugzilla with a patch. However, you should almost certainly first discuss it with the B2G or Gaia teams. See the [https://developer.mozilla.org/en-US/Firefox_OS/Developing_Firefox_OS/Quickstart_guide_to_Gaia_development#Contributing_code_back_to_the_project MDN documentation on contributing to Gaia]. | ||
== WIP bug list == | == WIP bug list == | ||
<p>Bug 965145 - [Camera] refactor .sensorAngle patch in bug 947956 for new camera app</p> | |||
== FAQ == | == FAQ == | ||
<p>To be continued</p> | <p>To be continued</p> | ||
edits