Quellcode durchsuchen

Add support for AOSP master

Change-Id: I3f35b8647e706c68792621b3cd5fafc172ae8780
Mao Han vor 1 Jahr
Ursprung
Commit
ffd7abc818

+ 3 - 0
.gitignore

@@ -0,0 +1,3 @@
+evb_light/
+lichee_pi_4a/
+light_b/

+ 13 - 16
BoardConfigCommon.mk

@@ -14,27 +14,24 @@
 # limitations under the License.
 #
 
+-include device/thead/common/os_version.mk
+
 TARGET_ARCH := riscv64
 TARGET_CPU_ABI := riscv64
-TARGET_CPU_ABI2 :=
+
+ifeq ($(BUILD_AOSP_MASTER), true)
+TARGET_ARCH_VARIANT :=
+TARGET_CPU_VARIANT := generic
+
+else
 TARGET_ARCH_VARIANT := riscv64-xtheadc
 TARGET_CPU_VARIANT := c910
 TARGET_CPU_VARIANT_RUNTIME := c910
-# TARGET_ARCH_VARIANT := riscv64
-# TARGET_CPU_VARIANT := riscv64
-# TARGET_CPU_VARIANT_RUNTIME := riscv64
+endif
 
 TARGET_USERIMAGES_USE_EXT4 := true
-# FIXME: there are have 2ND arch, may riscv32, skip here
-#TARGET_2ND_ARCH := riscv64
-#TARGET_2ND_ARCH_VARIANT := riscv64
-#TARGET_2ND_CPU_ABI := lp64d
-#TARGET_2ND_CPU_ABI2 := riscv64
-#TARGET_2ND_CPU_VARIANT := generic
-
 BOARD_VNDK_VERSION := current
 
-
 BOARD_BOOTCONFIG += androidboot.console=ttyS0
 BOARD_BOOTCONFIG += androidboot.bootreason=cold,powerkey
 BOARD_BOOTCONFIG += androidboot.usb_mode=2
@@ -66,9 +63,9 @@ WITH_DEXPREOPT := true
 
 #AB, no retrofit
 BOARD_SUPER_PARTITION_SIZE := 4294967296 # 4GB
-BOARD_SUPER_PARTITION_GROUPS := light_dynamic_partitions
-BOARD_LIGHT_DYNAMIC_PARTITIONS_PARTITION_LIST := system vendor system_ext product
-BOARD_LIGHT_DYNAMIC_PARTITIONS_SIZE := 2143289344 # 4GB/2 - 4M
+BOARD_SUPER_PARTITION_GROUPS := th1520_dynamic_partitions
+BOARD_TH1520_DYNAMIC_PARTITIONS_PARTITION_LIST := system vendor system_ext product
+BOARD_TH1520_DYNAMIC_PARTITIONS_SIZE := 2143289344 # 4GB/2 - 4M
 BOARD_SUPER_PARTITION_METADATA_DEVICE := super
 BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT := true
 BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE := true
@@ -79,5 +76,5 @@ BOARD_USES_METADATA_PARTITION := true
 # FIXME remove prebuilts/vndk/31, it conflicts with packages/modules/vndk
 BUILD_BROKEN_DUP_RULES := true
 
-BOARD_SEPOLICY_DIRS += device/thead/light/sepolicy/vendor
+BOARD_SEPOLICY_DIRS += device/thead/th1520/sepolicy/vendor
 BOARD_ROOT_EXTRA_SYMLINKS += /vendor/firmware:/lib/firmware

+ 1 - 1
build/tasks/dtbimages.mk

@@ -5,7 +5,7 @@
 # dtbo.img, and the resulting $(PRODUCT_OUT)/dtbo.img will be created with
 # Android build system, by exploiting BOARD_PREBUILT_DTBOIMAGE variable.
 
-ifneq ($(filter evb_light light_b, $(TARGET_DEVICE)),)
+ifneq ($(filter evb_light lichee_pi_4a light_b , $(TARGET_DEVICE)),)
 
 PRODUCT_OUT ?= out/target/product/evb_light
 KERNEL_OUT ?= $(PRODUCT_OUT)/obj/KERNEL_OBJ

+ 1 - 11
manifest.xml

