Commit 60ea7fa3df9a734448a3e0252e1dcbda801ad1ac
0 parents
Exists in
master
and in
1 other branch
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
- .gitignore
- MODULE_LICENSE_APACHE2
- NOTICE
- common/EmbPathConfig.mk
- imx8/AndroidProducts.mk
- imx8/etc/ota.conf
- imx8/init.recovery.freescale.rc
- imx8/smarc_mx8m.mk
- imx8/smarc_mx8m_drm.mk
- imx8/vendorsetup.sh
- scripts/install.sh
- scripts/platform/bt/vnd_smarc_mx8m.txt
- scripts/platform/build/make.git/0001-core-Makefile-avoid-referring-PRODUCT_MANUFACTURER-i.patch
- scripts/platform/vendor/embedian/i2c-tools.git/0001-fix-i2c-tools-build-with-Android.patch
- scripts/platform/vendor/embedian/imx-mkimage.git/0001-smarc-imx8m-add-preliminary-support.patch
- scripts/platform/vendor/nxp-opensource/imx.git/0001-embedian-added-support-sgtl5000-codec.patch
- scripts/sh/smarc-mksdcard.sh
- smarc_mx8m/AndroidBoard.mk
- smarc_mx8m/AndroidTee.mk
- smarc_mx8m/AndroidUboot.mk
- smarc_mx8m/BoardConfig.mk
- smarc_mx8m/app_whitelist.xml
- smarc_mx8m/audio_effects.conf
- smarc_mx8m/audio_policy_configuration.xml
- smarc_mx8m/audio_policy_configuration_drm.xml
- smarc_mx8m/bluetooth/bdroid_buildcfg.h
- smarc_mx8m/build_id.mk
- smarc_mx8m/compatibility_matrix.xml
- smarc_mx8m/fstab-f2fs.freescale
- smarc_mx8m/fstab.freescale
- smarc_mx8m/init.freescale.emmc.rc
- smarc_mx8m/init.freescale.sd.rc
- smarc_mx8m/init.imx8mq.drm.rc
- smarc_mx8m/init.imx8mq.rc
- smarc_mx8m/init.rc
- smarc_mx8m/init.usb.rc
- smarc_mx8m/manifest.xml
- smarc_mx8m/overlay/frameworks/base/core/res/res/drawable-nodpi/default_wallpaper.png
- smarc_mx8m/overlay/frameworks/base/core/res/res/drawable-sw600dp-nodpi/default_wallpaper.png
- smarc_mx8m/overlay/frameworks/base/core/res/res/drawable-sw720dp-nodpi/default_wallpaper.png
- smarc_mx8m/overlay/frameworks/base/core/res/res/values/config.xml
- smarc_mx8m/overlay/frameworks/base/core/res/res/xml/power_profile.xml
- smarc_mx8m/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
- smarc_mx8m/overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml
- smarc_mx8m/overlay/packages/apps/Settings/res/values/bools.xml
- smarc_mx8m/overlay/packages/apps/Settings/res/values/config.xml
- smarc_mx8m/overlay/packages/apps/Settings/res/values/strings.xml
- smarc_mx8m/required_hardware.xml
- smarc_mx8m/seccomp/mediacodec-seccomp.policy
- smarc_mx8m/seccomp/mediaextractor-seccomp.policy
- smarc_mx8m/sepolicy/file_contexts
- smarc_mx8m/sepolicy_drm/mediadrmserver.te
- smarc_mx8m/sepolicy_drm/netd.te
- smarc_mx8m/sepolicy_drm/shell.te
- smarc_mx8m/sepolicy_drm/tee.te
- smarc_mx8m/ueventd.freescale.rc
.gitignore
NOTICE
... | ... | @@ -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
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 \ |
imx8/etc/ota.conf
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" |
imx8/smarc_mx8m.mk
... | ... | @@ -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 |
imx8/vendorsetup.sh
scripts/install.sh
... | ... | @@ -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
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 | |