148
edits
(Created page with "= B2G porting guide for new build system = This is a guide to support new device to [https://github.com/mozilla-b2g/B2G new B2G build system]. The actual porting details might d...") |
No edit summary |
||
| Line 29: | Line 29: | ||
The [https://github.com/mozilla-b2g/b2g-manifest/tree/galaxy-s2 galaxy-s2] branch can be used as a reference. | The [https://github.com/mozilla-b2g/b2g-manifest/tree/galaxy-s2 galaxy-s2] branch can be used as a reference. | ||
== Create | == Create configuration tree for new device == | ||
You need to create a new configration tree for new device at device/<manufacturer>/<device_id> | |||
The tree should include at least: | |||
* AndroidBoard.mk | * AndroidBoard.mk | ||
* AndroidProducts.mk | * AndroidProducts.mk | ||
| Line 45: | Line 47: | ||
The [http://forum.xda-developers.com XDA Forum] is also a good place to discuss and check for resource. | The [http://forum.xda-developers.com XDA Forum] is also a good place to discuss and check for resource. | ||
== | === How to create BoradConfig.mk === | ||
To be added. | |||
=== How to create extract-files.sh === | |||
To be added. | |||
=== How to create idc files for touch screen === | |||
To be added. | |||
== The need to rebuild boot.img == | |||
Basically no change is required for kernel, the purpose to rebuild boot.img is for required init.rc change. | Basically no change is required for kernel, the purpose to rebuild boot.img is for required init.rc change. | ||
=== Required change on init.rc === | |||
Main things to modify on init.rc: | Main things to modify on init.rc: | ||
* Import init.b2g.rc | * Import init.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 | * chmod 755 on /system/b2g/b2g, /system/b2g/updater, /system/b2g/plugin-container | ||
<pre> | |||
chmod 0755 /system/b2g/b2g | |||
chmod 0755 /system/b2g/updater | |||
chmod 0755 /system/b2g/plugin-container | |||
</pre> | |||
You might want to modify from init.rc of new device, instead of using the init.rc provided by the | You might want to modify from init.rc of new device, instead of using the init.rc provided by the | ||
build system. In this case, you need to set TARGET_PROVIDES_B2G_INIT_RC in BoardConfig.mk. | build system. In this case, you need to set TARGET_PROVIDES_B2G_INIT_RC in BoardConfig.mk. | ||
A | === Prebuilt kernel vs building kernel from source === | ||
To build | |||
A prebuilt kernel can be used, or 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://github.com/andreasgal/B2G/tree/master/glue/gonk/device/toro/maguro maguro] on old build system is an example that builds kernel from source. | The [https://github.com/andreasgal/B2G/tree/master/glue/gonk/device/toro/maguro maguro] on old build system is an example that builds kernel from source. | ||
edits