a52q: De-commonize A52 specific configs and files

Change-Id: Ie7c1a0b49c200a72449fe05e9b4a51f0f3abf005
fourteen
Simon1511 3 years ago
parent 19dd38dae3
commit 467fffc268
  1. 3
      BoardConfig.mk
  2. 4080
      configs/audio/mixer_paths.xml
  3. 11
      device.mk
  4. 63
      extract-files.sh
  5. 43
      overlay/frameworks/base/core/res/res/values/config.xml
  6. 84
      proprietary-files.txt
  7. 11
      rootdir/Android.mk
  8. 105
      rootdir/etc/init.a52q.rc
  9. 44
      setup-makefiles.sh

@ -22,5 +22,8 @@ include device/samsung/sm7125-common/BoardConfigCommon.mk
TARGET_KERNEL_CONFIG := vendor/lineage-a52q_defconfig
BOARD_NAME := SRPTH31C002
# Display
TARGET_SCREEN_DENSITY := 420
# OTA assert
TARGET_OTA_ASSERT_DEVICE := a52q

File diff suppressed because it is too large Load Diff

@ -20,3 +20,14 @@ DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay
# call the common setup
$(call inherit-product, device/samsung/sm7125-common/common.mk)
# call the proprietary setup
$(call inherit-product, vendor/samsung/a52q/a52q-vendor.mk)
# Init files
PRODUCT_PACKAGES += \
init.a52q.rc
# Audio
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/audio/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml

@ -0,0 +1,63 @@
#!/bin/bash
#
# Copyright (C) 2018-2020 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
set -e
DEVICE_COMMON=a52q
VENDOR=samsung
# Load extractutils and do some sanity checks
MY_DIR="${BASH_SOURCE%/*}"
if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi
ANDROID_ROOT="${MY_DIR}/../../.."
HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
if [ ! -f "${HELPER}" ]; then
echo "Unable to find helper script at ${HELPER}"
exit 1
fi
source "${HELPER}"
# Default to sanitizing the vendor folder before extraction
CLEAN_VENDOR=true
KANG=
SECTION=
while [ "${#}" -gt 0 ]; do
case "${1}" in
-n | --no-cleanup )
CLEAN_VENDOR=false
;;
-k | --kang )
KANG="--kang"
;;
-s | --section )
SECTION="${2}"; shift
CLEAN_VENDOR=false
;;
* )
SRC="${1}"
;;
esac
shift
done
if [ -z "${SRC}" ]; then
SRC="adb"
fi
# Initialize the helper
setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${ANDROID_ROOT}" true "${CLEAN_VENDOR}"
extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}"
# Fix proprietary blobs
BLOB_ROOT="$ANDROID_ROOT"/vendor/"$VENDOR"/"$DEVICE_COMMON"/proprietary
"${MY_DIR}/setup-makefiles.sh"

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2021, The Android Open Source 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.
*/
-->
<resources>
<!-- The bounding path of the cutout region of the main built-in display.
Must either be empty if there is no cutout region, or a string that is parsable by
{@link android.util.PathParser}.
The path is assumed to be specified in display coordinates with pixel units and in
the display's native orientation, with the origin of the coordinate system at the
center top of the display. Optionally, you can append either `@left` or `@right` to the
end of the path string, in order to change the path origin to either the top left,
or top right of the display.
To facilitate writing device-independent emulation overlays, the marker `@dp` can be
appended after the path string to interpret coordinates in dp instead of px units.
Note that a physical cutout should be configured in pixels for the best results.
Example for a 10px x 10px square top-center cutout:
<string ...>M -5,0 L -5,10 L 5,10 L 5,0 Z</string>
Example for a 10dp x 10dp square top-center cutout:
<string ...>M -5,0 L -5,10 L 5,10 L 5,0 Z @dp</string>
@see https://www.w3.org/TR/SVG/paths.html#PathData
-->
<string translatable="false" name="config_mainBuiltInDisplayCutout">M 0,0 M 0,12.25101276465640 a 10.60613009248640,10.60613009248640 0 1,0 0,21.21226018497290 a 10.60613009248640,10.60613009248640 0 1,0 0,-21.21226018497290 Z @dp</string>
</resources>

