g12: Inherit from basic amlogic/common tree
authorNolen Johnson <johnsonnolen@gmail.com>
Tue, 7 Jun 2022 21:23:12 +0000 (17:23 -0400)
committerBruno Martins <bgcngm@gmail.com>
Sat, 11 Jun 2022 21:43:25 +0000 (22:43 +0100)
Change-Id: I7b2610c854d264f492e9c67097f7208c23b6db35

18 files changed:
BoardConfigCommon.mk
build/tasks/2ndbootloader.mk [deleted file]
g12.mk
lineage.dependencies
logo/Android.mk [deleted file]
logo/bootup.bmp [deleted file]
logo/upgrade_bar.bmp [deleted file]
logo/upgrade_error.bmp [deleted file]
logo/upgrade_fail.bmp [deleted file]
logo/upgrade_logo.bmp [deleted file]
logo/upgrade_success.bmp [deleted file]
logo/upgrade_unfocus.bmp [deleted file]
logo/upgrade_upgrading.bmp [deleted file]
nrdp/nrdp.xml [deleted file]
nrdp/nrdp_audio_platform_capabilities.json [deleted file]
nrdp/nrdp_audio_platform_capabilities_ms12.json [deleted file]
nrdp/nrdp_platform_capabilities.json [deleted file]
vendor.prop

index 3367c4740c9bda7e47c61dddf218932fa05c0796..3ba919e213f79ba1b8347422d790a1d48e7dcfb2 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2021 The LineageOS Project
+# Copyright (C) 2021-2022 The LineageOS Project
 #
 # SPDX-License-Identifier: Apache-2.0
 #
@@ -18,15 +18,6 @@ BOARD_AVB_RECOVERY_ROLLBACK_INDEX_LOCATION := 2
 BOARD_AVB_ROLLBACK_INDEX := 0
 BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 3
 
-## Architecture
-TARGET_ARCH := arm
-TARGET_ARCH_VARIANT := armv8-a
-TARGET_CPU_ABI := armeabi-v7a
-TARGET_CPU_ABI2 := armeabi
-TARGET_CPU_VARIANT := generic
-TARGET_CPU_VARIANT_RUNTIME := cortex-a53
-TARGET_KERNEL_ARCH := arm64
-
 ## Audio
 BOARD_USES_ALSA_AUDIO := true
 USE_CUSTOM_AUDIO_POLICY := 1
@@ -113,17 +104,11 @@ BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := ext4
 BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
 TARGET_USERIMAGES_USE_EXT4 := true
 
-## Platform
-TARGET_BOARD_PLATFORM := amlogic
-
 ## Properties
 TARGET_PRODUCT_PROP += $(COMMON_PATH)/product.prop
 TARGET_SYSTEM_PROP += $(COMMON_PATH)/system.prop
 TARGET_VENDOR_PROP += $(COMMON_PATH)/vendor.prop
 
-## SELinux
-include device/amlogic/sepolicy/sepolicy.mk
-
 ## Recovery
 TARGET_RECOVERY_FSTAB := $(COMMON_PATH)/init-files/fstab.amlogic
 TARGET_RECOVERY_PIXEL_FORMAT := "BGRA_8888"
@@ -139,3 +124,6 @@ BOARD_HOSTAPD_DRIVER := NL80211
 BOARD_WPA_SUPPLICANT_DRIVER := NL80211
 WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true
 WPA_SUPPLICANT_VERSION := VER_0_8_X
