Take inspiration from android_device_sony_discovery

This commit is contained in:
Les De Ridder 2019-11-11 23:10:58 +01:00
parent 9da7b51082
commit 2a829dd6dd
9 changed files with 55 additions and 125 deletions

View File

@ -15,41 +15,19 @@
#
# inherit from the loire-common
include device/sony/loire-common/BoardConfigCommon.mk
-include device/sony/loire-common/BoardConfigCommon.mk
DEVICE_PATH := device/sony/kugo
# Assert
TARGET_OTA_ASSERT_DEVICE := kugo
# Kernel
TARGET_KERNEL_CONFIG := loire_kugo_defconfig
# TODO
# HIDL
#DEVICE_MANIFEST_FILE += $(DEVICE_PATH)/manifest.xml
# Include path
TARGET_SPECIFIC_HEADER_PATH += $(DEVICE_PATH)/include
# TODO
# Kernel properties
#TARGET_KERNEL_CONFIG := lineageos_loire_kugo_defconfig
BOARD_KERNEL_CMDLINE += androidboot.hardware=kugo
TARGET_NO_KERNEL := true
# TODO
# Partition information
BOARD_FLASH_BLOCK_SIZE := 131072 # (BOARD_KERNEL_PAGESIZE * 64)
BOARD_CACHEIMAGE_PARTITION_SIZE := 268435456
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 6197084160
BOARD_ODMIMAGE_PARTITION_SIZE := 419430400
#Reserve space for data encryption (23894949888-16384)
BOARD_USERDATAIMAGE_PARTITION_SIZE := 23894933504
BOARD_USERDATAIMAGE_PARTITION_SIZE := 23894949888
# Power
#TARGET_TAP_TO_WAKE_NODE := "/sys/devices/virtual/input/clearpad/wakeup_gesture"
# SELinux
BOARD_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy
# TODO
# Inherit from proprietary files
#include vendor/sony/kugo/BoardConfigVendor.mk
-include vendor/sony/kugo/BoardConfigVendor.mk

29
device.mk Normal file
View File

@ -0,0 +1,29 @@
#
# Copyright (C) 2019 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.
#
# Call the proprietary setup
$(call inherit-product, vendor/sony/kugo/kugo-vendor.mk)
# Overlays
DEVICE_PACKAGE_OVERLAYS += \
$(DEVICE_PATH)/overlay \
$(DEVICE_PATH)/overlay-lineage
# Properties
-include $(LOCAL_PATH)/vendor_prop.mk
# Inherit loire-common definitions
$(call inherit-product, device/sony/loire-common/loire.mk)

View File

@ -1,12 +1,12 @@
#!/bin/bash
#
# Copyright (C) 2019 The LineageOS Project
# Copyright (C) 2018-2019 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
# 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,
@ -23,8 +23,11 @@ fi
set -e
# Required!
export DEVICE=kugo
export DEVICE_COMMON=loire-common
export VENDOR=sony
export DEVICE_BRINGUP_YEAR=2016
"./../../${VENDOR}/${DEVICE_COMMON}/extract-files.sh" "$@"

85
kugo.mk
View File

@ -1,85 +0,0 @@
#
# Copyright (C) 2019 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.
#
# Inherit loire-common definitions
$(call inherit-product, device/sony/loire-common/loire.mk)
DEVICE_PATH := device/sony/kugo
# TODO
# Audio configs
#PRODUCT_COPY_FILES += \
# $(LOCAL_PATH)/configs/audio/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml \
# $(LOCAL_PATH)/configs/audio/mixer_paths_auxpcm.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_auxpcm.xml
# Boot animation
TARGET_SCREEN_HEIGHT := 1280
TARGET_SCREEN_WIDTH := 720
# TODO
# Hardware-specific permissions
#PRODUCT_COPY_FILES += \
# frameworks/native/data/etc/android.hardware.sensor.barometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.barometer.xml \
# frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.flash-autofocus.xml \
# frameworks/native/data/etc/android.hardware.sensor.proximity.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.proximity.xml \
# frameworks/native/data/etc/android.hardware.telephony.gsm.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.gsm.xml \
# frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml
# TODO
# Lineage Hardware
#PRODUCT_PACKAGES += \
# vendor.lineage.touch@1.0-service.kugo
# Overlays
DEVICE_PACKAGE_OVERLAYS += \
$(DEVICE_PATH)/overlay \
$(DEVICE_PATH)/overlay-lineage
# TODO
# Permissions
#PRODUCT_COPY_FILES += \
# frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml
# Properties
include $(DEVICE_PATH)/system_prop.mk
# TODO
# Sensors
#PRODUCT_COPY_FILES += \
# $(LOCAL_PATH)/configs/sensor_def_qcomdev.conf:system/etc/sensor_def_qcomdev.conf
# Screen density
PRODUCT_AAPT_CONFIG := normal
PRODUCT_AAPT_PREBUILT_DPI := xhdpi hdpi
PRODUCT_AAPT_PREF_CONFIG := xhdpi
PRODUCT_PROPERTY_OVERRIDES := \
ro.sf.lcd_density=320 \
ro.usb.pid_suffix=1E8
# TODO
# Thermal manager
#PRODUCT_COPY_FILES += \
# $(LOCAL_PATH)/configs/thermanager.xml:$(TARGET_COPY_OUT_VENDOR)/etc/thermanager.xml
# TODO
# Wifi
#PRODUCT_COPY_FILES += \
# $(LOCAL_PATH)/configs/wifi/bcmdhd.cal:$(TARGET_COPY_OUT_VENDOR)/firmware/bcmdhd.cal
# TODO
# Call the proprietary setup
#$(call inherit-product, vendor/sony/kugo/kugo-vendor.mk)

View File

@ -15,10 +15,11 @@
#
# Inherit from those products. Most specific first.
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
# Inherit from kugo device
$(call inherit-product, device/sony/kugo/kugo.mk)
$(call inherit-product, device/sony/kugo/device.mk)
# Inherit some common Lineage stuff.
$(call inherit-product, vendor/lineage/config/common_full_phone.mk)

View File

@ -1 +1,4 @@
# TODO
# TODO: Stub
vendor/bin/qns
vendor/lib/libmmcamera2_sensor_modules.so

View File

@ -6,7 +6,7 @@
# 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
# 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,
@ -15,16 +15,13 @@
# limitations under the License.
#
# If we're being sourced by the common script that we called,
# stop right here. No need to go down the rabbit hole.
if [ "${BASH_SOURCE[0]}" != "${0}" ]; then
return
fi
set -e
# Required!
export DEVICE=kugo
export DEVICE_COMMON=loire-common
export VENDOR=sony
export DEVICE_BRINGUP_YEAR=2016
"./../../${VENDOR}/${DEVICE_COMMON}/setup-makefiles.sh" "$@"

View File

@ -14,4 +14,9 @@
# limitations under the License.
#
# TODO
# TODO: I have no idea what these are
# SEMC
PRODUCT_PROPERTY_OVERRIDES += \
ro.semc.product.model=F5321 \
ro.semc.version.fs=GENERIC \
ro.semc.version.fs_revision=34.4.A.2.118 \

View File

@ -1 +0,0 @@
# TODO