Difference between revisions of "Porting Omni To Your Device"

From Omni
Jump to: navigation, search
(AOSP-ified CAF Frankendisplay Issues)
(AOSP-ified CAF Frankendisplay Issues)
Line 33: Line 33:
  
 
If you see errors in logcat like the following and you are stuck on the bootanimation:
 
If you see errors in logcat like the following and you are stuck on the bootanimation:
<code>E/Fence  (  220): sync_fence_info returned NULL for fd 41
 
  
 +
<code>
 +
E/Fence  (  220): sync_fence_info returned NULL for fd 41
 
E/Fence  (  220): sync_fence_info returned NULL for fd 43
 
E/Fence  (  220): sync_fence_info returned NULL for fd 43
 
 
E/Fence  (  220): sync_fence_info returned NULL for fd 43
 
E/Fence  (  220): sync_fence_info returned NULL for fd 43
 
 
E/Fence  (  220): sync_fence_info returned NULL for fd 43
 
E/Fence  (  220): sync_fence_info returned NULL for fd 43
 
 
E/Fence  (  220): sync_fence_info returned NULL for fd 43
 
E/Fence  (  220): sync_fence_info returned NULL for fd 43
 
 
E/Fence  (  220): sync_fence_info returned NULL for fd 43
 
E/Fence  (  220): sync_fence_info returned NULL for fd 43
 +
E/Fence  (  220): sync_fence_info returned NULL for fd 43
 +
</code>
  
E/Fence  (  220): sync_fence_info returned NULL for fd 43</code>
 
 
You need to revert a commit.  Here's an example from the Sony fusion3 family of devices:
 
You need to revert a commit.  Here's an example from the Sony fusion3 family of devices:
 +
 
https://github.com/omnirom/android_kernel_sony_apq8064/commit/4c5fbe5354eab42eaf33927d0c245bc9632a3cae
 
https://github.com/omnirom/android_kernel_sony_apq8064/commit/4c5fbe5354eab42eaf33927d0c245bc9632a3cae

Revision as of 17:16, 19 February 2014

Introduction

Omni is designed to use a basic AOSP device tree, with a few small modifications. This page will detail the necessary changes.

Firstly, Fork a already working device repo. Then you have to delete their makefiles and stuff like cm.mk & cm.dependencies.

Tip #1 - Never blindly edit anything that says full. If you do so, chances are your device won't boot.

First you need to add a new make file for omni. See the one below

  https://github.com/omnirom/android_device_samsung_n7100/blob/android-4.3/omni_n7100.mk

Then you to add the makefile into androidproducts.mk . See example below.

  https://github.com/omnirom/android_device_samsung_l900/commit/61045513d560fddf1bf8007002b67a8b730f3bb6

Then you have to create a new file named vendorsetup.sh in the device repo (see the above commit) In the file enter

  add_lunch_combo omni_device-userdebug

Then you have to add a json file named omni.dependencies to pull all necessary repos to build. See example below

  https://github.com/omnirom/android_device_htc_m7att/blob/android-4.3/omni.dependencies

Tip #2 - JSON files can be really annoying. Go to http://jsonlint.com/ . Paste in your json file and let it check for errors.

Then you have to TWRP-ify your device tree.

That's it. If you did everything correctly, then you should have a working build.

Common Gotchas

AOSP-ified CAF Frankendisplay Issues

A number of kernels are a hybrid of AOSP and CAF code, especially in CM. We are trying to keep our CAF and AOSP display trees more "pure". As a result, an AOSP commit needs to be removed from many kernels in order to work.

If you see errors in logcat like the following and you are stuck on the bootanimation:

E/Fence ( 220): sync_fence_info returned NULL for fd 41 E/Fence ( 220): sync_fence_info returned NULL for fd 43 E/Fence ( 220): sync_fence_info returned NULL for fd 43 E/Fence ( 220): sync_fence_info returned NULL for fd 43 E/Fence ( 220): sync_fence_info returned NULL for fd 43 E/Fence ( 220): sync_fence_info returned NULL for fd 43 E/Fence ( 220): sync_fence_info returned NULL for fd 43

You need to revert a commit. Here's an example from the Sony fusion3 family of devices:

https://github.com/omnirom/android_kernel_sony_apq8064/commit/4c5fbe5354eab42eaf33927d0c245bc9632a3cae