+
+## Include the main common tree BoardConfig makefile
+include device/amlogic/common/BoardConfigAmlogic.mk
diff --git a/build/tasks/2ndbootloader.mk b/build/tasks/2ndbootloader.mk
deleted file mode 100644 (file)
index 680c132..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-#
-# Copyright (C) 2021 The LineageOS Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-ifneq ($(filter g12a g12b sm1, $(TARGET_AMLOGIC_SOC)),)
-
-MKDTBOIMG := $(HOST_OUT_EXECUTABLES)/mkdtboimg.py
-DTBTARGET := $(PRODUCT_OUT)/dtb.img
-DTBTOOL := $(HOST_OUT_EXECUTABLES)/dtbToolAmlogic$(HOST_EXECUTABLE_SUFFIX)
-DTBTMP := $(PRODUCT_OUT)/tmp_dt
-DTBDIR := $(PRODUCT_OUT)/obj/KERNEL_OBJ/arch/arm64/boot/dts/amlogic
-DTCDIR := $(PRODUCT_OUT)/obj/KERNEL_OBJ/scripts/dtc/
-TARGET_FLASH_DTB_PARTITION ?= true
-
-TARGET_DTBO_NAME ?= android_p_overlay_dt
-
-define aml-compress-dtb
-       if [ -n "$(shell find $(1) -size +200k)" ]; then \
-               echo "$(1) > 200k will be gziped"; \
-               mv $(1) $(1).orig; \
-               $(MINIGZIP) -c $(1).orig > $(1); \
-       fi;
-endef
-
-$(INSTALLED_2NDBOOTLOADER_TARGET): $(INSTALLED_KERNEL_TARGET) $(DTBTOOL) | $(ACP) $(MINIGZIP)
-ifeq ($(words $(TARGET_DTB_NAME)),1)
-       $(hide) $(ACP) $(DTBDIR)/$(TARGET_DTB_NAME).dtb $(DTBTARGET)
-else
-       $(hide) mkdir -p $(DTBTMP)
-       $(foreach aDts, $(TARGET_DTB_NAME), \
-               $(ACP) $(DTBDIR)/$(strip $(aDts)).dtb $(DTBTMP)/$(strip $(aDts)).dtb; \
-       )
-       $(hide) $(DTBTOOL) -o $(DTBTARGET) -p $(DTCDIR) $(DTBTMP)
-       $(hide) rm -rf $(DTBTMP)
-endif
-       $(hide) $(call aml-compress-dtb, $(DTBTARGET))
-       $(hide) $(ACP) $(DTBTARGET) $@
-
-$(BOARD_PREBUILT_DTBOIMAGE): $(INSTALLED_KERNEL_TARGET) $(MKDTBOIMG)
-       $(MKDTBOIMG) create $@ $(foreach dtbo, $(TARGET_DTBO_NAME), \
-               $(DTBDIR)/$(strip $(dtbo)).dtb \
-       )
-
-$(DTBTARGET): $(INSTALLED_2NDBOOTLOADER_TARGET)
-
-ifeq ($(TARGET_FLASH_DTB_PARTITION),true)
-INSTALLED_RADIOIMAGE_TARGET += $(DTBTARGET)
-endif
-
-.PHONY: dtbotest
-dtbotest: $(BOARD_PREBUILT_DTBOIMAGE)
-
-endif
diff --git a/g12.mk b/g12.mk
index 4d3373bc8a3fd8aa9d82d0c59ba018291d8f7e01..f25c592c3419dfe749174f781d1a1caa25ccf58f 100644 (file)
--- a/g12.mk
+++ b/g12.mk
@@ -6,9 +6,6 @@
 
 $(call inherit-product, vendor/amlogic/g12-common/g12-common-vendor.mk)
 
-## AAPT
-PRODUCT_AAPT_PREF_CONFIG := tvdpi
-
 ## Audio
 PRODUCT_COPY_FILES += \
     $(LOCAL_PATH)/audio/a2dp_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration.xml \
@@ -62,9 +59,6 @@ PRODUCT_PACKAGES += \
     camera.device@3.4-impl \
     camera.device@3.5-impl
 
-## Characteristics
-PRODUCT_CHARACTERISTICS := tv
-
 ## Codecs
 PRODUCT_COPY_FILES += \
     $(LOCAL_PATH)/media/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles.xml \
@@ -159,22 +153,11 @@ PRODUCT_PACKAGES += \
     android.hardware.light@2.0-impl \
     android.hardware.light@2.0-service
 
-## Logo
-PRODUCT_HOST_PACKAGES += \
-    res_packer
-
 ## Memtrack
 PRODUCT_PACKAGES += \
     android.hardware.memtrack@1.0-impl \
     android.hardware.memtrack@1.0-service
 
-## NRDP (Netflix)
-PRODUCT_COPY_FILES +=  \
-    $(LOCAL_PATH)/nrdp/nrdp.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/nrdp.xml \
-    $(LOCAL_PATH)/nrdp/nrdp_audio_platform_capabilities.json:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/nrdp_audio_platform_capabilities.json \
-    $(LOCAL_PATH)/nrdp/nrdp_audio_platform_capabilities_ms12.json:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/nrdp_audio_platform_capabilities_ms12.json \
-    $(LOCAL_PATH)/nrdp/nrdp_platform_capabilities.json:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/nrdp_platform_capabilities.json
-
 ## Overlays
 DEVICE_PACKAGE_OVERLAYS += \
     $(LOCAL_PATH)/overlay
