Changes

Jump to: navigation, search

B2G/Porting

87 bytes removed, 19:39, 16 April 2015
Turned the page as a project management one : (as) the porting guide is (more up-to-date) on MDN
= B2G This page is for porting projects management. It should help you to setup a porting project and make it successful.It then list all porting guide for new build system =projects by device and progress.
This is If you are looking for a guide to support a new device to , you should check the MDN page [https://githubdeveloper.commozilla.org/mozillaen-b2gUS/Firefox_OS/B2G new B2G build systemDeveloping_Firefox_OS/Porting Porting Firefox OS].The actual porting details might differ a lot between different devices.
== Clone B2G repo =Setting up a new porting project =
<pre>$ git clone https://github.com/mozilla-b2g/B2G.git</pre>== Announce your project ==
== Create local backup of the original Android system ==The first thing to do is to get in touch with a mozillan responsible for porting, device or that already has port a device. You can do that over IRC channel [irc://irc.mozilla.org/b2g #b2g] and ask for Dietrich Ayala (:dietrich).
<pre>$ mkdir my_device_backup$ cd my_device_backup$ adb pull /system system</pre>== Build your project's tools ==
== Add new You can then start by building your device in configporting project management wiki page as a sub page of the [https://wiki.mozilla.org/FirefoxOS/ Firefox OS one].You can use the [https://wiki.mozilla.org/FirefoxOS/Fairphone Fairphone] one as a reference.sh ==
You may refernece "galaxy-s2" in config.sh as a template.The proposed structure of that page is: == Create manifest file "default*Ignition project todo list: everything you have to do before starting porting.xml" for new device ==After building this page that could be: Add all required repos to manifest file for **Contact the new devicemaker: coordinate and improve collaboration.You can reference https://github.com/mozilla-b2g/**Announce your project on the b2gmailing-manifest as a templatelist.*Device targeted: make it clear which one it is, especially if there are different branches for each deviceversions, releases, editions.The [https*Resources://github.com/mozilla-b2g/b2g-manifest/blob/master/galaxy-s2.xml Galaxy-S2] branch can be used as a reference. == Create configuration tree for new device == You need **Project coordinator & evangelist: give your name and ways to create a new configration tree for new device at device/<manufacturer>/<device_id> The tree should include at least:* AndroidBoardcontact you.mk* AndroidProducts.mk* BoardConfigTechnical lead: if that's not you tell who.mk* extract-files.sh* full_<device_id>.mkWiki page: link here the page you are creating* idc files for touchscreen* init files (initIRC channel: link here any specific IRC relevant channel.rc, initYou can find any relevant information on the [https://wiki.<target>mozilla.rc, uevent.rc...) The content might differ a lot between devices, especially "BoardConfig.mk" and "extract-files.sh".It requires some hackingorg/testing/debugging to know which binary blobs should be extractedIRC IRC wiki page].If **Mozillian group: if you can find some existing reference on are a [httphttps://wwwmozillians.cyanogenmod.com CyanogenModorg/ mozillian] for the (or became one) you can join/setup a group about this device, it will speed up the porting progress.The **Meta/tracking bug: Open a bug in [httphttps://forumbugzilla.xda-developersmozilla.org/enter_bug.com XDA Forumcgi bmo] is also a good place to discuss and check for resource. with Product=Firefox OS & Component= The need to rebuild bootGeneral.img == Basically no change is required for kernel, the purpose **Porting community page: link to rebuild boot.img is for required init.rc changeany porting page like XDA-Forums=== Required change on init.rc ===The init.rc **Sumo thread: if there is '''not''' the one provided by b2gstarted, list it has here.*Contributing: Tell others that want to be pulled from get involved in the phoneproject how to.*Progress:Main things **Starting point: tell the state of the porting or give info about anything that give a root to modify on inityour porting project.rc:* Import init*Bug table: add a bugzilla table to give an overview of the bugs.b2g.rc<pre>on early-init start ueventd import /init.b2g.rc</pre> * chmod 755 on /system/b2g/b2g, /system/b2g/updater, /system/b2g/plugin-container (put these after mounting system read/write)Adapt the following code and add it to you wiki page:
<pre>
chmod 0755 /system/b2g/b2g$<bugzilla>$ {$ "blocks": "1_your_bug_number_2",$ "include_fields": "id, summary, status, blocks, whiteboard, cf_blocking_b2g"chmod 0755 /system/b2g/updater$ }chmod 0755 /system/b2g$</plugin-containerbugzilla>
</pre>
*Other ports: Link to Android, Cyanogen, Ubuntu... ports that could be an helping resource or give the state about porting for this device.
*Additional information: add here links to related pages that can't enter other items.
You might want to modify from init.rc of new device, instead of using the init.rc provided by thebuild system. In this case, you need to set TARGET_PROVIDES_INIT_RC in BoardConfig.mk. ==Contributing = Prebuilt kernel vs building kernel from source === A prebuilt kernel can be used, or Be welcome if you may also build kernel from source by the build system.To build kernel by build system, add AndroidKernel.mk and kernel config in device configuration tree. The [https://githubwant to improve this starting guide.com/andreasgal/B2G/tree/master/glue/gonk/device/toro/maguro maguro] on old build system is an example that builds kernel from source. == Add new device in flash.sh == Add the new device, depending on what flash tool required by new device. == Config/build/flash for new device ==
<pre>$ ANDROIDFS_DIR=my_device_backup ./config.sh <device_id> default.xml$ ./build.sh$ ./flash.sh</pre>Start porting =
== Test and debug ==To start doing the technical work, you can follow the guide to support a new device on MDN page [https://developer.mozilla.org/en-US/Firefox_OS/Developing_Firefox_OS/Porting Porting Firefox OS].
Have fun!= Porting projects =
= Frequency asked questions = Under work project ==
To be added*[https://wiki.mozilla.org/FirefoxOS/Fairphone Fairphone]
31
edits

Navigation menu