diff --git a/BoardConfig.mk b/BoardConfig.mk index 39fe005..e9e560a 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -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 diff --git a/device.mk b/device.mk new file mode 100644 index 0000000..6e91995 --- /dev/null +++ b/device.mk @@ -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) diff --git a/extract-files.sh b/extract-files.sh index 948c6b3..0a28ec7 100644 --- a/extract-files.sh +++ b/extract-files.sh @@ -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" "$@" diff --git a/kugo.mk b/kugo.mk deleted file mode 100644 index 9199b3e..0000000 --- a/kugo.mk +++ /dev/null @@ -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) diff --git a/lineage_kugo.mk b/lineage_kugo.mk index 67a217c..857e907 100644 --- a/lineage_kugo.mk +++ b/lineage_kugo.mk @@ -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) diff --git a/proprietary-files.txt b/proprietary-files.txt index 4640904..3088338 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -1 +1,4 @@ -# TODO +# TODO: Stub + +vendor/bin/qns +vendor/lib/libmmcamera2_sensor_modules.so diff --git a/setup-makefiles.sh b/setup-makefiles.sh index 2348ad4..cb5cdc5 100644 --- a/setup-makefiles.sh +++ b/setup-makefiles.sh @@ -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" "$@" diff --git a/system_prop.mk b/vendor_prop.mk similarity index 76% rename from system_prop.mk rename to vendor_prop.mk index 37a79ba..0eb7c17 100644 --- a/system_prop.mk +++ b/vendor_prop.mk @@ -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 \ diff --git a/vendorsetup.sh b/vendorsetup.sh deleted file mode 100644 index 4640904..0000000 --- a/vendorsetup.sh +++ /dev/null @@ -1 +0,0 @@ -# TODO