@@ -243,3 +226,6 @@ PRODUCT_PACKAGES += \
     WifiOverlay \
     wpa_supplicant \
     wpa_supplicant.conf
+
+## Inherit from the main common tree product makefile
+$(call inherit-product, device/amlogic/common/amlogic.mk)
index 98f8465439f4d9d23dc2721ba3d5317dfa80663f..64edb06adafe2b00289783c7e6c3c3970e7cf63b 100644 (file)
@@ -1,11 +1,7 @@
 [
   {
-    "repository": "android_device_amlogic_sepolicy",
-    "target_path": "device/amlogic/sepolicy"
-  },
-  {
-    "repository": "android_kernel_amlogic_linux-4.9",
-    "target_path": "kernel/amlogic/linux-4.9"
+    "repository": "android_device_amlogic_common",
+    "target_path": "device/amlogic/common"
   },
   {
     "repository": "android_hardware_amlogic_kernel-modules_mali-driver",
     "target_path": "hardware/amlogic/kernel-modules/optee"
   },
   {
-    "repository": "android_hardware_amlogic_tools_dtbtool",
-    "target_path": "hardware/amlogic/tools/dtbtool"
-  },
-  {
-    "repository": "android_hardware_amlogic_tools_imagepacker",
-    "target_path": "hardware/amlogic/tools/imagepacker"
-  },
-  {
-    "repository": "android_hardware_amlogic_tools_respacker",
-    "target_path": "hardware/amlogic/tools/respacker"
+    "repository": "android_kernel_amlogic_linux-4.9",
+    "target_path": "kernel/amlogic/linux-4.9"
   }
 ]