@ -0,0 +1,84 @@
# All blobs are from A525FXXU4AUJ2, unless pinned
# ACDB
vendor/etc/audconf/ODM/Global_cal.acdb
vendor/etc/audconf/ODM/Bluetooth_cal.acdb
vendor/etc/audconf/ODM/Headset_cal.acdb
vendor/etc/audconf/ODM/General_cal.acdb
vendor/etc/audconf/ODM/workspaceFile.qwsp
vendor/etc/audconf/ODM/Speaker_cal.acdb
vendor/etc/audconf/ODM/Hdmi_cal.acdb
vendor/etc/audconf/ODM/Handset_cal.acdb
vendor/etc/audconf/OPEN/Global_cal.acdb
vendor/etc/audconf/OPEN/Bluetooth_cal.acdb
vendor/etc/audconf/OPEN/Headset_cal.acdb
vendor/etc/audconf/OPEN/General_cal.acdb
vendor/etc/audconf/OPEN/workspaceFile.qwsp
vendor/etc/audconf/OPEN/Speaker_cal.acdb
vendor/etc/audconf/OPEN/Hdmi_cal.acdb
vendor/etc/audconf/OPEN/Handset_cal.acdb
# ADSP modules
vendor/lib/libsnpe_dsp_domains_v2.so
vendor/lib/libSNPE.so
vendor/lib/libsnpe_wrapper.so
# Bluetooth
vendor/firmware/apbtfw11.tlv
vendor/firmware/crbtfw21.tlv
# Camera
vendor/lib/camera/components/com.samsung.node.smooth_transition.so
vendor/lib64/camera/components/com.samsung.node.smooth_transition.so
vendor/lib/camera/components/com.samsung.node.uniplugin_recording.so
vendor/lib/camera/components/com.samsung.node.uniplugin_vdis.so
vendor/lib/camera/components/com.wrapper.stats.aec.so
vendor/lib64/camera/components/com.wrapper.stats.aec.so
vendor/lib/camera/com.qti.eeprom.sec2qcconversion.so
vendor/lib/camera/com.samsung.sensor.gc5035.so
vendor/lib64/camera/com.samsung.sensor.gc5035.so
vendor/lib/camera/com.samsung.sensormodule.0_0_sony_imx682.bin
vendor/lib64/camera/com.samsung.sensormodule.0_0_sony_imx682.bin
vendor/lib/camera/com.samsung.sensormodule.0_1_lsi_s5kgw1p_otp.bin
vendor/lib64/camera/com.samsung.sensormodule.0_1_lsi_s5kgw1p_otp.bin
vendor/lib/camera/com.samsung.sensormodule.3_lsi_gc5035.bin
vendor/lib64/camera/com.samsung.sensormodule.3_lsi_gc5035.bin
vendor/lib/camera/com.samsung.sensormodule.4_0_lsi_gc5035_macro.bin
vendor/lib64/camera/com.samsung.sensormodule.4_0_lsi_gc5035_macro.bin
vendor/lib/camera/com.samsung.sensormodule.4_1_lsi_dv_gc5035_macro_hw_2.bin
vendor/lib64/camera/com.samsung.sensormodule.4_1_lsi_dv_gc5035_macro_hw_2.bin
vendor/lib/camera/com.samsung.tuned.hynix_hi1336.bin
vendor/lib64/camera/com.samsung.tuned.hynix_hi1336.bin
vendor/lib/camera/com.samsung.tuned.lsi_gc5035.bin
vendor/lib64/camera/com.samsung.tuned.lsi_gc5035.bin
vendor/lib/camera/com.samsung.tuned.lsi_s5k3l6.bin
vendor/lib64/camera/com.samsung.tuned.lsi_s5k3l6.bin
vendor/lib/camera/com.samsung.tuned.lsi_s5kgw1p.bin
vendor/lib64/camera/com.samsung.tuned.lsi_s5kgw1p.bin
vendor/lib/camera/com.samsung.tuned.sony_imx682.bin
vendor/lib64/camera/com.samsung.tuned.sony_imx682.bin
vendor/lib/camera/ois_mcu_stm32g_fw.bin
vendor/lib/camera/uw_dual_calibration.bin
vendor/lib/hw/com.samsung.chi.override.so
vendor/lib64/hw/com.samsung.chi.override.so
vendor/lib/libsec2qc_conversion.so
vendor/lib64/libsec2qc_conversion.so
vendor/lib/libface_landmark.arcsoft.so
vendor/lib64/libface_landmark.arcsoft.so
vendor/lib/libvdis_interface.so
vendor/lib64/libvdis_interface.so
# Fingerprint
vendor/lib/libgf_in_system_lib.so
vendor/lib64/libgf_in_system_lib.so
# Graphics
vendor/etc/qdcm_calib_data_ss_dsi_panel_S6E3FC3_AMS646YD04_FHD.xml
# Neuralnetworks
vendor/lib/libhta.so
# Sensors
vendor/etc/sensors/config/atoll_qrd_ak991x_0.json
vendor/etc/sensors/config/atoll_qrd_ak991x_2.json
vendor/etc/sensors/config/atoll_qrd_ak991x_6.json

