Commit 60ea7fa3df9a734448a3e0252e1dcbda801ad1ac

Authored by Eric Lee
0 parents

Embedian Android Oreo O8.1.0_r14 patch support for SMARC-iMX8M

Showing 56 changed files with 3036 additions and 0 deletions Side-by-side Diff

... ... @@ -0,0 +1,3 @@
  1 +.*
  2 +!.gitignore
  3 +*.o
... ... @@ -0,0 +1,192 @@
  1 +
  2 + Copyright (C) 2008-2015 The Android Open Source Project
  3 + Copyright (C) 2011-2016 Freescale Semiconductor, Inc.
  4 + Copyright 2017-2018 NXP
  5 +
  6 + Licensed under the Apache License, Version 2.0 (the "License");
  7 + you may not use this file except in compliance with the License.
  8 +
  9 + Unless required by applicable law or agreed to in writing, software
  10 + distributed under the License is distributed on an "AS IS" BASIS,
  11 + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12 + See the License for the specific language governing permissions and
  13 + limitations under the License.
  14 +
  15 +
  16 + Apache License
  17 + Version 2.0, January 2004
  18 + http://www.apache.org/licenses/
  19 +
  20 + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
  21 +
  22 + 1. Definitions.
  23 +
  24 + "License" shall mean the terms and conditions for use, reproduction,
  25 + and distribution as defined by Sections 1 through 9 of this document.
  26 +
  27 + "Licensor" shall mean the copyright owner or entity authorized by
  28 + the copyright owner that is granting the License.
  29 +
  30 + "Legal Entity" shall mean the union of the acting entity and all
  31 + other entities that control, are controlled by, or are under common
  32 + control with that entity. For the purposes of this definition,
  33 + "control" means (i) the power, direct or indirect, to cause the
  34 + direction or management of such entity, whether by contract or
  35 + otherwise, or (ii) ownership of fifty percent (50%) or more of the
  36 + outstanding shares, or (iii) beneficial ownership of such entity.
  37 +
  38 + "You" (or "Your") shall mean an individual or Legal Entity
  39 + exercising permissions granted by this License.
  40 +
  41 + "Source" form shall mean the preferred form for making modifications,
  42 + including but not limited to software source code, documentation
  43 + source, and configuration files.
  44 +
  45 + "Object" form shall mean any form resulting from mechanical
  46 + transformation or translation of a Source form, including but
  47 + not limited to compiled object code, generated documentation,
  48 + and conversions to other media types.
  49 +
  50 + "Work" shall mean the work of authorship, whether in Source or
  51 + Object form, made available under the License, as indicated by a
  52 + copyright notice that is included in or attached to the work
  53 + (an example is provided in the Appendix below).
  54 +
  55 + "Derivative Works" shall mean any work, whether in Source or Object
  56 + form, that is based on (or derived from) the Work and for which the
  57 + editorial revisions, annotations, elaborations, or other modifications
  58 + represent, as a whole, an original work of authorship. For the purposes
  59 + of this License, Derivative Works shall not include works that remain
  60 + separable from, or merely link (or bind by name) to the interfaces of,
  61 + the Work and Derivative Works thereof.
  62 +
  63 + "Contribution" shall mean any work of authorship, including
  64 + the original version of the Work and any modifications or additions
  65 + to that Work or Derivative Works thereof, that is intentionally
  66 + submitted to Licensor for inclusion in the Work by the copyright owner
  67 + or by an individual or Legal Entity authorized to submit on behalf of
  68 + the copyright owner. For the purposes of this definition, "submitted"
  69 + means any form of electronic, verbal, or written communication sent
  70 + to the Licensor or its representatives, including but not limited to
  71 + communication on electronic mailing lists, source code control systems,
  72 + and issue tracking systems that are managed by, or on behalf of, the
  73 + Licensor for the purpose of discussing and improving the Work, but
  74 + excluding communication that is conspicuously marked or otherwise
  75 + designated in writing by the copyright owner as "Not a Contribution."
  76 +
  77 + "Contributor" shall mean Licensor and any individual or Legal Entity
  78 + on behalf of whom a Contribution has been received by Licensor and
  79 + subsequently incorporated within the Work.
  80 +
  81 + 2. Grant of Copyright License. Subject to the terms and conditions of
  82 + this License, each Contributor hereby grants to You a perpetual,
  83 + worldwide, non-exclusive, no-charge, royalty-free, irrevocable
  84 + copyright license to reproduce, prepare Derivative Works of,
  85 + publicly display, publicly perform, sublicense, and distribute the
  86 + Work and such Derivative Works in Source or Object form.
  87 +
  88 + 3. Grant of Patent License. Subject to the terms and conditions of
  89 + this License, each Contributor hereby grants to You a perpetual,
  90 + worldwide, non-exclusive, no-charge, royalty-free, irrevocable
  91 + (except as stated in this section) patent license to make, have made,
  92 + use, offer to sell, sell, import, and otherwise transfer the Work,
  93 + where such license applies only to those patent claims licensable
  94 + by such Contributor that are necessarily infringed by their
  95 + Contribution(s) alone or by combination of their Contribution(s)
  96 + with the Work to which such Contribution(s) was submitted. If You
  97 + institute patent litigation against any entity (including a
  98 + cross-claim or counterclaim in a lawsuit) alleging that the Work
  99 + or a Contribution incorporated within the Work constitutes direct
  100 + or contributory patent infringement, then any patent licenses
  101 + granted to You under this License for that Work shall terminate
  102 + as of the date such litigation is filed.
  103 +
  104 + 4. Redistribution. You may reproduce and distribute copies of the
  105 + Work or Derivative Works thereof in any medium, with or without
  106 + modifications, and in Source or Object form, provided that You
  107 + meet the following conditions:
  108 +
  109 + (a) You must give any other recipients of the Work or
  110 + Derivative Works a copy of this License; and
  111 +
  112 + (b) You must cause any modified files to carry prominent notices
  113 + stating that You changed the files; and
  114 +
  115 + (c) You must retain, in the Source form of any Derivative Works
  116 + that You distribute, all copyright, patent, trademark, and
  117 + attribution notices from the Source form of the Work,
  118 + excluding those notices that do not pertain to any part of
  119 + the Derivative Works; and
  120 +
  121 + (d) If the Work includes a "NOTICE" text file as part of its
  122 + distribution, then any Derivative Works that You distribute must
  123 + include a readable copy of the attribution notices contained
  124 + within such NOTICE file, excluding those notices that do not
  125 + pertain to any part of the Derivative Works, in at least one
  126 + of the following places: within a NOTICE text file distributed
  127 + as part of the Derivative Works; within the Source form or
  128 + documentation, if provided along with the Derivative Works; or,
  129 + within a display generated by the Derivative Works, if and
  130 + wherever such third-party notices normally appear. The contents
  131 + of the NOTICE file are for informational purposes only and
  132 + do not modify the License. You may add Your own attribution
  133 + notices within Derivative Works that You distribute, alongside
  134 + or as an addendum to the NOTICE text from the Work, provided
  135 + that such additional attribution notices cannot be construed
  136 + as modifying the License.
  137 +
  138 + You may add Your own copyright statement to Your modifications and
  139 + may provide additional or different license terms and conditions
  140 + for use, reproduction, or distribution of Your modifications, or
  141 + for any such Derivative Works as a whole, provided Your use,
  142 + reproduction, and distribution of the Work otherwise complies with
  143 + the conditions stated in this License.
  144 +
  145 + 5. Submission of Contributions. Unless You explicitly state otherwise,
  146 + any Contribution intentionally submitted for inclusion in the Work
  147 + by You to the Licensor shall be under the terms and conditions of
  148 + this License, without any additional terms or conditions.
  149 + Notwithstanding the above, nothing herein shall supersede or modify
  150 + the terms of any separate license agreement you may have executed
  151 + with Licensor regarding such Contributions.
  152 +
  153 + 6. Trademarks. This License does not grant permission to use the trade
  154 + names, trademarks, service marks, or product names of the Licensor,
  155 + except as required for reasonable and customary use in describing the
  156 + origin of the Work and reproducing the content of the NOTICE file.
  157 +
  158 + 7. Disclaimer of Warranty. Unless required by applicable law or
  159 + agreed to in writing, Licensor provides the Work (and each
  160 + Contributor provides its Contributions) on an "AS IS" BASIS,
  161 + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
  162 + implied, including, without limitation, any warranties or conditions
  163 + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
  164 + PARTICULAR PURPOSE. You are solely responsible for determining the
  165 + appropriateness of using or redistributing the Work and assume any
  166 + risks associated with Your exercise of permissions under this License.
  167 +
  168 + 8. Limitation of Liability. In no event and under no legal theory,
  169 + whether in tort (including negligence), contract, or otherwise,
  170 + unless required by applicable law (such as deliberate and grossly
  171 + negligent acts) or agreed to in writing, shall any Contributor be
  172 + liable to You for damages, including any direct, indirect, special,
  173 + incidental, or consequential damages of any character arising as a
  174 + result of this License or out of the use or inability to use the
  175 + Work (including but not limited to damages for loss of goodwill,
  176 + work stoppage, computer failure or malfunction, or any and all
  177 + other commercial damages or losses), even if such Contributor
  178 + has been advised of the possibility of such damages.
  179 +
  180 + 9. Accepting Warranty or Additional Liability. While redistributing
  181 + the Work or Derivative Works thereof, You may choose to offer,
  182 + and charge a fee for, acceptance of support, warranty, indemnity,
  183 + or other liability obligations and/or rights consistent with this
  184 + License. However, in accepting such obligations, You may act only
  185 + on Your own behalf and on Your sole responsibility, not on behalf
  186 + of any other Contributor, and only if You agree to indemnify,
  187 + defend, and hold each Contributor harmless for any liability
  188 + incurred by, or claims asserted against, such Contributor by reason
  189 + of your accepting any such warranty or additional liability.
  190 +
  191 + END OF TERMS AND CONDITIONS
  192 +
common/EmbPathConfig.mk
... ... @@ -0,0 +1,8 @@
  1 +# config.mk
  2 +#
  3 +# Product-specific compile-time definitions.
  4 +#
  5 +
  6 +IMX_MKIMAGE_PATH := vendor/embedian
  7 +KERNEL_IMX_PATH := vendor/embedian
  8 +UBOOT_IMX_PATH := vendor/embedian
imx8/AndroidProducts.mk
... ... @@ -0,0 +1,31 @@
  1 +#Copyright (C) 2008 The Android Open Source Project
  2 +#
  3 +# Licensed under the Apache License, Version 2.0 (the "License");
  4 +# you may not use this file except in compliance with the License.
  5 +# You may obtain a copy of the License at
  6 +#
  7 +# http://www.apache.org/licenses/LICENSE-2.0
  8 +#
  9 +# Unless required by applicable law or agreed to in writing, software
  10 +# distributed under the License is distributed on an "AS IS" BASIS,
  11 +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12 +# See the License for the specific language governing permissions and
  13 +# limitations under the License.
  14 +#
  15 +
  16 +#
  17 +# This file should set PRODUCT_MAKEFILES to a list of product makefiles
  18 +# to expose to the build system. LOCAL_DIR will already be set to
  19 +# the directory containing this file.
  20 +#
  21 +# This file may not rely on the value of any variable other than
  22 +# LOCAL_DIR; do not use any conditionals, and do not look up the
  23 +# value of any variable that isn't set in this file or in a file that
  24 +# it includes.
  25 +#
  26 +
  27 +# Copied from build/target/product/AndroidProducts.mk
  28 +
  29 +PRODUCT_MAKEFILES := \
  30 + $(LOCAL_DIR)/smarc_mx8m.mk \
  31 + $(LOCAL_DIR)/smarc_mx8m_drm.mk \
... ... @@ -0,0 +1,3 @@
  1 +server=10.192.224.178
  2 +port=10888
  3 +ota_folder_suffix=oreo
imx8/init.recovery.freescale.rc
... ... @@ -0,0 +1,24 @@
  1 +import init.${ro.hardware}.${ro.boot.storage_type}.rc
  2 +on init
  3 + # disable cursor blink for fbcon, if no splash screen support
  4 + write /sys/class/graphics/fbcon/cursor_blink 0
  5 +
  6 + mkdir /config 0500 root root
  7 + # mount the configfs on /config
  8 + mount configfs none /config mode=0755
  9 + mkdir /config/usb_gadget/g1
  10 + write /config/usb_gadget/g1/idProduct 0x4ee7
  11 + write /config/usb_gadget/g1/idVendor 0x18d1
  12 + mkdir /config/usb_gadget/g1/configs/b.1
  13 + mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409
  14 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "adb"
  15 + mkdir /config/usb_gadget/g1/functions/ffs.adb
  16 + mkdir /config/usb_gadget/g1/strings/0x409
  17 + write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno}
  18 + write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer}
  19 + write /config/usb_gadget/g1/strings/0x409/product ${ro.product.model}
  20 +
  21 +on property:sys.usb.ffs.ready=1
  22 + rm /config/usb_gadget/g1/configs/b.1/f1
  23 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1
  24 + write /config/usb_gadget/g1/UDC "ci_hdrc.0"
... ... @@ -0,0 +1,183 @@
  1 +# This is a Embedian Android Reference Design platform based on SMARC-iMX8M Modules
  2 +# It will inherit from FSL core product which in turn inherit from Google generic
  3 +
  4 +-include device/fsl/common/imx_path/ImxPathConfig.mk
  5 +-include device/embedian/common/EmbPathConfig.mk
  6 +$(call inherit-product, device/fsl/imx8/imx8.mk)
  7 +
  8 +ifneq ($(wildcard device/embeian/smarc_mx8m/fstab_nand.freescale),)
  9 +$(shell touch device/embedian/smarc_mx8m/fstab_nand.freescale)
  10 +endif
  11 +
  12 +ifneq ($(wildcard device/embedian/smarc_mx8m/fstab.freescale),)
  13 +$(shell touch device/embedian/smarc_mx8m/fstab.freescale)
  14 +endif
  15 +
  16 +# Overrides
  17 +TARGET_KERNEL_DEFCONF := smarcimx8m_android_defconfig
  18 +PRODUCT_MANUFACTURER := embedian
  19 +PRODUCT_NAME := smarc_mx8m
  20 +PRODUCT_DEVICE := smarc_mx8m
  21 +
  22 +PRODUCT_FULL_TREBLE_OVERRIDE := true
  23 +
  24 +PRODUCT_COPY_FILES += \
  25 + device/embedian/smarc_mx8m/init.rc:root/init.freescale.rc \
  26 + device/embedian/smarc_mx8m/init.imx8mq.rc:root/init.freescale.imx8mq.rc \
  27 + device/embedian/smarc_mx8m/init.usb.rc:root/init.freescale.usb.rc
  28 +
  29 +# Audio
  30 +USE_XML_AUDIO_POLICY_CONF := 1
  31 +PRODUCT_COPY_FILES += \
  32 + device/embedian/smarc_mx8m/audio_effects.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.conf \
  33 + device/embedian/smarc_mx8m/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
  34 + frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration.xml \
  35 + frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
  36 + frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml \
  37 + frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
  38 + frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \
  39 +
  40 +# GPU files
  41 +
  42 +PRODUCT_COPY_FILES += device/embedian/smarc_mx8m/init.freescale.sd.rc:root/init.freescale.sd.rc
  43 +PRODUCT_COPY_FILES += device/embedian/smarc_mx8m/init.freescale.emmc.rc:root/init.freescale.emmc.rc
  44 +
  45 +DEVICE_PACKAGE_OVERLAYS := device/embedian/smarc_mx8m/overlay
  46 +
  47 +PRODUCT_CHARACTERISTICS := tablet
  48 +
  49 +PRODUCT_AAPT_CONFIG += xlarge large tvdpi hdpi xhdpi
  50 +
  51 +PRODUCT_COPY_FILES += \
  52 + frameworks/native/data/etc/android.hardware.audio.output.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.output.xml \
  53 + frameworks/native/data/etc/android.hardware.touchscreen.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.xml \
  54 + frameworks/native/data/etc/android.hardware.touchscreen.multitouch.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.xml \
  55 + frameworks/native/data/etc/android.hardware.touchscreen.multitouch.distinct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.distinct.xml \
  56 + frameworks/native/data/etc/android.hardware.screen.portrait.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.screen.portrait.xml \
  57 + frameworks/native/data/etc/android.hardware.screen.landscape.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.screen.landscape.xml \
  58 + frameworks/native/data/etc/android.software.app_widgets.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.app_widgets.xml \
  59 + frameworks/native/data/etc/android.software.voice_recognizers.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.voice_recognizers.xml \
  60 + frameworks/native/data/etc/android.software.backup.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.backup.xml \
  61 + frameworks/native/data/etc/android.software.print.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.print.xml \
  62 + frameworks/native/data/etc/android.software.device_admin.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.device_admin.xml \
  63 + frameworks/native/data/etc/android.software.managed_users.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.managed_users.xml \
  64 + frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \
  65 + frameworks/native/data/etc/android.hardware.wifi.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \
  66 + frameworks/native/data/etc/android.software.sip.voip.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.sip.voip.xml \
  67 + frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml \
  68 + frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml \
  69 + frameworks/native/data/etc/android.hardware.camera.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.xml \
  70 + frameworks/native/data/etc/android.hardware.camera.front.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.front.xml \
  71 + frameworks/native/data/etc/android.hardware.ethernet.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.ethernet.xml \
  72 + frameworks/native/data/etc/android.hardware.vulkan.version-1_0_3.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version-1_0_3.xml \
  73 + frameworks/native/data/etc/android.hardware.vulkan.level-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level-0.xml \
  74 + frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml \
  75 + device/embedian/smarc_mx8m/required_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/required_hardware.xml \
  76 +
  77 +PRODUCT_COPY_FILES += \
  78 + $(FSL_PROPRIETARY_PATH)/fsl-proprietary/gpu-viv/lib64/egl/egl.cfg:$(TARGET_COPY_OUT_VENDOR)/lib64/egl/egl.cfg \
  79 + $(FSL_PROPRIETARY_PATH)/fsl-proprietary/gpu-viv/lib/egl/egl.cfg:$(TARGET_COPY_OUT_VENDOR)/lib/egl/egl.cfg
  80 +
  81 +# HWC2 HAL
  82 +PRODUCT_PACKAGES += \
  83 + android.hardware.graphics.composer@2.1-impl \
  84 + android.hardware.graphics.composer@2.1-service
  85 +
  86 +# Gralloc HAL
  87 +PRODUCT_PACKAGES += \
  88 + android.hardware.graphics.mapper@2.0-impl \
  89 + android.hardware.graphics.allocator@2.0-impl \
  90 + android.hardware.graphics.allocator@2.0-service
  91 +
  92 +# RenderScript HAL
  93 +PRODUCT_PACKAGES += \
  94 + android.hardware.renderscript@1.0-impl
  95 +
  96 +PRODUCT_PACKAGES += \
  97 + libEGL_VIVANTE \
  98 + libGLESv1_CM_VIVANTE \
  99 + libGLESv2_VIVANTE \
  100 + gralloc_viv.imx8 \
  101 + libGAL \
  102 + libGLSLC \
  103 + libVSC \
  104 + libg2d \
  105 + libgpuhelper \
  106 + libSPIRV_viv \
  107 + libvulkan_VIVANTE \
  108 + vulkan.imx8 \
  109 + gatekeeper.imx8
  110 +
  111 +PRODUCT_PACKAGES += \
  112 + Launcher3
  113 +
  114 +PRODUCT_PACKAGES += \
  115 + android.hardware.audio@2.0-impl \
  116 + android.hardware.audio@2.0-service \
  117 + android.hardware.audio.effect@2.0-impl \
  118 + android.hardware.power@1.0-impl \
  119 + android.hardware.power@1.0-service \
  120 + android.hardware.light@2.0-impl \
  121 + android.hardware.light@2.0-service
  122 +
  123 +# imx8 sensor HAL libs.
  124 +#PRODUCT_PACKAGES += \
  125 +# android.hardware.sensors@1.0-impl \
  126 +# android.hardware.sensors@1.0-service \
  127 +# sensors.imx8
  128 +
  129 +# Usb HAL
  130 +PRODUCT_PACKAGES += \
  131 + android.hardware.usb@1.1-service.imx
  132 +
  133 +# Bluetooth HAL
  134 +PRODUCT_PACKAGES += \
  135 + android.hardware.bluetooth@1.0-impl \
  136 + android.hardware.bluetooth@1.0-service
  137 +
  138 +# WiFi HAL
  139 +PRODUCT_PACKAGES += \
  140 + android.hardware.wifi@1.0-service \
  141 + wifilogd \
  142 + wificond
  143 +
  144 +# Qcom WiFi Firmware
  145 +PRODUCT_COPY_FILES += \
  146 + external/qca-linux/1CQ/nvm_tlv_3.2.bin:vendor/firmware/nvm_tlv_3.2.bin \
  147 + external/qca-linux/1CQ/board.bin:vendor/firmware/ath10k/QCA6174/hw3.0/board.bin \
  148 + external/linux-firmware/qca/rampatch_00130302.bin:vendor/firmware/rampatch_tlv_3.2.tlv \
  149 + external/linux-firmware/ath10k/QCA6174/hw3.0/board.bin:vendor/firmware/ath10k/QCA6174/hw3.0/board.bin \
  150 + external/linux-firmware/ath10k/QCA6174/hw3.0/board-2.bin:vendor/firmware/ath10k/QCA6174/hw3.0/board-2.bin \
  151 + external/linux-firmware/ath10k/QCA6174/hw3.0/firmware-4.bin:vendor/firmware/ath10k/QCA6174/hw3.0/firmware-4.bin
  152 +
  153 +# Keymaster HAL
  154 +PRODUCT_PACKAGES += \
  155 + android.hardware.keymaster@3.0-impl \
  156 + android.hardware.keymaster@3.0-service
  157 +
  158 +# DRM HAL
  159 +TARGET_ENABLE_MEDIADRM_64 := true
  160 +PRODUCT_PACKAGES += \
  161 + android.hardware.drm@1.0-impl \
  162 + android.hardware.drm@1.0-service
  163 +
  164 +# new gatekeeper HAL
  165 +PRODUCT_PACKAGES += \
  166 + android.hardware.gatekeeper@1.0-impl \
  167 + android.hardware.gatekeeper@1.0-service
  168 +
  169 +ifneq ($(BUILD_TARGET_FS),ubifs)
  170 +PRODUCT_PROPERTY_OVERRIDES += \
  171 + ro.internel.storage_size=/sys/block/mmcblk0/size \
  172 + ro.frp.pst=/dev/block/by-name/presistdata
  173 +endif
  174 +
  175 +# ro.product.first_api_level indicates the first api level the device has commercially launched on.
  176 +PRODUCT_PROPERTY_OVERRIDES += \
  177 + ro.product.first_api_level=26
  178 +
  179 +PRODUCT_PACKAGES += \
  180 + libg1 \
  181 + libhantro \
  182 + libcodec
  183 +