@@ -1,5 +1,4 @@
-<manifest version="1.0" type="device" target-level="3">
-    <kernel target-level="6"/>
+<manifest version="1.0" type="device" target-level="4">
     <hal format="hidl">
         <name>android.hardware.audio</name>
         <transport>hwbinder</transport>
@@ -86,15 +85,6 @@
             <instance>default</instance>
         </interface>
     </hal>
-    <hal format="hidl">
-        <name>android.hardware.health</name>
-        <transport>hwbinder</transport>
-        <version>2.0</version>
-        <interface>
-            <name>IHealth</name>
-            <instance>default</instance>
-        </interface>
-    </hal>
     <hal format="hidl">
         <name>android.hardware.drm</name>
         <transport>hwbinder</transport>

+ 12 - 3
sepolicy/vendor/file_contexts

@@ -12,6 +12,15 @@
 /dev/dri/card1          u:object_r:gpu_device:s0
 /dev/dri/renderD128     u:object_r:gpu_device:s0
 
+#soft gpu
+/vendor/lib64/hw/gralloc\.arv\.so          u:object_r:same_process_hal_file:s0
+/vendor/lib64/dri/libgallium_dri\.so       u:object_r:same_process_hal_file:s0
+/vendor/lib64/libdrm\.so                   u:object_r:same_process_hal_file:s0
+/vendor/lib64/libglapi\.so                 u:object_r:same_process_hal_file:s0
+/vendor/lib64/egl/libEGL_mesa\.so          u:object_r:same_process_hal_file:s0
+/vendor/lib64/egl/libGLESv1_CM_mesa\.so    u:object_r:same_process_hal_file:s0
+/vendor/lib64/egl/libGLESv2_mesa\.so       u:object_r:same_process_hal_file:s0
+
 # video dev files
 /dev/vidmem u:object_r:video_device:s0
 /dev/bm_csi[0-9]  u:object_r:video_device:s0
@@ -56,11 +65,11 @@
 /(vendor|system/vendor)/bin/hw/android\.hardware\.camera\.provider(@2\.[0-9]+|-V1)-service-thead          u:object_r:hal_camera_default_exec:s0
 /(vendor|system/vendor)/bin/hw/android\.hardware\.camera\.provider(@2\.[0-9]+|-V1)-service-thead-lazy_64  u:object_r:hal_camera_default_exec:s0
 /(vendor|system/vendor)/bin/hw/android\.hardware\.camera\.provider(@2\.[0-9]+|-V1)-service-thead-lazy     u:object_r:hal_camera_default_exec:s0
-/vendor/bin/hw/android\.hardware\.dumpstate@1\.[01]-service\.light u:object_r:hal_dumpstate_impl_exec:s0
-/vendor/bin/hw/android\.hardware\.atrace@1\.0-service\.light u:object_r:hal_atrace_default_exec:s0
+/vendor/bin/hw/android\.hardware\.dumpstate@1\.[01]-service\.th1520 u:object_r:hal_dumpstate_impl_exec:s0
+/vendor/bin/hw/android\.hardware\.atrace@1\.0-service\.th1520 u:object_r:hal_atrace_default_exec:s0
 /vendor/bin/hw/android\.hardware\.authsecret@1\.0-service  u:object_r:hal_authsecret_default_exec:s0
 /vendor/bin/hw/android\.hardware\.authsecret-service.example u:object_r:hal_authsecret_default_exec:s0
 /vendor/bin/hw/android\.hardware\.input\.classifier@1\.0-service.default  u:object_r:hal_input_classifier_default_exec:s0
 /vendor/bin/hw/android\.hardware\.rebootescrow-service\.default        u:object_r:hal_rebootescrow_default_exec:s0
 
-/vendor/bin/hw/android\.hardware\.oemlock-service.light u:object_r:hal_oemlock_default_exec:s0
+/vendor/bin/hw/android\.hardware\.oemlock-service.th1520 u:object_r:hal_oemlock_default_exec:s0

+ 2 - 2
subdevs/audio/audio.mk

@@ -12,11 +12,11 @@ PRODUCT_PACKAGES += \
 # Default audio primary. Odm can set ro.hardware.audio=xxx and
 # install  audio.primary.xxx to odm/lib64/hw
 PRODUCT_PACKAGES += \
-    audio.primary.light \
+    audio.primary.th1520 \
 
 # Default audio config files. ODM can install their config files to odm/etc
 PRODUCT_COPY_FILES += \