diff --git a/logo/Android.mk b/logo/Android.mk
deleted file mode 100644 (file)
index f2ebdce..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# Copyright (C) 2021 The LineageOS Project
-#
-# SPDX-License-Identifier: Apache-2.0
-#
-
-include $(CLEAR_VARS)
-
-LOGO_FILES := device/amlogic/g12-common/logo
-
-IMGPACK := $(HOST_OUT_EXECUTABLES)/res_packer$(HOST_EXECUTABLE_SUFFIX)
-
-INSTALLED_LOGOIMAGE_TARGET := $(PRODUCT_OUT)/logo.img
-$(INSTALLED_LOGOIMAGE_TARGET): $(LOCAL_INSTALLED_MODULE) | $(IMGPACK) $(MINIGZIP) $(ACP)
-       @echo "generate $(INSTALLED_LOGOIMAGE_TARGET) $(LOGO_FILES)"
-       $(hide) mkdir -p $(PRODUCT_OUT)/logo
-       $(foreach bmpf, $(filter %.bmp, $(wildcard $(LOGO_FILES)/*)), \
-               if [ -n "$(shell find $(bmpf) -type f -size +256k)" ]; then \
-                       echo "logo pic $(bmpf) >256k gziped"; \
-                       $(MINIGZIP) -c $(bmpf) > $(PRODUCT_OUT)/logo/$(notdir $(bmpf)); \
-               else \
-                       $(ACP) $(bmpf) $(PRODUCT_OUT)/logo; \
-               fi;)
-       $(hide) $(IMGPACK) -r $(PRODUCT_OUT)/logo $(INSTALLED_LOGOIMAGE_TARGET)
-       $(hide) rm -rf $(PRODUCT_OUT)/logo
-
-ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_LOGOIMAGE_TARGET)
-ALL_MODULES.$(LOCAL_MODULE).INSTALLED += $(INSTALLED_LOGOIMAGE_TARGET)
-
-INSTALLED_RADIOIMAGE_TARGET += $(INSTALLED_LOGOIMAGE_TARGET)
-
-.PHONY: logoimage
-logoimage: $(INSTALLED_LOGOIMAGE_TARGET)
diff --git a/logo/bootup.bmp b/logo/bootup.bmp
deleted file mode 100644 (file)
index 381eff3..0000000
Binary files a/logo/bootup.bmp and /dev/null differ
diff --git a/logo/upgrade_bar.bmp b/logo/upgrade_bar.bmp
deleted file mode 100644 (file)
index 01dff4c..0000000
Binary files a/logo/upgrade_bar.bmp and /dev/null differ
diff --git a/logo/upgrade_error.bmp b/logo/upgrade_error.bmp
deleted file mode 100644 (file)
index 643d7d7..0000000
Binary files a/logo/upgrade_error.bmp and /dev/null differ
diff --git a/logo/upgrade_fail.bmp b/logo/upgrade_fail.bmp
deleted file mode 100644 (file)
index ce6fd3a..0000000
Binary files a/logo/upgrade_fail.bmp and /dev/null differ
diff --git a/logo/upgrade_logo.bmp b/logo/upgrade_logo.bmp
deleted file mode 100644 (file)
index 1ef4d17..0000000
Binary files a/logo/upgrade_logo.bmp and /dev/null differ
diff --git a/logo/upgrade_success.bmp b/logo/upgrade_success.bmp
deleted file mode 100644 (file)
index e93d05a..0000000
Binary files a/logo/upgrade_success.bmp and /dev/null differ
diff --git a/logo/upgrade_unfocus.bmp b/logo/upgrade_unfocus.bmp
deleted file mode 100644 (file)
index bf28252..0000000
Binary files a/logo/upgrade_unfocus.bmp and /dev/null differ
diff --git a/logo/upgrade_upgrading.bmp b/logo/upgrade_upgrading.bmp
deleted file mode 100644 (file)
index fa229dc..0000000
Binary files a/logo/upgrade_upgrading.bmp and /dev/null differ
diff --git a/nrdp/nrdp.xml b/nrdp/nrdp.xml
deleted file mode 100644 (file)
index b99ada7..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<permissions>
-   <feature name="nrdp.modelgroup" />
-</permissions>
diff --git a/nrdp/nrdp_audio_platform_capabilities.json b/nrdp/nrdp_audio_platform_capabilities.json
deleted file mode 100644 (file)
index 20b28ce..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-  "audiocaps": {
-    "continuousAudio": false,
-    "aaudio":true,
-    "uiAudioBufferDelayOffset":80,
-    "pcm": {
-      "mixing": true,
-      "transition": ease
-    },
-    "ddplus": {
-      "mixing": false,
-      "transition": mute
-    },
-    "atmos": {
-      "enabled": false,
-      "mixing": false,
-      "transition": mute
-    }
-  }
-}
diff --git a/nrdp/nrdp_audio_platform_capabilities_ms12.json b/nrdp/nrdp_audio_platform_capabilities_ms12.json
deleted file mode 100644 (file)
index 1412e6e..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-  "audiocaps": {
-    "continuousAudio": true,
-    "aaudio":true,
-    "uiAudioBufferDelayOffset":130,
-    "pcm": {
-      "mixing": true,
-      "transition": ease
-    },
-    "ddplus": {
-      "mixing": true,
-      "transition": ease
-    },
-    "atmos": {
-      "enabled": true,
-      "mixing": true,
-      "transition": ease
-    }
-  }
-}
diff --git a/nrdp/nrdp_platform_capabilities.json b/nrdp/nrdp_platform_capabilities.json
deleted file mode 100644 (file)
index 4dcd5b3..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-{
-  "vp9Disabled": "false",
-  "hdrOutputType": "always"
-}
index d9b199329a6ad5510befafe37c11828c5066257d..03bb4e0dd5db44bc57ba7c271056a3804b300fcd 100644 (file)
@@ -73,9 +73,6 @@ vendor.media.libplayer.curlenable=true
 vendor.media.libplayer.seek.fwdsearch=1
 vendor.media.libplayer.modules=vhls_mod,dash_mod,curl_mod,prhls_mod,vm_mod,bluray_mod
 
-## NRDP
-ro.vendor.nrdp.validation=ninja_7
-
 ## OMX
 ro.vendor.media.support.omx2=true
 vendor.media.omx2.in_buffer=5
@@ -88,12 +85,6 @@ vendor.media.sf.omxvideo-optmize=1
 ## OEM Lock
 ro.oem_unlock_supported=1
 
-## Platform
-ro.vendor.platform.is.tv=0
-
-## SOC
-ro.soc.manufacturer=Amlogic
-
 ## USB
 vendor.usb.controller=ff400000.dwc2_a