@ -0,0 +1,11 @@
LOCAL_PATH := $(call my-dir)
# Init files
include $(CLEAR_VARS)
LOCAL_MODULE := init.a52q.rc
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := etc/init.a52q.rc
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
include $(BUILD_PREBUILT)

@ -0,0 +1,105 @@
# Copyright (c) 2013-2018,2020, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#
on init
# setup cgroup freezer for freecess
mkdir /dev/freezer
mount cgroup none /dev/freezer freezer
mkdir /dev/freezer/frozen
mkdir /dev/freezer/thaw
write /dev/freezer/frozen/freezer.state FROZEN
write /dev/freezer/thaw/freezer.state THAWED
# MARs for freecess
chown system system /dev/freezer
chown system system /dev/freezer/frozen
chown system system /dev/freezer/frozen/tasks
chown system system /dev/freezer/frozen/cgroup.procs
chown system system /dev/freezer/frozen/freezer.state
chown system system /dev/freezer/thaw
chown system system /dev/freezer/thaw/tasks
chown system system /dev/freezer/thaw/cgroup.procs
# MARs for freecess
chmod 0644 /dev/freezer/frozen/tasks
chmod 0644 /dev/freezer/frozen/cgroup.procs
chmod 0644 /dev/freezer/frozen/freezer.state
chmod 0644 /dev/freezer/thaw/tasks
chmod 0644 /dev/freezer/thaw/cgroup.procs
# SDHMS Slowdown : Freezer
mkdir /dev/freezer/abnormal
write /dev/freezer/abnormal/freezer.state THAWED
chown system system /dev/freezer/abnormal
chown system system /dev/freezer/abnormal/tasks
chown system system /dev/freezer/abnormal/cgroup.procs
chown system system /dev/freezer/abnormal/freezer.state
chmod 0644 /dev/freezer/abnormal/tasks
chmod 0644 /dev/freezer/abnormal/cgroup.procs
chmod 0644 /dev/freezer/abnormal/freezer.state
on boot
# SDHMS Slowdown : Cpuset
mkdir /dev/cpuset/abnormal
write /dev/cpuset/abnormal/cpus 0-3
copy /dev/cpuset/mems /dev/cpuset/abnormal/mems
chown system system /dev/cpuset/abnormal
chown system system /dev/cpuset/abnormal/tasks
chown system system /dev/cpuset/abnormal/cpus
chmod 0664 /dev/cpuset/abnormal/tasks
chmod 0664 /dev/cpuset/abnormal/cpus
mkdir /dev/cpuset/moderate
write /dev/cpuset/moderate/cpus 0-2,4-6
copy /dev/cpuset/mems /dev/cpuset/moderate/mems
chown system system /dev/cpuset/moderate
chown system system /dev/cpuset/moderate/tasks
chown system system /dev/cpuset/moderate/cpus
chmod 0664 /dev/cpuset/moderate/tasks
chmod 0664 /dev/cpuset/moderate/cpus
# SSWAP
write /proc/sys/vm/swappiness 130
# SQZR
on property:sys.boot_completed=1
swapon_all /vendor/etc/fstab.sqzr
on property:sys.sysctl.zram_balance_ratio=*
write /sys/module/zram/parameters/zram_balance_ratio ${sys.sysctl.zram_balance_ratio}
on post-fs-data
# MST/NFC Switch
chmod 0660 /dev/mst_ctrl
# SSU (Samsung SIM Unlock)
on property:ro.boot.carrierid=MXO
setprop ssu.support 1

@ -0,0 +1,44 @@
#!/bin/bash
#
# Copyright (C) 2017-2021 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
set -e
DEVICE_COMMON=a52q
VENDOR=samsung
# Load extractutils and do some sanity checks
MY_DIR="${BASH_SOURCE%/*}"
if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi
ANDROID_ROOT="${MY_DIR}/../../.."
HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
if [ ! -f "${HELPER}" ]; then
echo "Unable to find helper script at ${HELPER}"
exit 1
fi
source "${HELPER}"
# Initialize the helper
setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${ANDROID_ROOT}" true
# Warning headers and guards
write_headers "a52q"
write_makefiles "${MY_DIR}/proprietary-files.txt" true
###################################################################################################
# CUSTOM PART START #
###################################################################################################
OUTDIR=vendor/$VENDOR/$DEVICE_COMMON
###################################################################################################
# CUSTOM PART END #
###################################################################################################
# Done
write_footers
Loading…
Cancel
Save