imx8/smarc_mx8m_drm.mk
... ... @@ -0,0 +1,58 @@
  1 +# This is a FSL Android Reference Design platform based on i.MX8MQ board
  2 +# It will inherit from FSL core product which in turn inherit from Google generic
  3 +
  4 +PRODUCT_IMX_DRM := true
  5 +
  6 +# copy drm specific files before inherit smarc_mx8m.mk, otherwise copy is ignored
  7 +PRODUCT_COPY_FILES += \
  8 + device/embedian/smarc_mx8m/audio_policy_configuration_drm.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
  9 + device/embedian/smarc_mx8m/init.imx8mq.rc:root/init.freescale.imx8mq.main.rc \
  10 + device/embedian/smarc_mx8m/init.imx8mq.drm.rc:root/init.freescale.imx8mq.rc \
  11 +
  12 +
  13 +$(call inherit-product, $(TOPDIR)device/fsl/imx8/optee-packages.mk)
  14 +$(call inherit-product, $(TOPDIR)device/embedian/imx8/smarc_mx8m.mk)
  15 +
  16 +# Overrides
  17 +TARGET_KERNEL_DEFCONF := smarcimx8m_android_drm_defconfig
  18 +PRODUCT_NAME := smarc_mx8m_drm
  19 +PRODUCT_MANUFACTURER := embedian
  20 +PRODUCT_DEVICE := smarc_mx8m
  21 +
  22 +CFG_SECURE_DATA_PATH ?= y
  23 +CFG_TEE_SDP_MEM_BASE := 0xcc000000
  24 +CFG_TEE_SDP_MEM_SIZE := 0x02000000
  25 +DECRYPTED_BUFFER_START := $(CFG_TEE_SDP_MEM_BASE)
  26 +DECRYPTED_BUFFER_LEN := $(CFG_TEE_SDP_MEM_SIZE)
  27 +DECODED_BUFFER_START := 0xCE000000
  28 +DECODED_BUFFER_LEN := 0x30000000
  29 +
  30 +# Exoplayer
  31 +PRODUCT_PACKAGES += \
  32 + exoplayer \
  33 +
  34 +# Playready
  35 +PRODUCT_COPY_FILES += \
  36 + vendor/nxp/drm_artifacts/playready/Samples/devcert.dat:$(TARGET_COPY_OUT_VENDOR)/playready/devcert.dat \
  37 + vendor/nxp/drm_artifacts/playready/Samples/priv.dat:$(TARGET_COPY_OUT_VENDOR)/playready/priv.dat \
  38 + vendor/nxp/drm_artifacts/playready/ta/82dbae9c-9ce0-47e0-a1cb4048cfdb84aa.ta:$(TARGET_OUT)/system/lib/optee_armtz/82dbae9c-9ce0-47e0-a1cb4048cfdb84aa.ta \
  39 + vendor/nxp/drm_artifacts/playready/bgroupcert.dat:$(TARGET_COPY_OUT_VENDOR)/playready/bgroupcert.dat \
  40 + vendor/nxp/drm_artifacts/playready/zgpriv_protected.dat:$(TARGET_COPY_OUT_VENDOR)/playready/zgpriv_protected.dat \
  41 + vendor/nxp/drm_artifacts/playready/optee_playready_test:$(TARGET_OUT)/system/bin/optee_playready_test
  42 +
  43 +ifneq ($(CFG_BUILD_DRM_FROM_SOURCES),y)
  44 +PRODUCT_COPY_FILES += \
  45 + vendor/nxp/drm_artifacts/playready/libdrmplayreadyplugin.so:$(TARGET_OUT)/vendor/lib64/mediadrm/libdrmplayreadyplugin.so
  46 +endif
  47 +
  48 +ifneq ($(CFG_BUILD_DRM_FROM_SOURCES),y)
  49 +# Widevine
  50 +PRODUCT_COPY_FILES += \
  51 + vendor/nxp/drm_artifacts/widevine/lib/liboemcrypto.so:$(TARGET_COPY_OUT_VENDOR)/lib/liboemcrypto.so \
  52 + vendor/nxp/drm_artifacts/widevine/lib/libwvdrmengine.so:$(TARGET_COPY_OUT_VENDOR)/lib/mediadrm/libwvdrmengine.so \
  53 + vendor/nxp/drm_artifacts/widevine/lib/libvtswidevine.so:$(TARGET_COPY_OUT_VENDOR)/lib/drm-vts-test-libs/libvtswidevine.so \
  54 + vendor/nxp/drm_artifacts/widevine/lib64/liboemcrypto.so:$(TARGET_COPY_OUT_VENDOR)/lib64/liboemcrypto.so \
  55 + vendor/nxp/drm_artifacts/widevine/lib64/libwvdrmengine.so:$(TARGET_COPY_OUT_VENDOR)/lib64/mediadrm/libwvdrmengine.so \
  56 + vendor/nxp/drm_artifacts/widevine/lib64/libvtswidevine.so:$(TARGET_COPY_OUT_VENDOR)/lib64/drm-vts-test-libs/libvtswidevine.so \
  57 + vendor/nxp/drm_artifacts/widevine/ta/706f6574-7765-6469-77656e6942656665.ta:$(TARGET_OUT)/system/lib/optee_armtz/706f6574-7765-6469-77656e6942656665.ta
  58 +endif
... ... @@ -0,0 +1,4 @@
  1 +add_lunch_combo smarc_mx8m-eng
  2 +add_lunch_combo smarc_mx8m-userdebug
  3 +add_lunch_combo smarc_mx8m_drm-eng
  4 +add_lunch_combo smarc_mx8m_drm-userdebug