-    device/thead/light/subdevs/audio/audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
+    device/thead/th1520/subdevs/audio/audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
     frameworks/av/services/audiopolicy/config/a2dp_in_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_in_audio_policy_configuration_7_0.xml \
     frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml \
     frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \

+ 1 - 1
subdevs/camera/camera.mk

@@ -6,6 +6,6 @@ PRODUCT_PACKAGES += \
 
 # odm must make their media_profiles_V1_0.xml to odm/etc
 PRODUCT_COPY_FILES += \
-    device/thead/light/subdevs/camera/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml \
+    device/thead/th1520/subdevs/camera/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml \
     frameworks/native/data/etc/android.hardware.camera.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.xml \
     frameworks/native/data/etc/android.hardware.camera.front.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.front.xml

+ 4 - 4
subdevs/graphics/graphics.mk

@@ -16,7 +16,7 @@ PRODUCT_PACKAGES += \
 
 # FIXME use harware memtrack
 PRODUCT_PACKAGES += \
-    memtrack.light \
+    memtrack.th1520 \
     android.hardware.memtrack@1.0-service \
     android.hardware.memtrack@1.0-impl
 
@@ -48,9 +48,9 @@ PRODUCT_PACKAGES += \
     libEGL_powervr \
     libGLESv1_CM_powervr \
     libGLESv2_powervr \
-    hwcomposer.light \
-    gralloc.light \
-    vulkan.light \
+    hwcomposer.th1520 \
+    gralloc.th1520 \
+    vulkan.th1520 \
     libIMGegl \
     libPVROCL \
     libPVRScopeServices \

+ 1 - 1
subdevs/performance/performance.mk

@@ -1,6 +1,6 @@
 
 PRODUCT_PACKAGES += \
-    android.hardware.health@2.1-impl-thead \
+    android.hardware.health@2.1-impl \
     android.hardware.health@2.1-service
 
 # Storage health HAL

+ 16 - 14
light-common.mk → th1520-common.mk

@@ -1,23 +1,26 @@
-TARGET_BOARD_PLATFORM := light
+-include device/thead/common/os_version.mk
+
+TARGET_BOARD_PLATFORM := th1520
 PRODUCT_USE_DYNAMIC_PARTITIONS := true
 
-include device/thead/light/subdevs/boot/boot.mk
-include device/thead/light/subdevs/graphics/graphics.mk
-include device/thead/light/subdevs/nna/nna.mk
-include device/thead/light/subdevs/security/security.mk
-include device/thead/light/subdevs/updater/updater.mk
-include device/thead/light/subdevs/performance/performance.mk
-include device/thead/light/subdevs/audio/audio.mk
-include device/thead/light/subdevs/camera/camera.mk
-include device/thead/light/subdevs/media/media.mk
-include device/thead/light/subdevs/connectivity/connectivity.mk
+include device/thead/th1520/subdevs/boot/boot.mk
+
+include device/thead/th1520/subdevs/graphics/graphics.mk
+include device/thead/th1520/subdevs/nna/nna.mk
+include device/thead/th1520/subdevs/security/security.mk
+include device/thead/th1520/subdevs/updater/updater.mk
+include device/thead/th1520/subdevs/performance/performance.mk
+include device/thead/th1520/subdevs/audio/audio.mk
+include device/thead/th1520/subdevs/camera/camera.mk
+include device/thead/th1520/subdevs/media/media.mk
+include device/thead/th1520/subdevs/connectivity/connectivity.mk
 
 PRODUCT_SHIPPING_API_LEVEL := 31
 
 # FIXME API_LEVEL 32 required manifest fcm verison ge 6
 # but now is 3
 DEVICE_MANIFEST_FILE += \
-    device/thead/light/manifest.xml
+    device/thead/th1520/manifest.xml
 
 PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS := false
 
@@ -40,7 +43,6 @@ PRODUCT_PACKAGES += \
     modetest
 endif
 
-KERNEL_MODULE_DIR := device/thead/light-kernel
+KERNEL_MODULE_DIR := device/thead/th1520-kernel
 BOARD_VENDOR_KERNEL_MODULES := $(wildcard $(KERNEL_MODULE_DIR)/*.ko)
 
-