Hacking b2g on Raspberry Pi: Difference between revisions

m
 
(6 intermediate revisions by 3 users not shown)
Line 14: Line 14:
== Flash an existing build ==
== Flash an existing build ==


First [https://www.dropbox.com/s/g7f9ej0c14fdz1a/ffos-rpi-03.img.tar.bz2?dl=0 download the build].  Next extract it as follows
First [https://www.dropbox.com/s/4udfp704u2hmemx/ffos-rpi-04.img.tar.bz2?dl=0 download the build].  Next extract it as follows


  tar jxvf ffos-rpi-*.img.tar.bz2
  tar jxvf ffos-rpi-*.img.tar.bz2
Line 43: Line 43:


Note: if you're configured your RPi to output through the touchscreen, and you disconnect the touchscreen (when the RPi is powered off, of course), then after rebooting the RPi may still try to output through the nonexistent screen.  This bug is not yet understood and seems to be a kernel issue.  But you can still follow the directions above to revert to HDMI output.
Note: if you're configured your RPi to output through the touchscreen, and you disconnect the touchscreen (when the RPi is powered off, of course), then after rebooting the RPi may still try to output through the nonexistent screen.  This bug is not yet understood and seems to be a kernel issue.  But you can still follow the directions above to revert to HDMI output.
Touchscreen input (using the PiTFT) seems not to work by now.


== Building b2g for RPi ==
== Building b2g for RPi ==
Line 59: Line 61:
  ./config.sh rpi
  ./config.sh rpi


The config.sh step can take quite a while, because it downloads a large amount of data.  Once that finishes, you need to apply a patch to the gecko checkout (for now; the patches are making their way through reviews etc.).  [https://pastebin.mozilla.org/6863396 Download the patch from here] and then apply to your <code>B2G/gecko</code> subdirectory by running the command
The config.sh step can take quite a while, because it downloads a large amount of data.  Once that finishes, you need to apply a patch to the gecko checkout (for now; the patches are making their way through reviews etc.).  [https://www.dropbox.com/s/j5bbuifod7pjusi/ffos-rpi-04.patch?dl=0 Download the patch from here] and then apply to your <code>B2G/gecko</code> subdirectory by running the command


  (cd gecko && git apply [the patch you downloaded])
  (cd gecko && git apply [the patch you downloaded])


Note: if <code>git apply</code> fails, you may need to use <code>patch -p1</code>.  Also, the contents of this patch should shrink over time as changes are landed upstream.  So after you <code>repo sync</code> your checkout, you may need to return to this page and apply a new version of the patch.  Hopefully, soon no extra patches will be needed.
Note: if <code>git apply</code> fails, you may need to use <code>patch -p1</code>.  Also, the contents of this patch should shrink over time as changes are landed upstream.  So after you <code>repo sync</code> your checkout, you may need to return to this page and apply a new version of the patch.  Hopefully, soon no extra patches will be needed.
Note: because of {{bug|1085599}}, gecko is frozen to [https://github.com/mozilla/gecko-dev/commit/b7b2dc40de355add3634cc972fc31521a8daeed3 this version], and gaia is frozen to [https://github.com/mozilla-b2g/gaia/commit/457a54fc3200b80e4f5e1cd3acaa062309230732 this version] (just because the gecko version is frozen).  If a feature you were expecting to use is unavailable, this might be why.  But normally you don't need to worry about this.


Next, either copy the files <code>device/rpi/rpi/custom-settings.json</code> and <code>device/rpi/rpi/custom-prefs.js</code> in your <code>gaia/build/config/</code> directory, or --- if you already have custom settings or prefs --- append the contents of those files to your existing custom-* files.
Next, either copy the files <code>device/rpi/rpi/custom-settings.json</code> and <code>device/rpi/rpi/custom-prefs.js</code> in your <code>gaia/build/config/</code> directory, or --- if you already have custom settings or prefs --- append the contents of those files to your existing custom-* files.
Line 225: Line 225:


You can also flash your SD card anew at any time by following the instructions above.  But this should usually not be necessary.
You can also flash your SD card anew at any time by following the instructions above.  But this should usually not be necessary.
[[Category:Firefox OS]]
[[Category:Raspberry Pi]]
canmove, Confirmed users, Bureaucrats and Sysops emeriti
960

edits