Difference between revisions of "Porting Omni To Your Device"
|Line 1:||Line 1:|
= Introduction =
= Introduction =
Latest revision as of 18:17, 19 August 2017
THIS HAS BEEN DEPRECATED
Visit https://github.com/omnirom/Docs/blob/master/Porting_Omni_To_Your_Device.md for the most up to date version
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
Then you to add the makefile into androidproducts.mk . See example below.
Then you have to create a new file named vendorsetup.sh in the device repo (see the above commit) In the file enter
Then you have to add a json file named omni.dependencies to pull all necessary repos to build. See example below
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.
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:
Reference the Nexus 5X and Nexus 6 repositories for sample setup style. General practice is to keep as many changes as possible within Omni-specific files to reduce differences from AOSP. This allows seamless merging of upstream releases from Google.
All Nexus devices that utilize hardware/qcom/camera must add this repository to their dependencies file, as it is not included by the default manifest. Reference Nexus 5X dependencies
All Nexus devices that utilize hardware/qcom/gps must add this repository to their dependencies file, as it is not included by the default manifest. Reference Nexus 5X dependencies Note that many GPS libraries depend on closed-source, proprietary Qualcomm header files not available to the public. In this case, use prebuilt GPS blobs extracted from your device.
Basic QCOM Support
To enable basic QCOM hardware support, the following must be added to your device's BoardConfig.mk:
BOARD_USES_QCOM_HARDWARE := true
Furthermore, QCOM_BSP support should be included in your device's BoardConfig.mk as follows:
TARGET_USES_QCOM_BSP := true
hardware/qcom/[audio/display/media] are separated on a per-platform basis. You must declare the HAL variant for your platform in your device's BoardConfig.mk via:
TARGET_QCOM_[AUDIO/DISPLAY/MEDIA]_VARIANT := caf-msm89**
Enabling QCOM Audio/Video Enhancements
Include the following in your BoardConfig.mk:
TARGET_ENABLE_QC_AV_ENHANCEMENTS := true