... ... @@ -0,0 +1,160 @@
  1 +#!/bin/bash
  2 +#
  3 +# install
  4 +#
  5 +# This script must be run from the Android main directory.
  6 +# embedian/install must be at ~/o810_130_8m_build
  7 +#
  8 +# Embedian SMARC-iMX8M patches for Android 8.1.0 1.3.0 8M
  9 +
  10 +set -e
  11 +#set -x
  12 +
  13 +SCRIPT_NAME=${0##*/}
  14 +readonly SCRIPT_VERSION="0.1"
  15 +
  16 +#### Exports Variables ####
  17 +#### global variables ####
  18 +readonly ABSOLUTE_FILENAME=$(readlink -e "$0")
  19 +readonly ABSOLUTE_DIRECTORY=$(dirname ${ABSOLUTE_FILENAME})
  20 +readonly SCRIPT_POINT=${ABSOLUTE_DIRECTORY}
  21 +readonly SCRIPT_START_DATE=$(date +%Y%m%d)
  22 +readonly ANDROID_DIR="${SCRIPT_POINT}/../../.."
  23 +
  24 +readonly BASE_BRANCH_NAME="base_o8.1.0_1.3.0_8m"
  25 +
  26 +## git variables get from base script!
  27 +readonly _EXTPARAM_BRANCH="o8.1.0_1.3.0_8m-ga-smarc01"
  28 +
  29 +## dirs ##
  30 +readonly EMBEDIAN_PATCHS_DIR="${SCRIPT_POINT}/platform"
  31 +readonly EMBEDIAN_SH_DIR="${SCRIPT_POINT}/sh"
  32 +VENDOR_BASE_DIR=${ANDROID_DIR}/vendor/embedian
  33 +
  34 +
  35 +# print error message
  36 +# p1 - printing string
  37 +function pr_error() {
  38 + echo ${2} "E: $1"
  39 +}
  40 +
  41 +# print warning message
  42 +# p1 - printing string
  43 +function pr_warning() {
  44 + echo ${2} "W: $1"
  45 +}
  46 +
  47 +# print info message
  48 +# p1 - printing string
  49 +function pr_info() {
  50 + echo ${2} "I: $1"
  51 +}
  52 +
  53 +# print debug message
  54 +# p1 - printing string
  55 +function pr_debug() {
  56 + echo ${2} "D: $1"
  57 +}
  58 +
  59 +# test existing brang in git repo
  60 +# p1 - git folder
  61 +# p2 - branch name
  62 +function is_branch_exist()
  63 +{
  64 + local D="${1}"
  65 + local B="${2}"
  66 + local B_found
  67 + local HERE
  68 +
  69 + if [ \( ! -d "${D}" \) -o \( -z "${B}" \) ]; then
  70 + echo false
  71 + return
  72 + fi
  73 +
  74 + HERE=${PWD}
  75 + cd "${D}" > /dev/null
  76 +
  77 + # Check branch
  78 + git branch 2>&1 > /dev/null
  79 + if [ ${?} -ne 0 ]; then
  80 + echo false
  81 + cd ${HERE} > /dev/null
  82 + return
  83 + fi
  84 + B_found=$(git branch | grep -w "${B}")
  85 + if [ -z "${B_found}" ]; then
  86 + echo false
  87 + else
  88 + echo true
  89 + fi
  90 +
  91 + cd ${HERE} > /dev/null
  92 + return
  93 +}
  94 +
  95 +############### main code ##############
  96 +pr_info "Script version ${SCRIPT_VERSION} (g:20160527)"
  97 +
  98 +# disable NXP kernel Android.mk
  99 +cd ${ANDROID_DIR} > /dev/null
  100 +mv vendor/nxp-opensource/kernel_imx/drivers/staging/greybus/tools/Android.mk vendor/nxp-opensource/kernel_imx/drivers/staging/greybus/tools/Android.mk__
  101 +
  102 +# make a copy of NXP imx-mkimage
  103 +cp -r vendor/nxp-opensource/imx-mkimage ${VENDOR_BASE_DIR}
  104 +
  105 +pr_info "###############################"
  106 +pr_info "# Misc. external repositories #"
  107 +pr_info "###############################"
  108 +
  109 +pr_info "clone ${VENDOR_BASE_DIR}/can-utils"
  110 +git clone https://github.com/linux-can/can-utils.git ${VENDOR_BASE_DIR}/can-utils
  111 +cd ${VENDOR_BASE_DIR}/can-utils > /dev/null
  112 +git checkout 791890542ac1ce99131f36435e72af5635afc2fa -b ${BASE_BRANCH_NAME}
  113 +
  114 +pr_info "clone ${VENDOR_BASE_DIR}/i2c-tools"
  115 +git clone https://github.com/Hashcode/i2c-tools.git ${VENDOR_BASE_DIR}/i2c-tools
  116 +cd ${VENDOR_BASE_DIR}/i2c-tools > /dev/null
  117 +git checkout 4aea42526b73eed33f811ce4b894df5d545e4d57 -b ${BASE_BRANCH_NAME}
  118 +
  119 +pr_info "###########################"
  120 +pr_info "# Apply framework patches #"
  121 +pr_info "###########################"
  122 +cd ${EMBEDIAN_PATCHS_DIR} > /dev/null
  123 +git_array=$(find * -type d | grep '.git')
  124 +cd - > /dev/null
  125 +
  126 +for _ddd in ${git_array}
  127 +do
  128 + _git_p=$(echo ${_ddd} | sed 's/.git//g')
  129 + cd ${ANDROID_DIR}/${_git_p}/ > /dev/null
  130 +
  131 + pr_info "Apply patches for this git: \"${_git_p}/\""
  132 +
  133 + git checkout -b ${_EXTPARAM_BRANCH} || {
  134 + pr_warning "Branch ${_EXTPARAM_BRANCH} is present!"
  135 + };
  136 +
  137 + git am ${EMBEDIAN_PATCHS_DIR}/${_ddd}/*
  138 +
  139 + cd - > /dev/null
  140 +done
  141 +
  142 +pr_info "#######################"
  143 +pr_info "# Copy bluetooth vendor file #"
  144 +pr_info "#######################"
  145 +cp ${EMBEDIAN_PATCHS_DIR}/bt/vnd_smarc_mx8m.txt ${ANDROID_DIR}/hardware/qcom/bt/msm8992/libbt-vendor/include/
  146 +
  147 +pr_info "#####################"
  148 +pr_info "# Done #"
  149 +pr_info "#####################"
  150 +
  151 +pr_info "#######################"
  152 +pr_info "# Copy shell utilites #"
  153 +pr_info "#######################"
  154 +cp -r ${EMBEDIAN_SH_DIR}/* ${ANDROID_DIR}/
  155 +
  156 +pr_info "#####################"
  157 +pr_info "# Done #"
  158 +pr_info "#####################"
  159 +
  160 +exit 0
scripts/platform/bt/vnd_smarc_mx8m.txt
... ... @@ -0,0 +1,9 @@
  1 +BT_HS_UART_DEVICE = "/dev/ttymxc2"
  2 +FW_PATCHFILE_LOCATION = "/vendor/firmware/"
  3 +BT_WAKE_VIA_USERIAL_IOCTL = TRUE
  4 +LPM_IDLE_TIMEOUT_MULTIPLE = 5
  5 +SCO_USE_I2S_INTERFACE = TRUE
  6 +BTVND_DBG = FALSE
  7 +BTHW_DBG = TRUE
  8 +VNDUSERIAL_DBG = FALSE
  9 +UPIO_DBG = FALSE
scripts/platform/build/make.git/0001-core-Makefile-avoid-referring-PRODUCT_MANUFACTURER-i.patch
... ... @@ -0,0 +1,36 @@
  1 +From d69372943135c2fc4d8394956a58533e36ac59c3 Mon Sep 17 00:00:00 2001
  2 +From: Eric Lee <eric.lee@embedian.com>
  3 +Date: Mon, 7 May 2018 11:21:39 +0200
  4 +Subject: [PATCH] avoid referring PRODUCT_MANUFACTURER in emmc/sd init
  5 +
  6 +---
  7 + core/Makefile | 6 +++---
  8 + 1 file changed, 3 insertions(+), 3 deletions(-)
  9 +
  10 +diff --git a/core/Makefile b/core/Makefile
  11 +index 16654dd..d21ddd2 100644
  12 +--- a/core/Makefile
  13 ++++ b/core/Makefile
  14 +@@ -1236,8 +1236,8 @@ define build-recoveryimage-target
  15 + $(hide) rm -f $(TARGET_RECOVERY_ROOT_OUT)/init*.rc
  16 + $(hide) cp -f $(recovery_initrc) $(TARGET_RECOVERY_ROOT_OUT)/
  17 + $(hide) cp $(TARGET_ROOT_OUT)/init.recovery.*.rc $(TARGET_RECOVERY_ROOT_OUT)/ || true # Ignore error when the src file doesn't exist.
  18 +- $(hide) cp $(TARGET_ROOT_OUT)/init.$(PRODUCT_MANUFACTURER).sd.rc $(TARGET_RECOVERY_ROOT_OUT)/ || true # Ignore error when the src file doesn't exist.
  19 +- $(hide) cp $(TARGET_ROOT_OUT)/init.$(PRODUCT_MANUFACTURER).emmc.rc $(TARGET_RECOVERY_ROOT_OUT)/ || true # Ignore error when the src file doesn't exist.
  20 ++ $(hide) cp $(TARGET_ROOT_OUT)/init.*.sd.rc $(TARGET_RECOVERY_ROOT_OUT)/ || true # Ignore error when the src file doesn't exist.
  21 ++ $(hide) cp $(TARGET_ROOT_OUT)/init.*.emmc.rc $(TARGET_RECOVERY_ROOT_OUT)/ || true # Ignore error when the src file doesn't exist.
  22 + $(hide) mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/res
  23 + $(hide) rm -rf $(TARGET_RECOVERY_ROOT_OUT)/res/*
  24 + $(hide) cp -rf $(recovery_resources_common)/* $(TARGET_RECOVERY_ROOT_OUT)/res
  25 +@@ -1423,7 +1423,7 @@ $(TARGET_KERNEL_CONFIGURE): $(KERNEL_IMX_PATH)/kernel_imx/arch/$(TARGET_ARCH)/co
  26 + install -D $(KERNEL_CONFIGURE) $(TARGET_KERNEL_CONFIGURE)
  27 +
  28 + ifeq ($(TARGET_ARCH),arm64)
  29 +-DTS_ADDITIONAL_PATH := freescale
  30 ++DTS_ADDITIONAL_PATH := $(PRODUCT_MANUFACTURER)
  31 + else
  32 + DTS_ADDITIONAL_PATH :=
  33 + endif
  34 +--
  35 +2.7.4
  36 +
scripts/platform/vendor/embedian/i2c-tools.git/0001-fix-i2c-tools-build-with-Android.patch
... ... @@ -0,0 +1,25 @@
  1 +From 55898b2da24a1f81d0f2e443309e63b565b1c873 Mon Sep 17 00:00:00 2001
  2 +From: Eric Lee <eric.lee@embedian.com>
  3 +Date: Mon, 22 Apr 2017 14:04:28 +0200
  4 +Subject: [PATCH] fix i2c-tools build with Android
  5 +
  6 +---
  7 + Android.mk | 2 +-
  8 + 1 file changed, 1 insertion(+), 1 deletion(-)
  9 +
  10 +diff --git a/Android.mk b/Android.mk
  11 +index 090f6c0..bb44211 100644
  12 +--- a/Android.mk
  13 ++++ b/Android.mk
  14 +@@ -4,7 +4,7 @@ include $(CLEAR_VARS)
  15 +
  16 + LOCAL_MODULE_TAGS := eng
  17 + LOCAL_C_INCLUDES += $(LOCAL_PATH) $(LOCAL_PATH)/include
  18 +-LOCAL_SRC_FILES := tools/i2cbusses.c tools/util.c
  19 ++LOCAL_SRC_FILES := tools/i2cbusses.c tools/util.c lib/smbus.c
  20 + LOCAL_MODULE := i2c-tools
  21 + include $(BUILD_STATIC_LIBRARY)
  22 +
  23 +--
  24 +2.7.4
  25 +
scripts/platform/vendor/embedian/imx-mkimage.git/0001-smarc-imx8m-add-preliminary-support.patch
... ... @@ -0,0 +1,34 @@
  1 +From dc60556b7da19349712efe0ba570dbf7c511a537 Mon Sep 17 00:00:00 2001
  2 +From: Eric Lee <eric.lee@embedian.com>
  3 +Date: Mon, 7 May 2018 11:38:16 +0200
  4 +Subject: [PATCH] smarc-imx8m: add preliminary support
  5 +
  6 +---
  7 + iMX8M/soc.mak | 4 ++--
  8 + 1 file changed, 2 insertions(+), 2 deletions(-)
  9 +
  10 +diff --git a/iMX8M/soc.mak b/iMX8M/soc.mak
  11 +index e3003de..5c6efec 100644
  12 +--- a/iMX8M/soc.mak
  13 ++++ b/iMX8M/soc.mak
  14 +@@ -58,7 +58,7 @@ u-boot-atf-tee.bin: u-boot.bin bl31.bin tee.bin
  15 + clean:
  16 + @rm -f $(MKIMG) $(DCD_CFG) .imx8mq_dcd.cfg.cfgtmp.d u-boot-atf.bin u-boot-atf-tee.bin u-boot-spl-ddr.bin u-boot.itb u-boot.its u-boot-ddr3l.itb u-boot-ddr3l.its u-boot-spl-ddr3l.bin u-boot-ddr4.itb u-boot-ddr4.its u-boot-spl-ddr4.bin $(OUTIMG)
  17 +
  18 +-dtbs = fsl-imx8mq-evk.dtb
  19 ++dtbs = fsl-smarcimx8mq.dtb
  20 + u-boot.itb: $(dtbs)
  21 + ./mkimage_fit_atf.sh $(dtbs) > u-boot.its
  22 + ./mkimage_uboot -E -p 0x3000 -f u-boot.its u-boot.itb
  23 +@@ -107,7 +107,7 @@ nightly :
  24 + @$(WGET) -q $(SERVER)/$(DIR)/$(FW_DIR)/bl31-imx8mq.bin -O bl31.bin
  25 + @$(WGET) -q $(SERVER)/$(DIR)/$(FW_DIR)/u-boot-spl.bin-imx8mqevk-sd -O u-boot-spl.bin
  26 + @$(WGET) -q $(SERVER)/$(DIR)/$(FW_DIR)/u-boot-nodtb.bin -O u-boot-nodtb.bin
  27 +- @$(WGET) -q $(SERVER)/$(DIR)/$(FW_DIR)/fsl-imx8mq-evk.dtb -O fsl-imx8mq-evk.dtb
  28 ++ @$(WGET) -q $(SERVER)/$(DIR)/$(FW_DIR)/fsl-smarcimx8mq.dtb -O fsl-smarcimx8mq.dtb
  29 + @$(WGET) -q $(SERVER)/$(DIR)/$(FW_DIR)/signed_hdmi_imx8m.bin -O signed_hdmi_imx8m.bin
  30 + @$(WGET) -q $(SERVER)/$(DIR)/$(FW_DIR)/mkimage_uboot -O mkimage_uboot
  31 +
  32 +--
  33 +2.7.4
  34 +
scripts/platform/vendor/nxp-opensource/imx.git/0001-embedian-added-support-sgtl5000-codec.patch
... ... @@ -0,0 +1,111 @@
  1 +From 0e4082bc6a6a8b30d02cae4f5102f9a2855b7f0a Mon Sep 17 00:00:00 2001
  2 +From: Eric Lee <eric.lee@embedian.com>
  3 +Date: Tue, 26 Mar 2019 18:01:31 +0800
  4 +Subject: [PATCH] Add SGTL5000 Android Config
  5 +
  6 +---
  7 + alsa/config_sgtl5000.h | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++
  8 + alsa/tinyalsa_hal.c | 3 +++
  9 + 2 files changed, 66 insertions(+)
  10 + create mode 100644 alsa/config_sgtl5000.h
  11 +
  12 +diff --git a/alsa/config_sgtl5000.h b/alsa/config_sgtl5000.h
  13 +new file mode 100644
  14 +index 0000000..799a005
  15 +--- /dev/null
  16 ++++ b/alsa/config_sgtl5000.h
  17 +@@ -0,0 +1,63 @@
  18 ++/*
  19 ++ * Copyright (C) 2011 The Android Open Source Project
  20 ++ *
  21 ++ * Licensed under the Apache License, Version 2.0 (the "License");
  22 ++ * you may not use this file except in compliance with the License.
  23 ++ * You may obtain a copy of the License at
  24 ++ *
  25 ++ * http://www.apache.org/licenses/LICENSE-2.0
  26 ++ *
  27 ++ * Unless required by applicable law or agreed to in writing, software
  28 ++ * distributed under the License is distributed on an "AS IS" BASIS,
  29 ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  30 ++ * See the License for the specific language governing permissions and
  31 ++ * limitations under the License.
  32 ++ */
  33 ++/* Copyright (C) 2012 Freescale Semiconductor, Inc. */
  34 ++
  35 ++#ifndef ANDROID_INCLUDE_IMX_CONFIG_SGTL5000_H
  36 ++#define ANDROID_INCLUDE_IMX_CONFIG_SGTL5000_H
  37 ++
  38 ++#include "audio_hardware.h"
  39 ++
  40 ++/* ALSA cards for IMX, these must be defined according different board / kernel config*/
  41 ++static struct audio_card sgtl5000_card = {
  42 ++ .name = "sgtl5000-audio",
  43 ++ .driver_name = "sgtl5000-audio",
  44 ++ .supported_out_devices = (AUDIO_DEVICE_OUT_EARPIECE |
  45 ++ AUDIO_DEVICE_OUT_SPEAKER |
  46 ++ AUDIO_DEVICE_OUT_WIRED_HEADSET |
  47 ++ AUDIO_DEVICE_OUT_WIRED_HEADPHONE |
  48 ++ AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET |
  49 ++ AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET |
  50 ++ AUDIO_DEVICE_OUT_ALL_SCO |
  51 ++ AUDIO_DEVICE_OUT_DEFAULT),
  52 ++ .supported_in_devices = (
  53 ++ AUDIO_DEVICE_IN_COMMUNICATION |
  54 ++ AUDIO_DEVICE_IN_AMBIENT |
  55 ++ AUDIO_DEVICE_IN_BUILTIN_MIC |
  56 ++ AUDIO_DEVICE_IN_WIRED_HEADSET |
  57 ++ AUDIO_DEVICE_IN_BACK_MIC |
  58 ++ AUDIO_DEVICE_IN_ALL_SCO |
  59 ++ AUDIO_DEVICE_IN_DEFAULT),
  60 ++ .defaults = NULL,
  61 ++ .bt_output = NULL,
  62 ++ .speaker_output = NULL,
  63 ++ .hs_output = NULL,
  64 ++ .earpiece_output = NULL,
  65 ++ .vx_hs_mic_input = NULL,
  66 ++ .mm_main_mic_input = NULL,
  67 ++ .vx_main_mic_input = NULL,
  68 ++ .mm_hs_mic_input = NULL,
  69 ++ .vx_bt_mic_input = NULL,
  70 ++ .mm_bt_mic_input = NULL,
  71 ++ .card = 0,
  72 ++ .out_rate = 0,
  73 ++ .out_channels = 0,
  74 ++ .out_format = 0,
  75 ++ .in_rate = 0,
  76 ++ .in_channels = 0,
  77 ++ .in_format = 0,
  78 ++};
  79 ++
  80 ++#endif /* ANDROID_INCLUDE_IMX_CONFIG_HDMI_H */
  81 +diff --git a/alsa/tinyalsa_hal.c b/alsa/tinyalsa_hal.c
  82 +index 5db4f72..b59470a 100644
  83 +--- a/alsa/tinyalsa_hal.c
  84 ++++ b/alsa/tinyalsa_hal.c
  85 +@@ -53,6 +53,7 @@
  86 + #include "config_cdnhdmi.h"
  87 + #include "config_ak4458.h"
  88 + #include "config_ak5558.h"
  89 ++#include "config_sgtl5000.h"
  90 + #include "control.h"
  91 + #include "pcm_ext.h"
  92 + #include "config_xtor.h"
  93 +@@ -105,6 +106,7 @@
  94 + #define PRODUCT_DEVICE_IMX "imx"
  95 + #define PRODUCT_DEVICE_AUTO "sabreauto"
  96 + #define SUPPORT_CARD_NUM 14
  97 ++#define SUPPORT_CARD_NUM 15
  98 +
  99 + /*"null_card" must be in the end of this array*/
  100 + struct audio_card *audio_card_list[SUPPORT_CARD_NUM] = {
  101 +@@ -116,6 +118,7 @@ struct audio_card *audio_card_list[SUPPORT_CARD_NUM] = {
  102 + &cs42888_card,
  103 + &wm8960_card,
  104 + &sii902x_card,
  105 ++ &sgtl5000_card,
  106 + &rpmsg_card,
  107 + &wm8524_card,
  108 + &cdnhdmi_card,
  109 +--
  110 +2.7.4
  111 +
scripts/sh/smarc-mksdcard.sh
... ... @@ -0,0 +1,336 @@
  1 +#!/bin/bash
  2 +# Meant to be called by install_android.sh
  3 +set -e
  4 +
  5 +blue_underlined_bold_echo()
  6 +{
  7 + echo -e "\e[34m\e[4m\e[1m$@\e[0m"
  8 +}
  9 +
  10 +blue_bold_echo()
  11 +{
  12 + echo -e "\e[34m\e[1m$@\e[0m"
  13 +}
  14 +
  15 +red_bold_echo()
  16 +{
  17 + echo -e "\e[31m\e[1m$@\e[0m"
  18 +}
  19 +
  20 +# Partition sizes in MiB
  21 +BOOTLOAD_RESERVE=8
  22 +BOOT_ROM_SIZE=32
  23 +SYSTEM_ROM_SIZE=1536
  24 +MISC_SIZE=4
  25 +METADATA_SIZE=2
  26 +PRESISTDATA_SIZE=1
  27 +VENDOR_ROM_SIZE=112
  28 +FBMISC_SIZE=1
  29 +VBMETA_SIZE=1
  30 +
  31 +help() {
  32 +
  33 + bn=`basename $0`
  34 + echo " usage $bn <option> device_node"
  35 + echo
  36 + echo " options:"
  37 + echo " -h displays this help message"
  38 + echo " -s only get partition size"
  39 + echo " -f soc_name flash android image."
  40 +}
  41 +
  42 +# Parse command line
  43 +moreoptions=1
  44 +node="na"
  45 +soc_name="showoptions"
  46 +cal_only=0
  47 +
  48 +while [ "$moreoptions" = 1 -a $# -gt 0 ]; do
  49 + case $1 in
  50 + -h) help; exit ;;
  51 + -s) cal_only=1 ;;
  52 + -f) soc_name=$2; shift;;
  53 + *) moreoptions=0; node=$1 ;;
  54 + esac
  55 + [ "$moreoptions" = 0 ] && [ $# -gt 2 ] && help && exit
  56 + [ "$moreoptions" = 1 ] && shift
  57 +done
  58 +
  59 +imagesdir="out/target/product/smarc_mx8m"
  60 +
  61 +img_prefix="boot-"
  62 +img_search_str="ls ${imagesdir}/${img_prefix}* | grep sd"
  63 +img_list=()
  64 +
  65 +# generate options list
  66 +for img in $(eval $img_search_str)
  67 +do
  68 + img=$(basename $img .img)
  69 + img=${img#${img_prefix}}
  70 + img_list+=($img)
  71 +done
  72 +
  73 +# check for dtb
  74 +if [[ $soc_name != "showoptions" ]] && [[ ! ${img_list[@]} =~ $soc_name ]] ; then
  75 + echo; red_bold_echo "ERROR: invalid dtb $soc_name"
  76 + soc_name=showoptions
  77 +fi
  78 +
  79 +if [[ $soc_name == "showoptions" ]] ; then
  80 + PS3='Please choose your configuration: '
  81 + select opt in "${img_list[@]}"
  82 + do
  83 + if [[ -z "$opt" ]] ; then
  84 + echo invalid option
  85 + continue
  86 + else
  87 + soc_name=$opt
  88 + break
  89 + fi
  90 + done
  91 +fi
  92 +
  93 +bootimage_file="boot-${soc_name}.img"
  94 +vbmeta_file="vbmeta-${soc_name}.img"
  95 +systemimage_file="system.img"
  96 +systemimage_raw_file="system_raw.img"
  97 +vendorimage_file="vendor.img"
  98 +vendorimage_raw_file="vendor_raw.img"
  99 +
  100 +block=`basename $node`
  101 +part=""
  102 +if [[ $block == mmcblk* ]] ; then
  103 + part="p"
  104 +fi
  105 +
  106 +if [[ "${soc_name}" = *"mx8m"* ]]; then
  107 + bootloader_offset=33
  108 + bootloader_file="boot-fsl-smarcimx8mq.imx"
  109 +fi
  110 +
  111 +echo "${soc_name} bootloader offset is: ${bootloader_offset}"
  112 +echo "${soc_name} bootloader is: ${bootloader_file}"
  113 +
  114 +# Get total device size
  115 +seprate=100
  116 +total_size=`sfdisk -s ${node}`
  117 +total_size=`expr ${total_size} \/ 1024`
  118 +boot_rom_sizeb=`expr ${BOOTLOAD_RESERVE} + ${BOOT_ROM_SIZE} \* 2`
  119 +extend_size=`expr ${SYSTEM_ROM_SIZE} \* 2 + ${MISC_SIZE} + ${METADATA_SIZE} + ${PRESISTDATA_SIZE} + ${VENDOR_ROM_SIZE} \* 2 + ${FBMISC_SIZE} + ${VBMETA_SIZE} \* 2 + ${seprate}`
  120 +data_size=`expr ${total_size} - ${boot_rom_sizeb} - ${extend_size}`
  121 +
  122 +# Echo partitions
  123 +cat << EOF
  124 +TOTAL : ${total_size} MiB
  125 +U-BOOT (on eMMC) : ${BOOTLOAD_RESERVE} MiB
  126 +BOOT_A : ${BOOT_ROM_SIZE} MiB
  127 +BOOT_B : ${BOOT_ROM_SIZE} MiB
  128 +SYSTEM_A : ${SYSTEM_ROM_SIZE} MiB
  129 +SYSTEM_B : ${SYSTEM_ROM_SIZE} MiB
  130 +MISC : ${MISC_SIZE} MiB
  131 +METADATA : ${METADATA_SIZE} MiB
  132 +PRESISTDATA : ${PRESISTDATA_SIZE} MiB
  133 +VENDOR_A : ${VENDOR_ROM_SIZE} MiB
  134 +VENDOR_B : ${VENDOR_ROM_SIZE} MiB
  135 +USERDATA : ${data_size} MiB
  136 +FBMISC : ${FBMISC_SIZE} MiB
  137 +VBMETA_A : ${VBMETA_SIZE} MiB
  138 +VBMETA_B : ${VBMETA_SIZE} MiB
  139 +EOF
  140 +
  141 +echo
  142 +
  143 +if [[ $cal_only == 1 ]] ; then
  144 +exit 0
  145 +fi
  146 +
  147 +function check_images
  148 +{
  149 + if [[ ! -b $node ]] ; then
  150 + red_bold_echo "ERROR: \"$node\" is not a block device"
  151 + exit 1
  152 + fi
  153 +
  154 + if [[ ! -f ${imagesdir}/${bootloader_file} ]] ; then
  155 + red_bold_echo "ERROR: U-Boot image does not exist"
  156 + exit 1
  157 + fi
  158 +
  159 + if [[ ! -f ${imagesdir}/${bootimage_file} ]] ; then
  160 + red_bold_echo "ERROR: boot image does not exist"
  161 + exit 1
  162 + fi
  163 +
  164 + if [[ ! -f ${imagesdir}/${systemimage_file} ]] ; then
  165 + red_bold_echo "ERROR: system image does not exist"
  166 + exit 1
  167 + fi
  168 +
  169 + if [[ ! -f ${imagesdir}/${vendorimage_file} ]] ; then
  170 + red_bold_echo "ERROR: vendor image does not exist"
  171 + exit 1
  172 + fi
  173 +
  174 + if [[ ! -f ${imagesdir}/${vbmeta_file} ]] ; then
  175 + red_bold_echo "ERROR: vbmeta image does not exist"
  176 + exit 1
  177 + fi
  178 +}
  179 +
  180 +function delete_device
  181 +{
  182 + echo
  183 + blue_underlined_bold_echo "Deleting current partitions"
  184 + for partition in ${node}*
  185 + do
  186 + if [[ ${partition} = ${node} ]] ; then
  187 + # skip base node
  188 + continue
  189 + fi
  190 + if [[ ! -b ${partition} ]] ; then
  191 + red_bold_echo "ERROR: \"${partition}\" is not a block device"
  192 + exit 1
  193 + fi
  194 + dd if=/dev/zero of=${partition} bs=1M count=1 2> /dev/null || true
  195 + done
  196 + sync
  197 +
  198 + ((echo d; echo 1; echo d; echo 2; echo d; echo 3; echo d; echo w) | fdisk $node &> /dev/null) || true
  199 + sync
  200 +
  201 + sgdisk -Z $node
  202 + sync
  203 +
  204 + dd if=/dev/zero of=$node bs=1M count=8
  205 + sync; sleep 1
  206 +}
  207 +
  208 +function create_parts
  209 +{
  210 + echo
  211 + blue_underlined_bold_echo "Creating Android partitions"
  212 +
  213 + sgdisk -n 1:${BOOTLOAD_RESERVE}M:+${BOOT_ROM_SIZE}M -c 1:"boot_a" -t 1:8300 $node
  214 + sgdisk -n 2:0:+${BOOT_ROM_SIZE}M -c 2:"boot_b" -t 2:8300 $node
  215 + sgdisk -n 3:0:+${SYSTEM_ROM_SIZE}M -c 3:"system_a" -t 3:8300 $node
  216 + sgdisk -n 4:0:+${SYSTEM_ROM_SIZE}M -c 4:"system_b" -t 4:8300 $node
  217 + sgdisk -n 5:0:+${MISC_SIZE}M -c 5:"misc" -t 5:8300 $node
  218 + sgdisk -n 6:0:+${METADATA_SIZE}M -c 6:"metadata" -t 6:8300 $node
  219 + sgdisk -n 7:0:+${PRESISTDATA_SIZE}M -c 7:"presistdata" -t 7:8300 $node
  220 + sgdisk -n 8:0:+${VENDOR_ROM_SIZE}M -c 8:"vendor_a" -t 8:8300 $node
  221 + sgdisk -n 9:0:+${VENDOR_ROM_SIZE}M -c 9:"vendor_b" -t 9:8300 $node
  222 + sgdisk -n 10:0:+${data_size}M -c 10:"userdata" -t 10:8300 $node
  223 + sgdisk -n 11:0:+${FBMISC_SIZE}M -c 11:"fbmisc" -t 11:8300 $node
  224 + sgdisk -n 12:0:+${VBMETA_SIZE}M -c 12:"vbmeta_a" -t 12:8300 $node
  225 + sgdisk -n 13:0:+${VBMETA_SIZE}M -c 13:"vbmeta_b" -t 13:8300 $node
  226 +
  227 + sync; sleep 2
  228 +
  229 + for i in `cat /proc/mounts | grep "${node}" | awk '{print $2}'`; do umount $i; done
  230 + hdparm -z $node
  231 + sync; sleep 3
  232 +
  233 + # backup the GPT table to last LBA.
  234 + echo -e 'r\ne\nY\nw\nY\nY' | gdisk $node
  235 + sync; sleep 1
  236 + sgdisk -p $node
  237 +}
  238 +
  239 +function install_bootloader
  240 +{
  241 + echo
  242 + blue_underlined_bold_echo "Installing booloader"
  243 +
  244 + dd if=${imagesdir}/${bootloader_file} of=$node bs=1k seek=${bootloader_offset}; sync
  245 +}
  246 +
  247 +function format_android
  248 +{
  249 + echo
  250 + blue_underlined_bold_echo "Erasing presistdata partition"
  251 + dd if=/dev/zero of=${node}${part}7 bs=1M count=${PRESISTDATA_SIZE} conv=fsync
  252 + blue_underlined_bold_echo "Erasing fbmisc partition"
  253 + dd if=/dev/zero of=${node}${part}11 bs=1M count=${FBMISC_SIZE} conv=fsync
  254 + blue_underlined_bold_echo "Erasing misc partition"
  255 + dd if=/dev/zero of=${node}${part}5 bs=1M count=${MISC_SIZE} conv=fsync
  256 + blue_underlined_bold_echo "Erasing metadata partition"
  257 + dd if=/dev/zero of=${node}${part}6 bs=1M count=${METADATA_SIZE} conv=fsync
  258 + blue_underlined_bold_echo "Formating userdata partition"
  259 + mkfs.ext4 -F ${node}${part}10 -Ldata
  260 + sync; sleep 1
  261 +}
  262 +
  263 +function install_android
  264 +{
  265 + echo
  266 + blue_underlined_bold_echo "Installing Android boot image: $bootimage_file"
  267 + dd if=${imagesdir}/${bootimage_file} of=${node}${part}1
  268 + dd if=${imagesdir}/${bootimage_file} of=${node}${part}2
  269 + sync
  270 +
  271 + echo
  272 + blue_underlined_bold_echo "Installing Android system image: $systemimage_file"
  273 + if [[ -f ${imagesdir}/${systemimage_raw_file} ]] ; then
  274 + rm ${imagesdir}/${systemimage_raw_file} 2> /dev/null
  275 + fi
  276 + out/host/linux-x86/bin/simg2img ${imagesdir}/${systemimage_file} ${imagesdir}/${systemimage_raw_file}
  277 + dd if=${imagesdir}/${systemimage_raw_file} of=${node}${part}3
  278 + dd if=${imagesdir}/${systemimage_raw_file} of=${node}${part}4
  279 + sync;
  280 +
  281 + echo
  282 + blue_underlined_bold_echo "Installing Android vendor image: $vendorimage_file"
  283 + if [[ -f ${imagesdir}/${vendorimage_raw_file} ]] ; then
  284 + rm ${imagesdir}/${vendorimage_raw_file} 2> /dev/null
  285 + fi
  286 + out/host/linux-x86/bin/simg2img ${imagesdir}/${vendorimage_file} ${imagesdir}/${vendorimage_raw_file}
  287 + dd if=${imagesdir}/${vendorimage_raw_file} of=${node}${part}8
  288 + dd if=${imagesdir}/${vendorimage_raw_file} of=${node}${part}9
  289 + sync;
  290 +
  291 + echo
  292 + blue_underlined_bold_echo "Installing Android vbmeta image: $vbmeta_file"
  293 + dd if=${imagesdir}/${vbmeta_file} of=${node}${part}12
  294 + dd if=${imagesdir}/${vbmeta_file} of=${node}${part}13
  295 + sync;
  296 +
  297 + sleep 1
  298 +}
  299 +
  300 +function finish
  301 +{
  302 + echo
  303 + errors=0
  304 + for partition in ${node}*
  305 + do
  306 + if [[ ! -b ${partition} ]] ; then
  307 + red_bold_echo "ERROR: \"${partition}\" is not a block device"
  308 + errors=$((errors+1))
  309 + fi
  310 + done
  311 +
  312 + if [[ ${errors} = 0 ]] ; then
  313 + blue_bold_echo "Android installed successfully"
  314 + else
  315 + red_bold_echo "Android installation failed"
  316 + fi
  317 + exit ${errors}
  318 +}
  319 +
  320 +check_images
  321 +
  322 +umount ${node}${part}* 2> /dev/null || true
  323 +
  324 +#Stop Udev for block devices while partitioning in progress
  325 +#/etc/init.d/udev stop
  326 +
  327 +delete_device
  328 +create_parts
  329 +install_bootloader
  330 +format_android
  331 +install_android
  332 +finish
  333 +
  334 +#Start Udev back before exit
  335 +#/etc/init.d/udev restart
  336 +
smarc_mx8m/AndroidBoard.mk
... ... @@ -0,0 +1,6 @@
  1 +LOCAL_PATH := $(call my-dir)
  2 +
  3 +include $(FSL_PROPRIETARY_PATH)/fsl-proprietary/media-profile/media-profile.mk
  4 +include $(FSL_PROPRIETARY_PATH)/fsl-proprietary/sensor/fsl-sensor.mk
  5 +include device/embedian/smarc_mx8m/AndroidUboot.mk
  6 +include device/embedian/smarc_mx8m/AndroidTee.mk
smarc_mx8m/AndroidTee.mk
... ... @@ -0,0 +1,13 @@
  1 +# uboot.imx in android combine scfw.bin and uboot.bin
  2 +MAKE += SHELL=/bin/bash
  3 +
  4 +define build_uboot_w_tee
  5 + $(MAKE) -C bootable/bootloader/arm-trusted-firmware/ -B CROSS_COMPILE=aarch64-linux-android- PLAT=imx8mq V=1 SPD=opteed DECRYPTED_BUFFER_START=$(DECRYPTED_BUFFER_START) DECRYPTED_BUFFER_LEN=$(DECRYPTED_BUFFER_LEN) DECODED_BUFFER_START=$(DECODED_BUFFER_START) DECODED_BUFFER_LEN=$(DECODED_BUFFER_LEN) bl31; \
  6 + cp bootable/bootloader/arm-trusted-firmware/build/imx8mq/release/bl31.bin $(IMX_MKIMAGE_PATH)/imx-mkimage/iMX8M/.;\
  7 + aarch64-linux-android-objcopy -O binary out/target/product/smarc_mx8m/optee/arm-plat-imx/core/tee.elf $(IMX_MKIMAGE_PATH)/imx-mkimage/iMX8M/tee.bin; \
  8 + $(MAKE) -C $(IMX_MKIMAGE_PATH)/imx-mkimage/ clean; \
  9 + $(MAKE) -C $(IMX_MKIMAGE_PATH)/imx-mkimage/ SOC=iMX8M flash_hdmi_spl_uboot; \
  10 + cp $(IMX_MKIMAGE_PATH)/imx-mkimage/iMX8M/flash.bin $(PRODUCT_OUT)/u-boot-$(strip $(2)).imx;
  11 +endef
  12 +
  13 +
smarc_mx8m/AndroidUboot.mk
... ... @@ -0,0 +1,20 @@
  1 +# uboot.imx in android combine scfw.bin and uboot.bin
  2 +MAKE += SHELL=/bin/bash
  3 +
  4 +define build_uboot
  5 + cp out/target/product/smarc_mx8m/obj/BOOTLOADER_OBJ/u-boot-nodtb.$(strip $(1)) $(IMX_MKIMAGE_PATH)/imx-mkimage/iMX8M/.; \
  6 + cp out/target/product/smarc_mx8m/obj/BOOTLOADER_OBJ/spl/u-boot-spl.bin $(IMX_MKIMAGE_PATH)/imx-mkimage/iMX8M/.; \
  7 + cp out/target/product/smarc_mx8m/obj/BOOTLOADER_OBJ/tools/mkimage $(IMX_MKIMAGE_PATH)/imx-mkimage/iMX8M/mkimage_uboot; \
  8 + cp out/target/product/smarc_mx8m/obj/BOOTLOADER_OBJ/arch/arm/dts/fsl-smarcimx8mq.dtb $(IMX_MKIMAGE_PATH)/imx-mkimage/iMX8M/.; \
  9 + cp $(FSL_PROPRIETARY_PATH)/fsl-proprietary/uboot-firmware/imx8m/signed_hdmi_imx8m.bin $(IMX_MKIMAGE_PATH)/imx-mkimage/iMX8M/.; \
  10 + cp $(FSL_PROPRIETARY_PATH)/fsl-proprietary/uboot-firmware/imx8m/lpddr4_pmu_train_1d_dmem.bin $(IMX_MKIMAGE_PATH)/imx-mkimage/iMX8M/.; \
  11 + cp $(FSL_PROPRIETARY_PATH)/fsl-proprietary/uboot-firmware/imx8m/lpddr4_pmu_train_1d_imem.bin $(IMX_MKIMAGE_PATH)/imx-mkimage/iMX8M/.; \
  12 + cp $(FSL_PROPRIETARY_PATH)/fsl-proprietary/uboot-firmware/imx8m/lpddr4_pmu_train_2d_dmem.bin $(IMX_MKIMAGE_PATH)/imx-mkimage/iMX8M/.; \
  13 + cp $(FSL_PROPRIETARY_PATH)/fsl-proprietary/uboot-firmware/imx8m/lpddr4_pmu_train_2d_imem.bin $(IMX_MKIMAGE_PATH)/imx-mkimage/iMX8M/.; \
  14 + cp $(FSL_PROPRIETARY_PATH)/fsl-proprietary/uboot-firmware/imx8m/bl31.bin $(IMX_MKIMAGE_PATH)/imx-mkimage/iMX8M/.; \
  15 + $(MAKE) -C $(IMX_MKIMAGE_PATH)/imx-mkimage/ clean; \
  16 + $(MAKE) -C $(IMX_MKIMAGE_PATH)/imx-mkimage/ SOC=iMX8M flash_hdmi_spl_uboot; \
  17 + cp $(IMX_MKIMAGE_PATH)/imx-mkimage/iMX8M/flash.bin $(PRODUCT_OUT)/u-boot-$(strip $(2)).imx;
  18 +endef
  19 +
  20 +
smarc_mx8m/BoardConfig.mk
... ... @@ -0,0 +1,137 @@
  1 +#
  2 +# Product-specific compile-time definitions.
  3 +#
  4 +
  5 +include device/fsl/imx8/soc/imx8mq.mk
  6 +include device/embedian/smarc_mx8m/build_id.mk
  7 +include device/fsl/imx8/BoardConfigCommon.mk
  8 +ifeq ($(PREBUILT_FSL_IMX_CODEC),true)
  9 +-include $(FSL_CODEC_PATH)/fsl-codec/fsl-codec.mk
  10 +endif
  11 +# sabreauto_6dq default target for EXT4
  12 +BUILD_TARGET_FS ?= ext4
  13 +include device/fsl/imx8/imx8_target_fs.mk
  14 +
  15 +ifneq ($(BUILD_TARGET_FS),f2fs)
  16 +TARGET_RECOVERY_FSTAB = device/embedian/smarc_mx8m/fstab.freescale
  17 +# build for ext4
  18 +PRODUCT_COPY_FILES += \
  19 + device/embedian/smarc_mx8m/fstab.freescale:root/fstab.freescale
  20 +else
  21 +TARGET_RECOVERY_FSTAB = device/embedian/smarc_mx8m/fstab-f2fs.freescale
  22 +# build for f2fs
  23 +PRODUCT_COPY_FILES += \
  24 + device/embedian/smarc_mx8m/fstab-f2fs.freescale:root/fstab.freescale
  25 +endif # BUILD_TARGET_FS
  26 +
  27 +# Support gpt
  28 +BOARD_BPT_INPUT_FILES += device/fsl/common/partition/device-partitions-13GB-ab.bpt
  29 +ADDITION_BPT_PARTITION = partition-table-7GB:device/fsl/common/partition/device-partitions-7GB-ab.bpt \
  30 + partition-table-28GB:device/fsl/common/partition/device-partitions-28GB-ab.bpt
  31 +
  32 +
  33 +# Vendor Interface manifest and compatibility
  34 +DEVICE_MANIFEST_FILE := device/embedian/smarc_mx8m/manifest.xml
  35 +DEVICE_MATRIX_FILE := device/embedian/smarc_mx8m/compatibility_matrix.xml
  36 +
  37 +TARGET_BOOTLOADER_BOARD_NAME := SMARC
  38 +
  39 +PRODUCT_MODEL := SMARC_MX8MQ
  40 +
  41 +TARGET_BOOTLOADER_POSTFIX := bin
  42 +
  43 +USE_OPENGL_RENDERER := true
  44 +TARGET_CPU_SMP := true
  45 +
  46 +TARGET_RELEASETOOLS_EXTENSIONS := device/fsl/imx8
  47 +BOARD_WLAN_DEVICE := qcwcn
  48 +WPA_SUPPLICANT_VERSION := VER_0_8_X
  49 +BOARD_WPA_SUPPLICANT_DRIVER := NL80211
  50 +BOARD_HOSTAPD_DRIVER := NL80211
  51 +
  52 +BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
  53 +BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
  54 +
  55 +BOARD_VENDOR_KERNEL_MODULES += \
  56 + $(KERNEL_OUT)/drivers/net/wireless/ath/ath.ko \
  57 + $(KERNEL_OUT)/drivers/net/wireless/ath/ath10k/ath10k_core.ko \
  58 + $(KERNEL_OUT)/drivers/net/wireless/ath/ath10k/ath10k_pci.ko
  59 +
  60 +BOARD_USE_SENSOR_FUSION := true
  61 +
  62 +# for recovery service
  63 +TARGET_SELECT_KEY := 28
  64 +# we don't support sparse image.
  65 +TARGET_USERIMAGES_SPARSE_EXT_DISABLED := false
  66 +
  67 +UBOOT_POST_PROCESS := true
  68 +
  69 +# camera hal v3
  70 +IMX_CAMERA_HAL_V3 := true
  71 +
  72 +BOARD_HAVE_USB_CAMERA := true
  73 +
  74 +USE_ION_ALLOCATOR := true
  75 +USE_GPU_ALLOCATOR := false
  76 +
  77 +PRODUCT_COPY_FILES += \
  78 + device/embedian/smarc_mx8m/ueventd.freescale.rc:root/ueventd.freescale.rc
  79 +
  80 +BOARD_AVB_ENABLE := true
  81 +
  82 +# define frame buffer count
  83 +NUM_FRAMEBUFFER_SURFACE_BUFFERS := 5
  84 +
  85 +ifeq ($(PRODUCT_IMX_DRM),true)
  86 +CMASIZE=736M
  87 +else
  88 +CMASIZE=1536M
  89 +endif
  90 +
  91 +BOARD_KERNEL_CMDLINE := console=ttymxc0,115200 earlycon=imxuart,0x30860000,115200 init=/init video=HDMI-A-1:1920x1080-32@60 androidboot.console=ttymxc0 consoleblank=0 androidboot.hardware=freescale androidboot.fbTileSupport=enable cma=$(CMASIZE) androidboot.primary_display=imx-drm firmware_class.path=/vendor/firmware
  92 +
  93 +# Qcom 1CQ(QCA6174) BT
  94 +BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/embedian/smarc_mx8m/bluetooth
  95 +BOARD_HAVE_BLUETOOTH_QCOM := true
  96 +BOARD_HAS_QCA_BT_ROME := true
  97 +BOARD_HAVE_BLUETOOTH_BLUEZ := false
  98 +QCOM_BT_USE_SIBS := true
  99 +ifeq ($(QCOM_BT_USE_SIBS), true)
  100 + WCNSS_FILTER_USES_SIBS := true
  101 +endif
  102 +
  103 +ifeq ($(TARGET_USERIMAGES_USE_UBIFS),true)
  104 +ifeq ($(TARGET_USERIMAGES_USE_EXT4),true)
  105 +$(error "TARGET_USERIMAGES_USE_UBIFS and TARGET_USERIMAGES_USE_EXT4 config open in same time, please only choose one target file system image")
  106 +endif
  107 +endif
  108 +
  109 +TARGET_BOARD_DTS_CONFIG := \
  110 + fsl-smarcimx8mq:fsl-smarcimx8mq.dtb \
  111 + fsl-smarcimx8mq-dcss-lvds:fsl-smarcimx8mq-dcss-lvds.dtb \
  112 + fsl-smarcimx8mq-lcdif-lvds:fsl-smarcimx8mq-lcdif-lvds.dtb \
  113 + fsl-smarcimx8mq-hdmi:fsl-smarcimx8mq-hdmi.dtb \
  114 + fsl-smarcimx8mq-dual-display:fsl-smarcimx8mq-dual-display.dtb \
  115 + fsl-smarcimx8mq-hdmi-4k:fsl-smarcimx8mq-hdmi-4k.dtb
  116 +
  117 +TARGET_BOOTLOADER_CONFIG := smarcimx8mq_2g:smarcimx8mq_2g_ser3_android_defconfig
  118 +
  119 +BOARD_SEPOLICY_DIRS := \
  120 + device/fsl/imx8/sepolicy \
  121 + device/embedian/smarc_mx8m/sepolicy
  122 +
  123 +ifeq ($(PRODUCT_IMX_DRM),true)
  124 +BOARD_SEPOLICY_DIRS += \
  125 + device/fsl/imx8/sepolicy_drm \
  126 + device/embedian/smarc_mx8m/sepolicy_drm
  127 +endif
  128 +
  129 +# Vendor seccomp policy files for media components:
  130 +PRODUCT_COPY_FILES += \
  131 + device/embedian/smarc_mx8m/seccomp/mediacodec-seccomp.policy:vendor/etc/seccomp_policy/mediacodec.policy \
  132 + device/embedian/smarc_mx8m/seccomp/mediaextractor-seccomp.policy:vendor/etc/seccomp_policy/mediaextractor.policy
  133 +
  134 +PRODUCT_COPY_FILES += \
  135 + device/embedian/smarc_mx8m/app_whitelist.xml:system/etc/sysconfig/app_whitelist.xml
  136 +
  137 +TARGET_BOARD_KERNEL_HEADERS := device/fsl/common/kernel-headers
smarc_mx8m/app_whitelist.xml
... ... @@ -0,0 +1,36 @@
  1 +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
  2 +
  3 +<!--
  4 +/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
  5 + *
  6 + * Redistribution and use in source and binary forms, with or without
  7 + * modification, are permitted provided that the following conditions are
  8 + * met:
  9 + * * Redistributions of source code must retain the above copyright
  10 + * notice, this list of conditions and the following disclaimer.
  11 + * * Redistributions in binary form must reproduce the above
  12 + * copyright notice, this list of conditions and the following
  13 + * disclaimer in the documentation and/or other materials provided
  14 + * with the distribution.
  15 + * * Neither the name of The Linux Foundation nor the names of its
  16 + * contributors may be used to endorse or promote products derived
  17 + * from this software without specific prior written permission.
  18 + *
  19 + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
  20 + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  21 + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
  22 + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
  23 + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  24 + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  25 + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
  26 + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  27 + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
  28 + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
  29 + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  30 + */
  31 +-->
  32 +
  33 +<config>
  34 + <!-- deskclock need to freely run in the background -->
  35 + <allow-in-power-save package="com.android.deskclock" />
  36 +</config>
smarc_mx8m/audio_effects.conf
... ... @@ -0,0 +1,130 @@
  1 +# List of effect libraries to load. Each library element must contain a "path" element
  2 +# giving the full path of the library .so file.
  3 +# libraries {
  4 +# <lib name> {
  5 +# path <lib path>
  6 +# }
  7 +# }
  8 +libraries {
  9 + bundle {
  10 + path /system/lib/soundfx/libbundlewrapper.so
  11 + }
  12 + reverb {
  13 + path /system/lib/soundfx/libreverbwrapper.so
  14 + }
  15 + visualizer {
  16 + path /system/lib/soundfx/libvisualizer.so
  17 + }
  18 + downmix {
  19 + path /system/lib/soundfx/libdownmix.so
  20 + }
  21 + loudness_enhancer {
  22 + path /system/lib/soundfx/libldnhncr.so
  23 + }
  24 + pre_processing {
  25 + path /system/lib/soundfx/libaudiopreprocessing.so
  26 + }
  27 +}
  28 +
  29 +# list of effects to load. Each effect element must contain a "library" and a "uuid" element.
  30 +# The value of the "library" element must correspond to the name of one library element in the
  31 +# "libraries" element.
  32 +# The name of the effect element is indicative, only the value of the "uuid" element
  33 +# designates the effect.
  34 +# The uuid is the implementation specific UUID as specified by the effect vendor. This is not the
  35 +# generic effect type UUID.
  36 +# effects {
  37 +# <fx name> {
  38 +# library <lib name>
  39 +# uuid <effect uuid>
  40 +# }
  41 +# ...
  42 +# }
  43 +
  44 +effects {
  45 + bassboost {
  46 + library bundle
  47 + uuid 8631f300-72e2-11df-b57e-0002a5d5c51b
  48 + }
  49 + virtualizer {
  50 + library bundle
  51 + uuid 1d4033c0-8557-11df-9f2d-0002a5d5c51b
  52 + }
  53 + equalizer {
  54 + library bundle
  55 + uuid ce772f20-847d-11df-bb17-0002a5d5c51b
  56 + }
  57 + volume {
  58 + library bundle
  59 + uuid 119341a0-8469-11df-81f9-0002a5d5c51b
  60 + }
  61 + reverb_env_aux {
  62 + library reverb
  63 + uuid 4a387fc0-8ab3-11df-8bad-0002a5d5c51b
  64 + }
  65 + reverb_env_ins {
  66 + library reverb
  67 + uuid c7a511a0-a3bb-11df-860e-0002a5d5c51b
  68 + }
  69 + reverb_pre_aux {
  70 + library reverb
  71 + uuid f29a1400-a3bb-11df-8ddc-0002a5d5c51b
  72 + }
  73 + reverb_pre_ins {
  74 + library reverb
  75 + uuid 172cdf00-a3bc-11df-a72f-0002a5d5c51b
  76 + }
  77 + visualizer {
  78 + library visualizer
  79 + uuid d069d9e0-8329-11df-9168-0002a5d5c51b
  80 + }
  81 + downmix {
  82 + library downmix
  83 + uuid 93f04452-e4fe-41cc-91f9-e475b6d1d69f
  84 + }
  85 + loudness_enhancer {
  86 + library loudness_enhancer
  87 + uuid fa415329-2034-4bea-b5dc-5b381c8d1e2c
  88 + }
  89 +}
  90 +
  91 +# Audio preprocessor configurations.
  92 +# The pre processor configuration consists in a list of elements each describing
  93 +# pre processor settings for a given input source. Valid input source names are:
  94 +# "mic", "camcorder", "voice_recognition", "voice_communication"
  95 +# Each input source element contains a list of effects elements. The name of the effect
  96 +# element must be the name of one of the effects in the "effects" list of the file.
  97 +# Each effect element may optionally contain a list of parameters and their
  98 +# default value to apply when the pre processor effect is created.
  99 +# A parameter is defined by a "param" element and a "value" element. Each of these elements
  100 +# consists in one or more elements specifying a type followed by a value.
  101 +# The types defined are: "int", "short", "float", "bool" and "string"
  102 +# When both "param" and "value" are a single int, a simple form is allowed where just
  103 +# the param and value pair is present in the parameter description
  104 +# pre_processing {
  105 +# <input source name> {
  106 +# <fx name> {
  107 +# <param 1 name> {
  108 +# param {
  109 +# int|short|float|bool|string <value>
  110 +# [ int|short|float|bool|string <value> ]
  111 +# ...
  112 +# }
  113 +# value {
  114 +# int|short|float|bool|string <value>
  115 +# [ int|short|float|bool|string <value> ]
  116 +# ...
  117 +# }
  118 +# }
  119 +# <param 2 name > {<param> <value>}
  120 +# ...
  121 +# }
  122 +# ...
  123 +# }
  124 +# ...
  125 +# }
  126 +
  127 +#
  128 +# TODO: add default audio pre processor configurations after debug and tuning phase
  129 +#
  130 +
smarc_mx8m/audio_policy_configuration.xml
... ... @@ -0,0 +1,87 @@
  1 +<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  2 +<!-- Copyright (C) 2017 The Android Open Source Project
  3 +
  4 + Licensed under the Apache License, Version 2.0 (the "License");
  5 + you may not use this file except in compliance with the License.
  6 + You may obtain a copy of the License at
  7 +
  8 + http://www.apache.org/licenses/LICENSE-2.0
  9 +
  10 + Unless required by applicable law or agreed to in writing, software
  11 + distributed under the License is distributed on an "AS IS" BASIS,
  12 + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13 + See the License for the specific language governing permissions and
  14 + limitations under the License.
  15 +-->
  16 +
  17 +<audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
  18 + <globalConfiguration speaker_drc_enabled="true"/>
  19 +
  20 + <modules>
  21 + <module name="primary" halVersion="2.0">
  22 + <attachedDevices>
  23 + <item>Speaker</item>
  24 + <item>Built-In Mic</item>
  25 + </attachedDevices>
  26 + <defaultOutputDevice>Speaker</defaultOutputDevice>
  27 + <mixPorts>
  28 + <mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY">
  29 + <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
  30 + samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
  31 + </mixPort>
  32 + <mixPort name="hdmi output" role="source" flags="AUDIO_OUTPUT_FLAG_DIRECT">
  33 + <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
  34 + samplingRates="32000,44100,48000,88200,96000,176400,192000" channelMasks="AUDIO_CHANNEL_NONE"/>
  35 + </mixPort>
  36 + <mixPort name="esai output" role="source" flags="AUDIO_OUTPUT_FLAG_DIRECT">
  37 + <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
  38 + samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
  39 + </mixPort>
  40 + <mixPort name="primary input" role="sink">
  41 + <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
  42 + samplingRates="8000,11025,16000,22050,24000,32000,44100,48000"
  43 + channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
  44 + </mixPort>
  45 + </mixPorts>
  46 + <devicePorts>
  47 + <devicePort tagName="Speaker" type="AUDIO_DEVICE_OUT_SPEAKER" role="sink" >
  48 + </devicePort>
  49 + <devicePort tagName="Wired Headphones" type="AUDIO_DEVICE_OUT_WIRED_HEADPHONE" role="sink">
  50 + </devicePort>
  51 + <devicePort tagName="HDMI Out" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink">
  52 + </devicePort>
  53 +
  54 + <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
  55 + </devicePort>
  56 + <devicePort tagName="Spdif-In" type="AUDIO_DEVICE_IN_AUX_DIGITAL" role="source">
  57 + </devicePort>
  58 + </devicePorts>
  59 + <routes>
  60 + <route type="mix" sink="Speaker"
  61 + sources="primary output"/>
  62 + <route type="mix" sink="Wired Headphones"
  63 + sources="esai output,primary output"/>
  64 + <route type="mix" sink="HDMI Out"
  65 + sources="hdmi output,primary output"/>
  66 +
  67 + <route type="mix" sink="primary input"
  68 + sources="Built-In Mic,Spdif-In"/>
  69 + </routes>
  70 + </module>
  71 +
  72 + <!-- A2dp Audio HAL -->
  73 + <xi:include href="a2dp_audio_policy_configuration.xml"/>
  74 +
  75 + <!-- Usb Audio HAL -->
  76 + <xi:include href="usb_audio_policy_configuration.xml"/>
  77 +
  78 + <!-- Remote Submix Audio HAL -->
  79 + <xi:include href="r_submix_audio_policy_configuration.xml"/>
  80 +
  81 + </modules>
  82 +
  83 + <!-- Volume section -->
  84 + <xi:include href="audio_policy_volumes.xml"/>
  85 + <xi:include href="default_volume_tables.xml"/>
  86 +
  87 +</audioPolicyConfiguration>
smarc_mx8m/audio_policy_configuration_drm.xml
... ... @@ -0,0 +1,93 @@
  1 +<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  2 +<!-- Copyright (C) 2017 The Android Open Source Project
  3 +
  4 + Licensed under the Apache License, Version 2.0 (the "License");
  5 + you may not use this file except in compliance with the License.
  6 + You may obtain a copy of the License at
  7 +
  8 + http://www.apache.org/licenses/LICENSE-2.0
  9 +
  10 + Unless required by applicable law or agreed to in writing, software
  11 + distributed under the License is distributed on an "AS IS" BASIS,
  12 + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13 + See the License for the specific language governing permissions and
  14 + limitations under the License.
  15 +-->
  16 +
  17 +<audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
  18 + <globalConfiguration speaker_drc_enabled="true"/>
  19 +
  20 + <modules>
  21 + <module name="primary" halVersion="2.0">
  22 + <attachedDevices>
  23 + <item>HDMI Out</item>
  24 + <item>Built-In Mic</item>
  25 + </attachedDevices>
  26 + <defaultOutputDevice>HDMI Out</defaultOutputDevice>
  27 + <mixPorts>
  28 + <mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY">
  29 + <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
  30 + samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
  31 + </mixPort>
  32 + <mixPort name="hdmi output" role="source" flags="AUDIO_OUTPUT_FLAG_DIRECT">
  33 + <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
  34 + samplingRates="32000,44100,48000,88200,96000,176400,192000" channelMasks="AUDIO_CHANNEL_NONE"/>
  35 + </mixPort>
  36 + <mixPort name="esai output" role="source" flags="AUDIO_OUTPUT_FLAG_DIRECT">
  37 + <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
  38 + samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
  39 + </mixPort>
  40 + <mixPort name="primary input" role="sink">
  41 + <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
  42 + samplingRates="8000,11025,16000,22050,24000,32000,44100,48000"
  43 + channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
  44 + </mixPort>
  45 + </mixPorts>
  46 + <devicePorts>
  47 + <devicePort tagName="Speaker" type="AUDIO_DEVICE_OUT_SPEAKER" role="sink" >
  48 + </devicePort>
  49 + <devicePort tagName="Wired Headset" type="AUDIO_DEVICE_OUT_WIRED_HEADSET" role="sink">
  50 + </devicePort>
  51 + <devicePort tagName="Wired Headphones" type="AUDIO_DEVICE_OUT_WIRED_HEADPHONE" role="sink">
  52 + </devicePort>
  53 + <devicePort tagName="HDMI Out" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink">
  54 + </devicePort>
  55 +
  56 + <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
  57 + </devicePort>
  58 + <devicePort tagName="Wired Headset Mic" type="AUDIO_DEVICE_IN_WIRED_HEADSET" role="source">
  59 + </devicePort>
  60 + <devicePort tagName="Spdif-In" type="AUDIO_DEVICE_IN_AUX_DIGITAL" role="source">
  61 + </devicePort>
  62 + </devicePorts>
  63 + <routes>
  64 + <route type="mix" sink="Speaker"
  65 + sources="esai output,primary output"/>
  66 + <route type="mix" sink="Wired Headset"
  67 + sources="primary output"/>
  68 + <route type="mix" sink="Wired Headphones"
  69 + sources="primary output"/>
  70 + <route type="mix" sink="HDMI Out"
  71 + sources="hdmi output,primary output"/>
  72 +
  73 + <route type="mix" sink="primary input"
  74 + sources="Built-In Mic,Wired Headset Mic,Spdif-In"/>
  75 + </routes>
  76 + </module>
  77 +
  78 + <!-- A2dp Audio HAL -->
  79 + <xi:include href="a2dp_audio_policy_configuration.xml"/>
  80 +
  81 + <!-- Usb Audio HAL -->
  82 + <xi:include href="usb_audio_policy_configuration.xml"/>
  83 +
  84 + <!-- Remote Submix Audio HAL -->
  85 + <xi:include href="r_submix_audio_policy_configuration.xml"/>
  86 +
  87 + </modules>
  88 +
  89 + <!-- Volume section -->
  90 + <xi:include href="audio_policy_volumes.xml"/>
  91 + <xi:include href="default_volume_tables.xml"/>
  92 +
  93 +</audioPolicyConfiguration>
smarc_mx8m/bluetooth/bdroid_buildcfg.h
... ... @@ -0,0 +1,33 @@
  1 +/*
  2 + * Copyright (C) 2012 The Android Open Source Project
  3 + *
  4 + * Licensed under the Apache License, Version 2.0 (the "License");
  5 + * you may not use this file except in compliance with the License.
  6 + * You may obtain a copy of the License at
  7 + *
  8 + * http://www.apache.org/licenses/LICENSE-2.0
  9 + *
  10 + * Unless required by applicable law or agreed to in writing, software
  11 + * distributed under the License is distributed on an "AS IS" BASIS,
  12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13 + * See the License for the specific language governing permissions and
  14 + * limitations under the License.
  15 + */
  16 +
  17 +/* Copyright (C) 2015-2016 Freescale Semiconductor, Inc. */
  18 +
  19 +#ifndef _BDROID_BUILDCFG_H
  20 +#define _BDROID_BUILDCFG_H
  21 +
  22 +#define BTM_DEF_LOCAL_NAME "SMARC_MX8M"
  23 +
  24 +// Disables Interleave scan
  25 +#define BTA_HOST_INTERLEAVE_SEARCH FALSE
  26 +// skips conn update at conn completion
  27 +#define BTA_BLE_SKIP_CONN_UPD TRUE
  28 +// Disables read remote device feature
  29 +#define BTA_SKIP_BLE_READ_REMOTE_FEAT TRUE
  30 +
  31 +//Enable A2DPSink AVRCPController
  32 +#define BTA_AV_SINK_INCLUDED TRUE
  33 +#endif
smarc_mx8m/build_id.mk
... ... @@ -0,0 +1,22 @@
  1 +#
  2 +# Copyright (C) 2008 The Android Open Source Project
  3 +#
  4 +# Licensed under the Apache License, Version 2.0 (the "License");
  5 +# you may not use this file except in compliance with the License.
  6 +# You may obtain a copy of the License at
  7 +#
  8 +# http://www.apache.org/licenses/LICENSE-2.0
  9 +#
  10 +# Unless required by applicable law or agreed to in writing, software
  11 +# distributed under the License is distributed on an "AS IS" BASIS,
  12 +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13 +# See the License for the specific language governing permissions and
  14 +# limitations under the License.
  15 +#
  16 +# BUILD_ID is usually used to specify the branch name
  17 +# (like "MAIN") or a branch name and a release candidate
  18 +# (like "CRB01"). It must be a single word, and is
  19 +# capitalized by convention.
  20 +
  21 +export BUILD_ID=1.3.0-rfp-rc3
  22 +export BUILD_NUMBER=20180406
smarc_mx8m/compatibility_matrix.xml
... ... @@ -0,0 +1,62 @@
  1 +<compatibility-matrix version="1.0" type="device">
  2 + <hal format="hidl" optional="false">
  3 + <name>android.frameworks.schedulerservice</name>
  4 + <version>1.0</version>
  5 + <interface>
  6 + <name>ISchedulingPolicyService</name>
  7 + <instance>default</instance>
  8 + </interface>
  9 + </hal>
  10 + <hal format="hidl" optional="false">
  11 + <name>android.frameworks.sensorservice</name>
  12 + <version>1.0</version>
  13 + <interface>
  14 + <name>ISensorManager</name>
  15 + <instance>default</instance>
  16 + </interface>
  17 + </hal>
  18 + <hal format="hidl" optional="false">
  19 + <name>android.hidl.allocator</name>
  20 + <version>1.0</version>
  21 + <interface>
  22 + <name>IAllocator</name>
  23 + <instance>ashmem</instance>
  24 + </interface>
  25 + </hal>
  26 + <hal format="hidl" optional="false">
  27 + <name>android.hidl.manager</name>
  28 + <version>1.0</version>
  29 + <interface>
  30 + <name>IServiceManager</name>
  31 + <instance>default</instance>
  32 + </interface>
  33 + </hal>
  34 + <hal format="hidl" optional="false">
  35 + <name>android.hidl.memory</name>
  36 + <version>1.0</version>
  37 + <interface>
  38 + <name>IMapper</name>
  39 + <instance>ashmem</instance>
  40 + </interface>
  41 + </hal>
  42 + <hal format="hidl" optional="false">
  43 + <name>android.hidl.token</name>
  44 + <version>1.0</version>
  45 + <interface>
  46 + <name>ITokenManager</name>
  47 + <instance>default</instance>
  48 + </interface>
  49 + </hal>
  50 + <hal format="hidl" optional="false">
  51 + <name>android.system.wifi.keystore</name>
  52 + <version>1.0</version>
  53 + <interface>
  54 + <name>IKeystore</name>
  55 + <instance>default</instance>
  56 + </interface>
  57 + </hal>
  58 + <hal format="native" optional="false">
  59 + <name>netutils-wrapper</name>
  60 + <version>1.0</version>
  61 + </hal>
  62 +</compatibility-matrix>
smarc_mx8m/fstab-f2fs.freescale
... ... @@ -0,0 +1,16 @@
  1 +# Android fstab file.
  2 +#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
  3 +# The filesystem that contains the filesystem checker binary (typically /system) cannot
  4 +# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
  5 +
  6 +/dev/block/by-name/system /system ext4 ro wait
  7 +/dev/block/by-name/userdata /data f2fs noatime,nosuid,nodev wait,formattable,check,encryptable=/dev/block/by-name/datafooter
  8 +/dev/block/by-name/userdata /data ext4 nosuid,nodev,nodiratime,noatime,nomblk_io_submit,noauto_da_alloc,errors=panic wait,formattable,encryptable=/dev/block/by-name/datafooter
  9 +/dev/block/by-name/cache /cache f2fs noatime,nosuid,nodev wait,check
  10 +/dev/block/by-name/cache /cache ext4 nosuid,nodev,nomblk_io_submit wait
  11 +/dev/block/by-name/boot /boot emmc defaults defaults
  12 +/dev/block/by-name/recovery /recovery emmc defaults defaults
  13 +/dev/block/by-name/misc /misc emmc defaults defaults
  14 +/dev/block/by-name/bootloader /bootloader emmc defaults defaults
  15 +/dev/block/zram0 none swap defaults zramsize=314572800
  16 +
smarc_mx8m/fstab.freescale
... ... @@ -0,0 +1,11 @@
  1 +# Android fstab file.
  2 +#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
  3 +# The filesystem that contains the filesystem checker binary (typically /system) cannot
  4 +# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
  5 +
  6 +/devices/platform/usb@38200000/38200000.dwc3/* auto auto defaults voldmanaged=usb:auto
  7 +/dev/block/by-name/system / ext4 ro,barrier=1 wait,slotselect
  8 +/dev/block/by-name/userdata /data ext4 nosuid,nodev,nodiratime,noatime,nomblk_io_submit,noauto_da_alloc,errors=panic wait,formattable,quota,fileencryption=software
  9 +/dev/block/by-name/misc /misc emmc defaults defaults
  10 +/dev/block/zram0 none swap defaults zramsize=314572800
  11 +
smarc_mx8m/init.freescale.emmc.rc
... ... @@ -0,0 +1,7 @@
  1 +on init
  2 + # link emmc node to /dev/block/by-name
  3 + symlink /dev/block/platform/30b40000.usdhc/by-name /dev/block/by-name
  4 + symlink /dev/block/platform/30b40000.usdhc/mmcblk0boot0 /dev/block/by-name/bootloader
  5 +
  6 + # Load persistent dm-verity state
  7 + verity_load_state
smarc_mx8m/init.freescale.sd.rc
... ... @@ -0,0 +1,7 @@
  1 +on init
  2 + # link emmc node to /dev/block/by-name
  3 + symlink /dev/block/platform/30b50000.usdhc/by-name /dev/block/by-name
  4 + symlink /dev/block/platform/30b50000.usdhc/mmcblk1 /dev/block/by-name/bootloader
  5 +
  6 + # Load persistent dm-verity state
  7 + verity_load_state
smarc_mx8m/init.imx8mq.drm.rc
... ... @@ -0,0 +1,25 @@
  1 +import init.${ro.hardware}.${ro.boot.soc_type}.main.rc
  2 +
  3 +
  4 +on post-fs-data
  5 + # create for OP-TEE test
  6 + mkdir /data/tee 0660 media media
  7 + mkdir /data/tee/optee_armtz 0660 media media
  8 + restorecon_recursive /data/tee
  9 +
  10 +
  11 +on boot
  12 + # optee device
  13 + chmod 0660 /dev/tee0
  14 + chown media media /dev/tee0
  15 +
  16 + chmod 0660 /dev/teepriv0
  17 + chown media media /dev/teepriv0
  18 +
  19 +
  20 +service tee_supplicant /system/bin/tee-supplicant
  21 + class main
  22 + user root
  23 + group shell
  24 + oneshot
  25 +
smarc_mx8m/init.imx8mq.rc
... ... @@ -0,0 +1,62 @@
  1 +on early-boot
  2 + # Configure DRM in 64-bit architecture. This shall be done before to start
  3 + # the DRM service which is triggered by the 'on boot' event.
  4 + setprop drm.64bit.enabled true
  5 +
  6 +on boot
  7 +
  8 + # Set OpenGLES version
  9 + setprop ro.opengles.version 196609
  10 +
  11 + # Set GPU 3D minimum clock to 3/64
  12 + write /sys/bus/platform/drivers/galcore/gpu3DMinClock 3
  13 +
  14 + # change for FSL specific service
  15 + chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
  16 + chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
  17 + chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
  18 + chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
  19 + chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
  20 + chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
  21 + chown root system /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
  22 + chmod 0440 /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
  23 + chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
  24 + chown root system /sys/devices/system/cpu/cpu0/online
  25 + chmod 0664 /sys/devices/system/cpu/cpu0/online
  26 + chown root system /sys/devices/system/cpu/cpu1/online
  27 + chmod 0664 /sys/devices/system/cpu/cpu1/online
  28 + chown root system /sys/devices/system/cpu/cpu2/online
  29 + chmod 0664 /sys/devices/system/cpu/cpu2/online
  30 + chown root system /sys/devices/system/cpu/cpu3/online
  31 + chmod 0664 /sys/devices/system/cpu/cpu3/online
  32 +
  33 +on property:sys.boot_completed=1
  34 + # Set default CPU frequency governor
  35 + # Set timer 40ms, min sample 60ms,hispeed at cpufreq MAX freq in freq_table at load 40%
  36 + write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
  37 + write /sys/devices/system/cpu/cpufreq/interactive/timer_rate 40000
  38 + write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 60000
  39 + write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 40
  40 +# change interactive atrrubuties permissions when interactive is actived
  41 +on property:sys.interactive="active"
  42 + chown system root /sys/devices/system/cpu/cpufreq/interactive/timer_rate
  43 + chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_rate
  44 + chown system root /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
  45 + chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
  46 + chown system root /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
  47 + chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
  48 + chown system root /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
  49 + chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
  50 + chown system root /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
  51 + chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
  52 + chown system root /sys/devices/system/cpu/cpufreq/interactive/boost
  53 + chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boost
  54 + chown system root /sys/devices/system/cpu/cpufreq/interactive/boostpulse
  55 + chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boostpulse
  56 + chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
  57 + chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
  58 + chown system system /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
  59 + chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
  60 + write /sys/devices/system/cpu/cpufreq/interactive/timer_rate 40000
  61 + write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 60000
  62 + write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 40
... ... @@ -0,0 +1,250 @@
  1 +import init.${ro.hardware}.usb.rc
  2 +import init.${ro.hardware}.${ro.boot.soc_type}.rc
  3 +import init.${ro.hardware}.${ro.boot.storage_type}.rc
  4 +
  5 +on early-init
  6 + # mount the debugfs
  7 + mount debugfs none /sys/kernel/debug/ mode=0755
  8 +
  9 +on early-init
  10 + exec u:r:modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules ath.ko ath10k_core.ko ath10k_pci.ko
  11 +
  12 +on init
  13 + start watchdogd
  14 +
  15 + # Support legacy paths
  16 + symlink /sdcard /mnt/sdcard
  17 + symlink /sdcard /storage/sdcard0
  18 +
  19 + # setup the global environment
  20 + export CORE_REGISTER_FILE /vendor/etc/core_register
  21 + export COMPONENT_REGISTER_FILE /vendor/etc/component_register
  22 + export CONTENTPIPE_REGISTER_FILE /vendor/etc/contentpipe_register
  23 +
  24 + # disable cursor blink for fbcon, if no splash screen support
  25 + write /sys/class/graphics/fbcon/cursor_blink 0
  26 +
  27 + # deattch the fbcon as hdmi hotplug conflict with fbcon
  28 + write /sys/class/vtconsole/vtcon1/bind 0
  29 +
  30 + mkdir /device 0771 system system
  31 +
  32 +on boot
  33 +
  34 + # emmulate battery property
  35 + setprop sys.emulated.battery 1
  36 +
  37 + # Set permission for IIM node
  38 + symlink /dev/mxs_viim /dev/mxc_mem
  39 +
  40 + # Enable Tethering in the Settings
  41 + setprop ro.tether.denied false
  42 +
  43 + # 3D acceleration property
  44 + setprop debug.sf.showfps 0
  45 + setprop debug.sf.enable_hgl 1
  46 + setprop debug.egl.hw 1
  47 +
  48 + setprop hwc.stretch.filter 1
  49 + setprop hwc.enable_dither 1
  50 +
  51 + # fsl omx graphic manager media framework property
  52 + setprop media.omxgm.enable-player 0
  53 + setprop media.omxgm.enable-record 0
  54 + setprop media.omxgm.enable-scan 1
  55 + setprop rw.VIDEO_RENDER_NAME video_render.surface
  56 + setprop media.fsl_codec.flag 7
  57 +
  58 + #Define the config for dual camera
  59 + #For landscape mode, orient is 0
  60 + #For portrait mode, orient is 90
  61 + #the android before honycomb are all in portrait mode
  62 + setprop camera.disable_zsl_mode 1
  63 + setprop back_camera_name mx6s-csi
  64 + setprop back_camera_orient 0
  65 + setprop front_camera_name uvc
  66 + setprop front_camera_orient 0
  67 +
  68 + # Tweak the mmc device read ahead buffer size
  69 + write /sys/block/mmcblk0/queue/read_ahead_kb 2048
  70 + write /sys/block/mmcblk1/queue/read_ahead_kb 2048
  71 +
  72 + # ALSA mixer naming define
  73 + setprop alsa.mixer.playback.master Playback
  74 + setprop alsa.mixer.capture.master Capture
  75 + setprop alsa.mixer.playback.speaker Playback
  76 + setprop alsa.mixer.playback.headset Headphone
  77 + setprop alsa.mixer.capture.headset Capture
  78 +
  79 + # Set period_us for usb audio
  80 + setprop ro.audio.usb.period_us 20000
  81 +
  82 + # Wifi firmware reload path
  83 + chown wifi wifi /sys/module/bcmdhd/parameters/firmware_path
  84 + chown wifi wifi /sys/module/bcmdhd/parameters/nvram_path
  85 +
  86 + # Prepare for wifi
  87 + setprop wifi.interface wlan0
  88 + setprop wifi.ap.interface wlan0
  89 +
  90 + # Prepare for bluetooth
  91 + chmod 665 /sys/class/rfkill/rfkill0/state
  92 + chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
  93 + write /sys/class/rfkill/rfkill0/state 0
  94 +
  95 + setprop qcom.bluetooth.soc rome_uart
  96 + setprop wc_transport.start_hci false
  97 +
  98 + # Prepare for RIL
  99 + setprop gsm.ril.delay 15
  100 + setprop ro.ril.wake_lock_timeout 300
  101 +
  102 + # Set rotation to 270 to cofigure as portrait mode
  103 + setprop ro.sf.hwrotation 0
  104 +
  105 + # Set the density to 213 tvdpi to match CDD.
  106 + setprop ro.sf.lcd_density 213
  107 +
  108 + # Set extsd access permission
  109 + setprop persist.sampling_profiler 1
  110 +
  111 + # prepare for ril
  112 + setprop gsm.ril.delay 15
  113 + setprop ro.ril.wake_lock_timeout 300
  114 +
  115 + # Set tracefs permission to 755
  116 + chmod 0755 /sys/kernel/debug/tracing
  117 +
  118 + # Default backlight device
  119 + setprop hw.backlight.dev "backlight"
  120 + # Chmod/chown FSL specific sys entry
  121 + chown system system /sys/class/backlight/backlight/brightness
  122 + chmod 0660 /sys/class/backlight/backlight/brightness
  123 +
  124 + # Set light sensor sysfs path and light sensor threshold lux value
  125 + setprop ro.hardware.lightsensor "/sys/class/i2c-dev/i2c-0/device/0-0044/"
  126 + setprop ro.lightsensor.threshold 20
  127 +
  128 + # No bluetooth hardware present
  129 + setprop hw.bluetooth 0
  130 + setprop wlan.interface wlan0
  131 + # Set WiFi Display Source VideoBitRate Adaptive
  132 + setprop media.wfd.video-bitrate 3000000
  133 +
  134 +service wpa_supplicant /vendor/bin/hw/wpa_supplicant \
  135 + -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
  136 + -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
  137 + socket wpa_wlan0 dgram 660 wifi wifi
  138 + class main
  139 + disabled
  140 + oneshot
  141 +
  142 +service sensor_fusion /vendor/bin/fsl_sensor_fusion
  143 + class late_start
  144 + seclabel u:r:sensors:s0
  145 + user system
  146 + group input
  147 + oneshot
  148 +
  149 +# Set watchdog timer to 30 seconds and pet it every 10 seconds to get a 20 second margin
  150 +service watchdogd /sbin/watchdogd 10 20
  151 + class core
  152 + seclabel u:r:watchdogd:s0
  153 +
  154 +service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL
  155 + class main
  156 + disabled
  157 + oneshot
  158 +
  159 +service dhcpcd_p2p /system/bin/dhcpcd -aABKL
  160 + class main
  161 + disabled
  162 + oneshot
  163 +
  164 +service dhcpcd_eth0 /system/bin/dhcpcd -ABKL eth0
  165 + class main
  166 + disabled
  167 + oneshot
  168 +
  169 +service dhcpcd_bt-pan /system/bin/dhcpcd -ABKL
  170 + class main
  171 + disabled
  172 + oneshot
  173 +
  174 +service iprenew_wlan0 /system/bin/dhcpcd -n
  175 + class main
  176 + disabled
  177 + oneshot
  178 +
  179 +service iprenew_p2p /system/bin/dhcpcd -n
  180 + class main
  181 + disabled
  182 + oneshot
  183 +
  184 +service iprenew_eth0 /system/bin/dhcpcd -n eth0
  185 + class main
  186 + disabled
  187 + oneshot
  188 +
  189 +service iprenew_bt-pan /system/bin/dhcpcd -n
  190 + class main
  191 + disabled
  192 + oneshot
  193 +
  194 +# bugreport is triggered by holding down volume down, volume up and power
  195 +service bugreport /system/bin/dumpstate -d -p -B -z \
  196 + -o /data/user_de/0/com.android.shell/files/bugreports/bugreport
  197 + class main
  198 + disabled
  199 + oneshot
  200 + keycodes 114 115 116
  201 +
  202 +on property:wc_transport.start_hci=true
  203 + start start_hci_filter
  204 +
  205 +on property:wc_transport.start_hci=false
  206 + stop start_hci_filter
  207 +
  208 +service start_hci_filter /vendor/bin/wcnss_filter
  209 + class late_start
  210 + user bluetooth
  211 + group bluetooth diag
  212 + disabled
  213 +
  214 +on property:wc_transport.start_root=true
  215 + start hci_filter_root
  216 +
  217 +on property:wc_transport.start_root=false
  218 + stop hci_filter_root
  219 +
  220 +service hci_filter_root /vendor/bin/wcnss_filter
  221 + class late_start
  222 + user bluetooth
  223 + group bluetooth diag system
  224 + disabled
  225 +
  226 +on fs
  227 +# mount ext4 partitions
  228 + mount_all /fstab.freescale
  229 +
  230 + # Adjust parameters for dm-verity device
  231 + write /sys/block/dm-0/queue/read_ahead_kb 4096
  232 +
  233 + # Update dm-verity state and set partition.*.verified properties
  234 + verity_update_state
  235 +
  236 +on verity-logging
  237 + exec u:r:slideshow:s0 -- /sbin/slideshow warning/verity_red_1 warning/verity_red_2
  238 +
  239 +on post-fs
  240 + # Turn on swap
  241 + swapon_all /fstab.freescale
  242 +
  243 + # Swap in only 1 page at a time
  244 + write /proc/sys/vm/page-cluster 0
  245 +
  246 + # This may have been created by the recovery system with the wrong context.
  247 + restorecon /cache/recovery
  248 +
  249 +on post-fs-data
  250 + setprop vold.post_fs_data_done 1
smarc_mx8m/init.usb.rc
... ... @@ -0,0 +1,118 @@
  1 +on boot
  2 + write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno}
  3 + write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer}
  4 + write /config/usb_gadget/g1/strings/0x409/product ${ro.product.model}
  5 +
  6 + # OS DESCRIPTORS
  7 + #===============
  8 + # OS STRING
  9 + #----------
  10 + write /config/usb_gadget/g1/os_desc/b_vendor_code 1
  11 + write /config/usb_gadget/g1/os_desc/qw_sign "MSFT100"
  12 + # use os desc or not is up to each usb functions respectively
  13 + # write /config/usb_gadget/g1/os_desc/use 1
  14 +
  15 + # MAKE b.1 THE ONE ASSOCIATED WITH OS DESCRIPTORS
  16 + #------------------------------------------------
  17 + symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b1
  18 +
  19 + setprop sys.usb.configfs 1
  20 +
  21 + # 38100000.dwc3 is the fixed UDC name for 8mq type c usb
  22 + setprop sys.usb.controller 38100000.dwc3
  23 +
  24 +on fs
  25 + mkdir /dev/usb-ffs 0770 shell shell
  26 + mkdir /dev/usb-ffs/adb 0770 shell shell
  27 + # mount the configfs on /config
  28 + mount configfs none /config mode=0755
  29 + mkdir /config/usb_gadget/g1
  30 + mkdir /config/usb_gadget/g1/configs/b.1
  31 + # mkdir for functions needed
  32 + # this will call each gadget's alloc_inst()
  33 + mkdir /config/usb_gadget/g1/functions/ffs.adb
  34 + mkdir /config/usb_gadget/g1/functions/mtp.gs0
  35 + mkdir /config/usb_gadget/g1/functions/ptp.gs1
  36 + mkdir /config/usb_gadget/g1/functions/accessory.gs2
  37 + mkdir /config/usb_gadget/g1/functions/audio_source.gs3
  38 + mkdir /config/usb_gadget/g1/functions/rndis.gs4
  39 + mkdir /config/usb_gadget/g1/functions/midi.gs5
  40 + mkdir /config/usb_gadget/g1/strings/0x409
  41 + mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409
  42 + # The mount of functionfs for adb must be put AFTER the mkdir for functions in configfs
  43 + mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
  44 +
  45 +on property:sys.usb.config=none && property:sys.usb.configfs=1
  46 + write /config/usb_gadget/g1/os_desc/use 0
  47 +
  48 +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=adb && property:sys.usb.configfs=1
  49 + write /config/usb_gadget/g1/idProduct 0x4ee7
  50 + write /config/usb_gadget/g1/idVendor 0x18d1
  51 +
  52 +on property:sys.usb.config=mtp && property:sys.usb.configfs=1
  53 + write /config/usb_gadget/g1/functions/mtp.gs0/os_desc/interface.MTP/compatible_id "MTP"
  54 + write /config/usb_gadget/g1/os_desc/use 1
  55 + write /config/usb_gadget/g1/idProduct 0x4ee1
  56 + write /config/usb_gadget/g1/idVendor 0x18d1
  57 +
  58 +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mtp,adb && property:sys.usb.configfs=1
  59 + write /config/usb_gadget/g1/functions/mtp.gs0/os_desc/interface.MTP/compatible_id "MTP"
  60 + write /config/usb_gadget/g1/os_desc/use 1
  61 + write /config/usb_gadget/g1/idProduct 0x4ee2
  62 + write /config/usb_gadget/g1/idVendor 0x18d1
  63 +
  64 +on property:sys.usb.config=ptp && property:sys.usb.configfs=1
  65 + write /config/usb_gadget/g1/functions/ptp.gs1/os_desc/interface.MTP/compatible_id "PTP"
  66 + write /config/usb_gadget/g1/os_desc/use 1
  67 + write /config/usb_gadget/g1/idProduct 0x4ee5
  68 + write /config/usb_gadget/g1/idVendor 0x18d1
  69 +
  70 +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=ptp,adb && property:sys.usb.configfs=1
  71 + write /config/usb_gadget/g1/functions/ptp.gs1/os_desc/interface.MTP/compatible_id "PTP"
  72 + write /config/usb_gadget/g1/os_desc/use 1
  73 + write /config/usb_gadget/g1/idProduct 0x4ee6
  74 + write /config/usb_gadget/g1/idVendor 0x18d1
  75 +
  76 +on property:sys.usb.config=accessory && property:sys.usb.configfs=1
  77 + write /config/usb_gadget/g1/idProduct 0x2d00
  78 + write /config/usb_gadget/g1/idVendor 0x18d1
  79 +
  80 +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=accessory,adb && property:sys.usb.configfs=1
  81 + write /config/usb_gadget/g1/idProduct 0x2d01
  82 + write /config/usb_gadget/g1/idVendor 0x18d1
  83 +
  84 +on property:sys.usb.config=audio_source && property:sys.usb.configfs=1
  85 + write /config/usb_gadget/g1/idProduct 0x2d02
  86 + write /config/usb_gadget/g1/idVendor 0x18d1
  87 +
  88 +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=audio_source,adb && property:sys.usb.configfs=1
  89 + write /config/usb_gadget/g1/idProduct 0x2d03
  90 + write /config/usb_gadget/g1/idVendor 0x18d1
  91 +
  92 +on property:sys.usb.config=accessory,audio_source && property:sys.usb.configfs=1
  93 + write /config/usb_gadget/g1/idProduct 0x2d04
  94 + write /config/usb_gadget/g1/idVendor 0x18d1
  95 +
  96 +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=accessory,audio_source,adb && property:sys.usb.configfs=1
  97 + write /config/usb_gadget/g1/idProduct 0x2d05
  98 + write /config/usb_gadget/g1/idVendor 0x18d1
  99 +
  100 +on property:sys.usb.config=midi && property:sys.usb.configfs=1
  101 + write /config/usb_gadget/g1/idProduct 0x4ee8
  102 + write /config/usb_gadget/g1/idVendor 0x18d1
  103 +
  104 +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=midi,adb && property:sys.usb.configfs=1
  105 + write /config/usb_gadget/g1/idProduct 0x4ee9
  106 + write /config/usb_gadget/g1/idVendor 0x18d1
  107 +
  108 +on property:sys.usb.config=rndis && property:sys.usb.configfs=1
  109 + write /config/usb_gadget/g1/functions/rndis.gs4/os_desc/interface.rndis/compatible_id "RNDIS"
  110 + write /config/usb_gadget/g1/os_desc/use 1
  111 + write /config/usb_gadget/g1/idProduct 0x4ee3
  112 + write /config/usb_gadget/g1/idVendor 0x18d1
  113 +
  114 +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,adb && property:sys.usb.configfs=1
  115 + write /config/usb_gadget/g1/functions/rndis.gs4/os_desc/interface.rndis/compatible_id "RNDIS"
  116 + write /config/usb_gadget/g1/os_desc/use 1
  117 + write /config/usb_gadget/g1/idProduct 0x4ee4
  118 + write /config/usb_gadget/g1/idVendor 0x18d1
smarc_mx8m/manifest.xml
... ... @@ -0,0 +1,202 @@
  1 +<manifest version="1.0" type="device">
  2 + <hal format="hidl">
  3 + <name>android.hardware.graphics.allocator</name>
  4 + <transport>hwbinder</transport>
  5 + <impl level="generic"></impl>
  6 + <version>2.0</version>
  7 + <interface>
  8 + <name>IAllocator</name>
  9 + <instance>default</instance>
  10 + </interface>
  11 + </hal>
  12 + <hal format="hidl">
  13 + <name>android.hardware.graphics.composer</name>
  14 + <transport>hwbinder</transport>
  15 + <version>2.1</version>
  16 + <interface>
  17 + <name>IComposer</name>
  18 + <instance>default</instance>
  19 + </interface>
  20 + </hal>
  21 + <hal format="hidl">
  22 + <name>android.hardware.keymaster</name>
  23 + <transport>hwbinder</transport>
  24 + <version>3.0</version>
  25 + <interface>
  26 + <name>IKeymasterDevice</name>
  27 + <instance>default</instance>
  28 + </interface>
  29 + </hal>
  30 + <hal format="hidl">
  31 + <name>android.hardware.drm</name>
  32 + <transport>hwbinder</transport>
  33 + <version>1.0</version>
  34 + <interface>
  35 + <name>ICryptoFactory</name>
  36 + <instance>default</instance>
  37 + </interface>
  38 + <interface>
  39 + <name>IDrmFactory</name>
  40 + <instance>default</instance>
  41 + </interface>
  42 + </hal>
  43 + <hal format="hidl">
  44 + <name>android.hardware.gatekeeper</name>
  45 + <transport>hwbinder</transport>
  46 + <version>1.0</version>
  47 + <interface>
  48 + <name>IGatekeeper</name>
  49 + <instance>default</instance>
  50 + </interface>
  51 + </hal>
  52 + <hal format="hidl">
  53 + <name>android.hardware.graphics.mapper</name>
  54 + <transport arch="32+64">passthrough</transport>
  55 + <impl level="generic"></impl>
  56 + <version>2.0</version>
  57 + <interface>
  58 + <name>IMapper</name>
  59 + <instance>default</instance>
  60 + </interface>
  61 + </hal>
  62 + <hal format="hidl">
  63 + <name>android.hardware.renderscript</name>
  64 + <transport arch="32+64">passthrough</transport>
  65 + <version>1.0</version>
  66 + <interface>
  67 + <name>IDevice</name>
  68 + <instance>default</instance>
  69 + </interface>
  70 + </hal>
  71 + <hal format="hidl">
  72 + <name>android.hardware.cas</name>
  73 + <transport>hwbinder</transport>
  74 + <version>1.0</version>
  75 + <interface>
  76 + <name>IMediaCasService</name>
  77 + <instance>default</instance>
  78 + </interface>
  79 + </hal>
  80 + <hal format="hidl">
  81 + <name>android.hardware.configstore</name>
  82 + <transport>hwbinder</transport>
  83 + <version>1.0</version>
  84 + <interface>
  85 + <name>ISurfaceFlingerConfigs</name>
  86 + <instance>default</instance>
  87 + </interface>
  88 + </hal>
  89 + <hal format="hidl">
  90 + <name>android.hardware.media.omx</name>
  91 + <transport>hwbinder</transport>
  92 + <version>1.0</version>
  93 + <interface>
  94 + <name>IOmx</name>
  95 + <instance>default</instance>
  96 + </interface>
  97 + <interface>
  98 + <name>IOmxStore</name>
  99 + <instance>default</instance>
  100 + </interface>
  101 + </hal>
  102 + <hal format="hidl">
  103 + <name>android.hardware.wifi</name>
  104 + <transport>hwbinder</transport>
  105 + <version>1.1</version>
  106 + <interface>
  107 + <name>IWifi</name>
  108 + <instance>default</instance>
  109 + </interface>
  110 + </hal>
  111 + <hal format="hidl">
  112 + <name>android.hardware.wifi.supplicant</name>
  113 + <transport>hwbinder</transport>
  114 + <version>1.0</version>
  115 + <interface>
  116 + <name>ISupplicant</name>
  117 + <instance>default</instance>
  118 + </interface>
  119 + </hal>
  120 + <hal format="hidl">
  121 + <name>android.hardware.camera.provider</name>
  122 + <transport>hwbinder</transport>
  123 + <impl level="generic"></impl>
  124 + <version>2.4</version>
  125 + <interface>
  126 + <name>ICameraProvider</name>
  127 + <instance>legacy/0</instance>
  128 + </interface>
  129 + </hal>
  130 + <hal format="hidl">
  131 + <name>android.hardware.light</name>
  132 + <transport>hwbinder</transport>
  133 + <version>2.0</version>
  134 + <interface>
  135 + <name>ILight</name>
  136 + <instance>default</instance>
  137 + </interface>
  138 + </hal>
  139 + <hal format="hidl">
  140 + <name>android.hardware.memtrack</name>
  141 + <transport>hwbinder</transport>
  142 + <version>1.0</version>
  143 + <interface>
  144 + <name>IMemtrack</name>
  145 + <instance>default</instance>
  146 + </interface>
  147 + </hal>
  148 + <hal format="hidl">
  149 + <name>android.hardware.power</name>
  150 + <transport>hwbinder</transport>
  151 + <version>1.0</version>
  152 + <interface>
  153 + <name>IPower</name>
  154 + <instance>default</instance>
  155 + </interface>
  156 + </hal>
  157 + <hal format="hidl">
  158 + <name>android.hardware.audio</name>
  159 + <transport>hwbinder</transport>
  160 + <version>2.0</version>
  161 + <interface>
  162 + <name>IDevicesFactory</name>
  163 + <instance>default</instance>
  164 + </interface>
  165 + </hal>
  166 + <hal format="hidl">
  167 + <name>android.hardware.audio.effect</name>
  168 + <transport>hwbinder</transport>
  169 + <version>2.0</version>
  170 + <interface>
  171 + <name>IEffectsFactory</name>
  172 + <instance>default</instance>
  173 + </interface>
  174 + </hal>
  175 + <hal format="hidl">
  176 + <name>android.hardware.usb</name>
  177 + <transport>hwbinder</transport>
  178 + <version>1.1</version>
  179 + <interface>
  180 + <name>IUsb</name>
  181 + <instance>default</instance>
  182 + </interface>
  183 + </hal>
  184 + <hal format="hidl">
  185 + <name>android.hardware.bluetooth</name>
  186 + <transport>hwbinder</transport>
  187 + <version>1.0</version>
  188 + <interface>
  189 + <name>IBluetoothHci</name>
  190 + <instance>default</instance>
  191 + </interface>
  192 + </hal>
  193 + <hal format="hidl">
  194 + <name>android.hardware.boot</name>
  195 + <transport>hwbinder</transport>
  196 + <version>1.0</version>
  197 + <interface>
  198 + <name>IBootControl</name>
  199 + <instance>default</instance>
  200 + </interface>
  201 + </hal>
  202 +</manifest>
smarc_mx8m/overlay/frameworks/base/core/res/res/drawable-nodpi/default_wallpaper.png

3.39 MB

smarc_mx8m/overlay/frameworks/base/core/res/res/drawable-sw600dp-nodpi/default_wallpaper.png

3.39 MB

smarc_mx8m/overlay/frameworks/base/core/res/res/drawable-sw720dp-nodpi/default_wallpaper.png

3.39 MB

smarc_mx8m/overlay/frameworks/base/core/res/res/values/config.xml
... ... @@ -0,0 +1,195 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<!--
  3 +/*
  4 +** Copyright 2011, The Android Open Source Project
  5 +**
  6 +** Licensed under the Apache License, Version 2.0 (the "License");
  7 +** you may not use this file except in compliance with the License.
  8 +** You may obtain a copy of the License at
  9 +**
  10 +** http://www.apache.org/licenses/LICENSE-2.0
  11 +**
  12 +** Unless required by applicable law or agreed to in writing, software
  13 +** distributed under the License is distributed on an "AS IS" BASIS,
  14 +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15 +** See the License for the specific language governing permissions and
  16 +** limitations under the License.
  17 +*/
  18 +-->
  19 +
  20 +<!-- These resources are around just to allow their values to be customized
  21 + for different hardware and product builds. -->
  22 +<resources>
  23 +
  24 + <!--For Android we support eth0 now -->
  25 + <string translatable="false" name="config_ethernet_iface_regex">eth0</string>
  26 +
  27 + <!-- List of regexpressions describing the interface (if any) that represent tetherable
  28 + USB interfaces. If the device doesn't want to support tething over USB this should
  29 + be empty. An example would be "usb.*" -->
  30 + <string-array translatable="false" name="config_tether_usb_regexs">
  31 + <item>usb0</item>
  32 + </string-array>
  33 +
  34 + <!-- List of regexpressions describing the interface (if any) that represent tetherable
  35 + Wifi interfaces. If the device doesn't want to support tethering over Wifi this
  36 + should be empty. An example would be "softap.*" -->
  37 + <string-array translatable="false" name="config_tether_wifi_regexs">
  38 + <item>"wlan0"</item>
  39 + </string-array>
  40 +
  41 + <!-- List of regexpressions describing the interface (if any) that represent tetherable
  42 + bluetooth interfaces. If the device doesn't want to support tethering over bluetooth this
  43 + should be empty. -->
  44 + <string-array translatable="false" name="config_tether_bluetooth_regexs">
  45 + <item>"bt-pan"</item>
  46 + </string-array>
  47 +
  48 + <!-- Array of ConnectivityManager.TYPE_xxxx values allowable for tethering -->
  49 + <!-- Common options are [1, 4] for TYPE_WIFI and TYPE_MOBILE_DUN or
  50 + <!== [0,1,5,7,9] for TYPE_MOBILE, TYPE_WIFI, TYPE_MOBILE_HIPRI, TYPE_BLUETOOTH and TYPE_ETHERNET -->
  51 + <integer-array translatable="false" name="config_tether_upstream_types">
  52 + <item>0</item>
  53 + <item>1</item>
  54 + <item>5</item>
  55 + <item>9</item>
  56 + </integer-array>
  57 +
  58 + <!-- Flag indicating whether we should enable the automatic brightness in Settings.
  59 + config_hardware_automatic_brightness_available is not set, so we will use software implementation -->
  60 + <bool name="config_automatic_brightness_available">true</bool>
  61 +
  62 + <!-- An Array of "[ConnectivityManager connectionType],
  63 + [# simultaneous connection types]" -->
  64 + <string-array translatable="false" name="radioAttributes">
  65 + <item>"1,1"</item>
  66 + <item>"9,1"</item>
  67 + </string-array>
  68 +
  69 + <!-- An Array of "[Connection name],[ConnectivityManager.TYPE_xxxx],
  70 + [associated radio-type],[priority],[restoral-timer(ms)],[dependencyMet] -->
  71 + <!-- the 5th element "resore-time" indicates the number of milliseconds to delay
  72 + before automatically restore the default connection. Set -1 if the connection
  73 + does not require auto-restore. -->
  74 + <!-- the 6th element indicates boot-time dependency-met value. -->
  75 + <string-array translatable="false" name="networkAttributes">
  76 + <item>"wifi,1,1,1,-1,true"</item>
  77 + <item>"bluetooth,7,7,2,-1,true"</item>
  78 + <item>"ethernet,9,9,2,-1,true"</item>
  79 + </string-array>
  80 +
  81 + <!-- Array of light sensor LUX values to define our levels for auto backlight brightness support.
  82 + The N entries of this array define N + 1 zones as follows:
  83 +
  84 + Zone 0: 0 <= LUX < array[0]
  85 + Zone 1: array[0] <= LUX < array[1]
  86 + ...
  87 + Zone N: array[N - 1] <= LUX < array[N]
  88 + Zone N + 1: array[N] <= LUX < infinity
  89 +
  90 + Must be overridden in platform specific overlays -->
  91 + <integer-array name="config_autoBrightnessLevels">
  92 + <item>5</item>
  93 + <item>15</item>
  94 + <item>50</item>
  95 + <item>100</item>
  96 + <item>200</item>
  97 + <item>400</item>
  98 + <item>1000</item>
  99 + <item>2000</item>
  100 + <item>3000</item>
  101 + <item>5000</item>
  102 + <item>10000</item>
  103 + <item>30000</item>
  104 + </integer-array>
  105 +
  106 + <!-- Array of output values for LCD backlight corresponding to the LUX values
  107 + in the config_autoBrightnessLevels array. This array should have size one greater
  108 + than the size of the config_autoBrightnessLevels array.
  109 + This must be overridden in platform specific overlays -->
  110 + <integer-array name="config_autoBrightnessLcdBacklightValues">
  111 + <item>5</item> <!-- 0-5 -->
  112 + <item>20</item> <!-- 5-15 -->
  113 + <item>30</item> <!-- 15-50 -->
  114 + <item>40</item> <!-- 50-100 -->
  115 + <item>50</item> <!-- 100-200 -->
  116 + <item>60</item> <!-- 200-400 -->
  117 + <item>70</item> <!-- 400-1000 -->
  118 + <item>80</item> <!-- 1000-2000 -->
  119 + <item>130</item> <!-- 2000-3000 -->
  120 + <item>180</item> <!-- 3000-5000 -->
  121 + <item>255</item> <!-- 5000-10000 -->
  122 + <item>255</item> <!-- 10000-30000 -->
  123 + <item>255</item> <!-- 30000+ -->
  124 + </integer-array>
  125 +
  126 + <!-- Array of output values for button backlight corresponding to the LUX values
  127 + in the config_autoBrightnessLevels array. This array should have size one greater
  128 + than the size of the config_autoBrightnessLevels array.
  129 + This must be overridden in platform specific overlays -->
  130 + <integer-array name="config_autoBrightnessButtonBacklightValues">
  131 + <item>0</item>
  132 + <item>0</item>
  133 + <item>0</item>
  134 + <item>0</item>
  135 + <item>0</item>
  136 + <item>0</item>
  137 + <item>0</item>
  138 + <item>0</item>
  139 + <item>0</item>
  140 + <item>0</item>
  141 + <item>0</item>
  142 + <item>0</item>
  143 + <item>0</item>
  144 + <item>0</item>
  145 + <item>0</item>
  146 + <item>0</item>
  147 + <item>0</item>
  148 + </integer-array>
  149 +
  150 + <!-- Array of output values for keyboard backlight corresponding to the LUX values
  151 + in the config_autoBrightnessLevels array. This array should have size one greater
  152 + than the size of the config_autoBrightnessLevels array.
  153 + This must be overridden in platform specific overlays -->
  154 + <integer-array name="config_autoBrightnessKeyboardBacklightValues">
  155 + <item>0</item>
  156 + <item>0</item>
  157 + <item>0</item>
  158 + <item>0</item>
  159 + <item>0</item>
  160 + <item>0</item>
  161 + <item>0</item>
  162 + <item>0</item>
  163 + <item>0</item>
  164 + <item>0</item>
  165 + <item>0</item>
  166 + <item>0</item>
  167 + <item>0</item>
  168 + <item>0</item>
  169 + <item>0</item>
  170 + <item>0</item>
  171 + <item>0</item>
  172 + </integer-array>
  173 +
  174 + <integer name="config_screenBrightnessDim">5</integer>
  175 +
  176 + <!-- Maximum number of supported users -->
  177 + <integer name="config_multiuserMaximumUsers">8</integer>
  178 + <!-- Whether Multiuser UI should be shown -->
  179 + <bool name="config_enableMultiUserUI">true</bool>
  180 +
  181 + <!-- Whether a software navigation bar should be shown. NOTE: in the future this may be
  182 + autodetected from the Configuration. -->
  183 + <bool name="config_showNavigationBar">true</bool>
  184 +
  185 + <!-- This device is not "voice capable"; it's data-only. -->
  186 + <bool name="config_voice_capable">false</bool>
  187 +
  188 + <!-- Boolean indicating whether the wifi chipset has dual frequency band support -->
  189 + <bool translatable="false" name="config_wifi_dual_band_support">true</bool>
  190 +
  191 + <!-- If true, the doze component is not started until after the screen has been
  192 + turned off and the screen off animation has been performed. -->
  193 + <bool name="config_dozeAfterScreenOff">true</bool>
  194 +
  195 +</resources>
smarc_mx8m/overlay/frameworks/base/core/res/res/xml/power_profile.xml
... ... @@ -0,0 +1,61 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<!--
  3 +**
  4 +** Copyright 2009, The Android Open Source Project
  5 +* Copyright (C) 2016 Freescale Semiconductor, Inc.
  6 +**
  7 +** Licensed under the Apache License, Version 2.0 (the "License")
  8 +** you may not use this file except in compliance with the License.
  9 +** You may obtain a copy of the License at
  10 +**
  11 +** http://www.apache.org/licenses/LICENSE-2.0
  12 +**
  13 +** Unless required by applicable law or agreed to in writing, software
  14 +** distributed under the License is distributed on an "AS IS" BASIS,
  15 +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16 +** See the License for the specific language governing permissions and
  17 +** limitations under the License.
  18 +*/
  19 +-->
  20 +
  21 +<device name="Android">
  22 + <!-- All values are in mAh except as noted -->
  23 + <item name="none">0</item>
  24 + <item name="screen.on">71</item>
  25 + <item name="bluetooth.active">17</item>
  26 + <item name="bluetooth.on">17</item> <!--sabresd don't have BT device -->
  27 + <item name="screen.full">200</item>
  28 + <item name="wifi.on">80</item>
  29 + <item name="wifi.active">96</item>
  30 + <item name="wifi.scan">70</item>
  31 + <item name="dsp.audio">40</item>
  32 + <item name="dsp.video">280</item>
  33 + <item name="radio.active">250</item>
  34 + <!-- The current consumed by the radio when it is scanning for a signal -->
  35 + <item name="radio.scanning">82</item>
  36 + <item name="gps.on">29.7</item>
  37 + <!-- Current consumed by the radio at different signal strengths, when paging -->
  38 + <array name="radio.on"> <!-- Strength 0 to BINS-1 -->
  39 + <value>0.1</value>
  40 + <value>3.4</value>
  41 + </array>
  42 + <!-- Different CPU speeds as reported in
  43 + /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state -->
  44 + <array name="cpu.speeds">
  45 + <value>996000</value> <!-- 996 MHz CPU speed -->
  46 + <value>792000</value> <!-- 792 MHz CPU speed -->
  47 + <value>396000</value> <!-- 396 MHz CPU speed -->
  48 + <value>198000</value> <!-- 198 MHz CPU speed -->
  49 + </array>
  50 + <!-- Power consumption when CPU is idle -->
  51 + <item name="cpu.idle">36</item>
  52 + <!-- Power consumption at different speeds -->
  53 + <array name="cpu.active">
  54 + <value>480</value>
  55 + <value>320</value>
  56 + <value>130</value>
  57 + <value>40</value>
  58 + </array>
  59 + <!-- This is the battery capacity in mAh -->
  60 + <item name="battery.capacity">4800</item>
  61 +</device>
smarc_mx8m/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
... ... @@ -0,0 +1,26 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<!--
  3 +/**
  4 + * Copyright (c) 2009, The Android Open Source Project
  5 + *
  6 + * Licensed under the Apache License, Version 2.0 (the "License");
  7 + * you may not use this file except in compliance with the License.
  8 + * You may obtain a copy of the License at
  9 + *
  10 + * http://www.apache.org/licenses/LICENSE-2.0
  11 + *
  12 + * Unless required by applicable law or agreed to in writing, software
  13 + * distributed under the License is distributed on an "AS IS" BASIS,
  14 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15 + * See the License for the specific language governing permissions and
  16 + * limitations under the License.
  17 + */
  18 +-->
  19 +<resources>
  20 + <!-- Default for Settings.Secure.USER_SETUP_COMPLETE -->
  21 + <bool name="def_user_setup_complete">true</bool>
  22 + <!-- Disable GPS Provider-->
  23 + <string name="def_location_providers_allowed" translatable="false"></string>
  24 + <bool name="def_bluetooth_on">false</bool>
  25 + <bool name="def_stay_on_while_plugged_in">true</bool>
  26 +</resources>
smarc_mx8m/overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml
... ... @@ -0,0 +1,4 @@
  1 +<resources>
  2 + <!-- Minimum swipe distance to catch the swipe gestures to invoke assist or switch tasks. -->
  3 + <dimen name="navigation_bar_min_swipe_distance">40dp</dimen>
  4 +</resources>
smarc_mx8m/overlay/packages/apps/Settings/res/values/bools.xml
... ... @@ -0,0 +1,19 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<!-- Copyright (C) 2009 The Android Open Source Project
  3 +
  4 + Licensed under the Apache License, Version 2.0 (the "License");
  5 + you may not use this file except in compliance with the License.
  6 + You may obtain a copy of the License at
  7 +
  8 + http://www.apache.org/licenses/LICENSE-2.0
  9 +
  10 + Unless required by applicable law or agreed to in writing, software
  11 + distributed under the License is distributed on an "AS IS" BASIS,
  12 + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13 + See the License for the specific language governing permissions and
  14 + limitations under the License.
  15 +-->
  16 +
  17 +<resources>
  18 + <bool name="config_additional_system_update_setting_enable">true</bool>
  19 +</resources>
smarc_mx8m/overlay/packages/apps/Settings/res/values/config.xml
... ... @@ -0,0 +1,21 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<!-- Copyright (C) 2007 The Android Open Source Project
  3 +
  4 + Licensed under the Apache License, Version 2.0 (the "License");
  5 + you may not use this file except in compliance with the License.
  6 + You may obtain a copy of the License at
  7 +
  8 + http://www.apache.org/licenses/LICENSE-2.0
  9 +
  10 + Unless required by applicable law or agreed to in writing, software
  11 + distributed under the License is distributed on an "AS IS" BASIS,
  12 + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13 + See the License for the specific language governing permissions and
  14 + limitations under the License.
  15 +-->
  16 +
  17 +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
  18 + <string name="additional_system_update" translatable="false">com.fsl.android.ota</string>
  19 + <string name="additional_system_update_menu" translatable="false">com.fsl.android.ota.OtaAppActivity</string>
  20 +
  21 +</resources>
smarc_mx8m/overlay/packages/apps/Settings/res/values/strings.xml
... ... @@ -0,0 +1,22 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<!-- Copyright (C) 2007 The Android Open Source Project
  3 +
  4 + Licensed under the Apache License, Version 2.0 (the "License");
  5 + you may not use this file except in compliance with the License.
  6 + You may obtain a copy of the License at
  7 +
  8 + http://www.apache.org/licenses/LICENSE-2.0
  9 +
  10 + Unless required by applicable law or agreed to in writing, software
  11 + distributed under the License is distributed on an "AS IS" BASIS,
  12 + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13 + See the License for the specific language governing permissions and
  14 + limitations under the License.
  15 +-->
  16 +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
  17 + <!-- Help URLs for some screens. Not specified here. Specified in product overlays --><skip/>
  18 + <!-- Help menu label [CHAR LIMIT=20] -->
  19 + <!-- Help URL, WiFi [DO NOT TRANSLATE] -->
  20 + <string name="help_url_wifi" translatable="false">http://support.google.com/wifi</string>
  21 + <string name="help_url_accounts" translatable="false">http://support.google.com/accounts</string>
  22 +</resources>
smarc_mx8m/required_hardware.xml
... ... @@ -0,0 +1,29 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<!-- Copyright (C) 2009 The Android Open Source Project
  3 + Copyright 2018 NXP
  4 +
  5 + Licensed under the Apache License, Version 2.0 (the "License");
  6 + you may not use this file except in compliance with the License.
  7 + You may obtain a copy of the License at
  8 +
  9 + http://www.apache.org/licenses/LICENSE-2.0
  10 +
  11 + Unless required by applicable law or agreed to in writing, software
  12 + distributed under the License is distributed on an "AS IS" BASIS,
  13 + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14 + See the License for the specific language governing permissions and
  15 + limitations under the License.
  16 +-->
  17 +
  18 +<!-- These are the hardware components that are included in i.MX reference board
  19 +-->
  20 +<permissions>
  21 + <!-- This is Android and fully CTS compatible. Basically this is for CTS tests to use. -->
  22 + <feature name="android.software.cts" />
  23 + <feature name="android.hardware.camera.any" />
  24 + <feature name="android.software.home_screen" />
  25 + <feature name="android.software.input_methods" />
  26 + <feature name="android.hardware.location" />
  27 + <feature name="android.hardware.location.network" />
  28 + <feature name="android.hardware.bluetooth" />
  29 +</permissions>
smarc_mx8m/seccomp/mediacodec-seccomp.policy
... ... @@ -0,0 +1 @@
  1 +select: 1
smarc_mx8m/seccomp/mediaextractor-seccomp.policy
... ... @@ -0,0 +1,5 @@
  1 +uname: 1
  2 +fchmodat: 1
  3 +ftruncate64: 1
  4 +readlinkat: 1
  5 +pread64: 1
smarc_mx8m/sepolicy/file_contexts
... ... @@ -0,0 +1,32 @@
  1 +#sd boot
  2 +/dev/block/platform/30b50000\.usdhc/by-name/boot_[ab] u:object_r:boot_block_device:s0
  3 +/dev/block/platform/30b50000\.usdhc/by-name/system_[ab] u:object_r:system_block_device:s0
  4 +/dev/block/platform/30b50000\.usdhc/by-name/vendor_[ab] u:object_r:system_block_device:s0
  5 +/dev/block/platform/30b50000\.usdhc/by-name/misc u:object_r:misc_block_device:s0
  6 +/dev/block/platform/30b50000\.usdhc/by-name/metadata u:object_r:metadata_block_device:s0
  7 +/dev/block/platform/30b50000\.usdhc/by-name/presistdata u:object_r:frp_block_device:s0
  8 +/dev/block/platform/30b50000\.usdhc/by-name/userdata u:object_r:userdata_block_device:s0
  9 +/dev/block/platform/30b50000\.usdhc/by-name/vbmeta_[ab] u:object_r:vbmeta_block_device:s0
  10 +
  11 +#emmc boot
  12 +/dev/block/platform/30b40000\.usdhc/by-name/boot_[ab] u:object_r:boot_block_device:s0
  13 +/dev/block/platform/30b40000\.usdhc/by-name/system_[ab] u:object_r:system_block_device:s0
  14 +/dev/block/platform/30b40000\.usdhc/by-name/vendor_[ab] u:object_r:system_block_device:s0
  15 +/dev/block/platform/30b40000\.usdhc/by-name/misc u:object_r:misc_block_device:s0
  16 +/dev/block/platform/30b40000\.usdhc/by-name/metadata u:object_r:metadata_block_device:s0
  17 +/dev/block/platform/30b40000\.usdhc/by-name/presistdata u:object_r:frp_block_device:s0
  18 +/dev/block/platform/30b40000\.usdhc/by-name/userdata u:object_r:userdata_block_device:s0
  19 +/dev/block/platform/30b40000\.usdhc/by-name/vbmeta_[ab] u:object_r:vbmeta_block_device:s0
  20 +
  21 +#peripheral
  22 +/vendor/bin/magd u:object_r:sensors_exec:s0
  23 +/vendor/bin/fsl_sensor_fusion u:object_r:sensors_exec:s0
  24 +/dev/mma8x5x u:object_r:sensors_device:s0
  25 +/dev/ttyGS[0-9]* u:object_r:tty_device:s0
  26 +/dev/ttymxc[0-9]* u:object_r:tty_device:s0
  27 +/dev/ttyUSB[0-9]* u:object_r:tty_device:s0
  28 +/dev/ttyLP[0-9]* u:object_r:tty_device:s0
  29 +/dev/FreescaleAccelerometer u:object_r:sensors_device:s0
  30 +/dev/FreescaleMagnetometer u:object_r:sensors_device:s0
  31 +/dev/FreescaleGyroscope u:object_r:sensors_device:s0
  32 +/dev/sda[0-8]* u:object_r:fuse:s0
smarc_mx8m/sepolicy_drm/mediadrmserver.te
... ... @@ -0,0 +1,3 @@
  1 +allow mediadrmserver ion_device:chr_file { open read ioctl };
  2 +allow mediadrmserver vendor_file:file { open read getattr execute };
  3 +allow mediadrmserver vendor_file:dir { read };
smarc_mx8m/sepolicy_drm/netd.te
... ... @@ -0,0 +1,4 @@
  1 +# Rules on netd domain for optee xtest 200x tests
  2 +allow netd tee:tcp_socket { read write getopt setopt };
  3 +allow netd tee:udp_socket { read write getopt setopt };
  4 +allow netd tee:fd { use };
smarc_mx8m/sepolicy_drm/shell.te
... ... @@ -0,0 +1,4 @@
  1 +allow shell tee_exec:file { getattr execute read open execute_no_trans };
  2 +allow shell tee_data_file:file { create write open getattr unlink read };
  3 +allow shell tee_data_file:dir { write add_name remove_name rename search };
  4 +allow shell tee_data_file:chr_file { read write open ioctl };
smarc_mx8m/sepolicy_drm/tee.te
... ... @@ -0,0 +1,19 @@
  1 +typeattribute tee coredomain;
  2 +
  3 +# allow run xtest as shell
  4 +domain_auto_trans(shell, tee_exec, tee);
  5 +allow tee console_device:chr_file { getattr read write ioctl };
  6 +allow tee shell:fd { use };
  7 +
  8 +allow tee tee_data_file:dir { create rmdir rename };
  9 +allow tee system_data_file:dir { write remove_name };
  10 +
  11 +# For xtest 200x tests
  12 +allow tee tee:tcp_socket { create connect read write getopt setopt };
  13 +allow tee tee:udp_socket { create connect read write getopt getattr };
  14 +allow tee tee:capability { net_raw };
  15 +allow tee fwmarkd_socket:sock_file { write };
  16 +allow tee port:tcp_socket { name_connect };
  17 +
  18 +# For tee-supplicant
  19 +allow tee system_data_file:dir { write create add_name };
smarc_mx8m/ueventd.freescale.rc
... ... @@ -0,0 +1,37 @@
  1 +/dev/block/platform/30b50000\.usdhc/by-name/presistdata 0600 system system
  2 +/dev/block/platform/30b40000\.usdhc/by-name/presistdata 0600 system system
  3 +/dev/pmem_gpu 0660 system graphics
  4 +/dev/ttymxc2 0660 bluetooth bluetooth
  5 +/dev/ttymxc4 0660 bluetooth bluetooth
  6 +/dev/ttyLP1 0660 bluetooth bluetooth
  7 +/dev/snd/* 0660 system audio
  8 +/dev/ttyUSB* 0640 radio radio
  9 +/dev/ttyACM* 0640 radio radio
  10 +/dev/video* 0660 system camera
  11 +/dev/video0 0660 system camera
  12 +/dev/video1 0660 system camera
  13 +/dev/video2 0660 system camera
  14 +/dev/video16 0660 system graphics
  15 +/dev/mxc_hantro 0660 media drmrpc
  16 +/dev/imxdpu 0660 media drmrpc
  17 +/dev/uinput 0660 system bluetooth
  18 +/dev/ion 0666 media drmrpc
  19 +/dev/galcore 0666 system graphics
  20 +/dev/graphics/fb0 0660 system graphics
  21 +/dev/watchdog 0660 system root
  22 +/dev/ir 0660 system system
  23 +/dev/caam_kb 0660 system system
  24 +
  25 +/sys/devices/virtual/thermal/thermal_zone* trip_point_0_temp 0660 system system
  26 +/sys/devices/virtual/thermal/thermal_zone* trip_point_1_temp 0660 system system
  27 +/sys/devices/virtual/thermal/thermal_zone* trip_point_2_temp 0660 system system
  28 +
  29 +/sys/devices/platform/mxsdhci.2/mmc_host/mmc0/mmc0:000* boot_bus_config 0660 root root
  30 +/sys/devices/platform/mxsdhci.2/mmc_host/mmc0/mmc0:000* boot_config 0660 root root
  31 +
  32 +/sys/devices/platform/mxc_sdc_fb.0/graphics/fb* fsl_disp_property 0660 system graphics
  33 +/sys/devices/platform/mxc_sdc_fb.1/graphics/fb* fsl_disp_property 0660 system graphics
  34 +/sys/devices/platform/mxc_sdc_fb.0/graphics/fb* mode 0660 system graphics
  35 +/sys/devices/platform/mxc_sdc_fb.1/graphics/fb* mode 0660 system graphics
  36 +/sys/devices/platform/mxc_dvfs_core.0 enable 0660 system system
  37 +/sys/devices/platform/busfreq.0 enable 0660 system system