From a7fb1d8de1cefa6ac950f26146a2759e483e60be Mon Sep 17 00:00:00 2001 From: Luca Stefani Date: Fri, 31 Jul 2020 22:21:22 +0200 Subject: obiwan: Initial skeleton tree Change-Id: Ia0898290841bcb0394d7c6d6334e917e2960a143 --- Android.mk | 33 ++++++++++++++++++++++++++++ AndroidProducts.mk | 23 +++++++++++++++++++ BoardConfig.mk | 32 +++++++++++++++++++++++++++ bluetooth/include/bdroid_buildcfg.h | 34 ++++++++++++++++++++++++++++ device.mk | 44 +++++++++++++++++++++++++++++++++++++ extract-files.sh | 33 ++++++++++++++++++++++++++++ lineage.dependencies | 6 +++++ lineage_obiwan.mk | 42 +++++++++++++++++++++++++++++++++++ setup-makefiles.sh | 27 +++++++++++++++++++++++ system.prop | 6 +++++ 10 files changed, 280 insertions(+) create mode 100644 Android.mk create mode 100644 AndroidProducts.mk create mode 100644 BoardConfig.mk create mode 100644 bluetooth/include/bdroid_buildcfg.h create mode 100644 device.mk create mode 100755 extract-files.sh create mode 100644 lineage.dependencies create mode 100644 lineage_obiwan.mk create mode 100755 setup-makefiles.sh create mode 100644 system.prop diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..4dc0e81 --- /dev/null +++ b/Android.mk @@ -0,0 +1,33 @@ +# +# Copyright (C) 2020 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. +# + +# +# This contains the module build definitions for the hardware-specific +# components for this device. +# +# As much as possible, those components should be built unconditionally, +# with device-specific names to avoid collisions, to avoid device-specific +# bitrot and build breakages. Building a component unconditionally does +# *not* include it on all devices, so it is safe even with hardware-specific +# components. +# + +LOCAL_PATH := $(call my-dir) + +ifeq ($(TARGET_DEVICE),obiwan) + subdir_makefiles=$(call first-makefiles-under,$(LOCAL_PATH)) + $(foreach mk,$(subdir_makefiles),$(info including $(mk) ...)$(eval include $(mk))) +endif diff --git a/AndroidProducts.mk b/AndroidProducts.mk new file mode 100644 index 0000000..f5f7a87 --- /dev/null +++ b/AndroidProducts.mk @@ -0,0 +1,23 @@ +# +# Copyright (C) 2020 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. +# + +PRODUCT_MAKEFILES := \ + $(LOCAL_DIR)/lineage_obiwan.mk + +COMMON_LUNCH_CHOICES := \ + lineage_obiwan-user \ + lineage_obiwan-userdebug \ + lineage_obiwan-eng diff --git a/BoardConfig.mk b/BoardConfig.mk new file mode 100644 index 0000000..1c28c47 --- /dev/null +++ b/BoardConfig.mk @@ -0,0 +1,32 @@ +# +# Copyright (C) 2020 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 from asus sm8250-common +-include device/asus/sm8250-common/BoardConfigCommon.mk + +DEVICE_PATH := device/asus/obiwan + +# Bluetooth +BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(DEVICE_PATH)/bluetooth/include + +# Kernel +TARGET_KERNEL_CONFIG := vendor/obiwan_defconfig + +# Properties +TARGET_SYSTEM_PROP += $(DEVICE_PATH)/system.prop + +# inherit from the proprietary version +-include vendor/asus/obiwan/BoardConfigVendor.mk diff --git a/bluetooth/include/bdroid_buildcfg.h b/bluetooth/include/bdroid_buildcfg.h new file mode 100644 index 0000000..de46a96 --- /dev/null +++ b/bluetooth/include/bdroid_buildcfg.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2013, The Linux Foundation. All rights reserved. + * Not a Contribution, Apache license notifications and license are retained + * for attribution purposes only. + * + * Copyright (C) 2012 The Android Open Source Project + * Copyright (C) 2020 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. + */ + +#ifndef _BDROID_BUILDCFG_H +#define _BDROID_BUILDCFG_H + +#define BTM_DEF_LOCAL_NAME "ROG Phone 3" +// Disables read remote device feature +#define MAX_ACL_CONNECTIONS 16 +#define MAX_L2CAP_CHANNELS 16 +#define BLE_VND_INCLUDED TRUE +// skips conn update at conn completion +#define BT_CLEAN_TURN_ON_DISABLED 1 +/* Increasing SEPs to 12 from 6 to support SHO/MCast i.e. two streams per codec */ +#define AVDT_NUM_SEPS 12 +#endif diff --git a/device.mk b/device.mk new file mode 100644 index 0000000..4023c2d --- /dev/null +++ b/device.mk @@ -0,0 +1,44 @@ +# +# Copyright (C) 2020 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. +# + +# +# This file sets variables that control the way modules are built +# thorughout the system. It should not be used to conditionally +# disable makefiles (the proper mechanism to control what gets +# included in a build is to use PRODUCT_PACKAGES in a product +# definition file). +# + +# Overlays +DEVICE_PACKAGE_OVERLAYS += \ + $(LOCAL_PATH)/overlay \ + $(LOCAL_PATH)/overlay-lineage + +# Device uses high-density artwork where available +PRODUCT_AAPT_CONFIG := normal +PRODUCT_AAPT_PREF_CONFIG := xxhdpi + +# Boot animation +TARGET_SCREEN_HEIGHT := 2340 +TARGET_SCREEN_WIDTH := 1080 + +PRODUCT_SHIPPING_API_LEVEL := 29 + +# Inherit from asus sm8250-common +$(call inherit-product, device/asus/sm8250-common/common.mk) + +# Inherit from vendor blobs +#$(call inherit-product, vendor/asus/obiwan/obiwan-vendor.mk) diff --git a/extract-files.sh b/extract-files.sh new file mode 100755 index 0000000..2dab89a --- /dev/null +++ b/extract-files.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# +# Copyright (C) 2020 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. +# + +# 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=obiwan +export DEVICE_COMMON=sm8250-common +export VENDOR=asus + +export DEVICE_BRINGUP_YEAR=2020 + +"./../../${VENDOR}/${DEVICE_COMMON}/extract-files.sh" "$@" diff --git a/lineage.dependencies b/lineage.dependencies new file mode 100644 index 0000000..1dee90f --- /dev/null +++ b/lineage.dependencies @@ -0,0 +1,6 @@ +[ + { + "repository": "android_device_asus_sm8250-common", + "target_path": "device/asus/sm8250-common" + } +] diff --git a/lineage_obiwan.mk b/lineage_obiwan.mk new file mode 100644 index 0000000..c802c4f --- /dev/null +++ b/lineage_obiwan.mk @@ -0,0 +1,42 @@ +# +# Copyright (C) 2020 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 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 instantnoodlep device +$(call inherit-product, device/asus/obiwan/device.mk) + +# Inherit some common Lineage stuff. +$(call inherit-product, vendor/lineage/config/common_full_phone.mk) + +PRODUCT_BRAND := asus +PRODUCT_DEVICE := obiwan +PRODUCT_MANUFACTURER := asus +PRODUCT_MODEL := ASUS_I003D +PRODUCT_NAME := lineage_obiwan + +PRODUCT_GMS_CLIENTID_BASE := android-asus + +# Build info +PRODUCT_BUILD_PROP_OVERRIDES += \ + PRODUCT_DEVICE=ASUS_I003_1 \ + PRODUCT_NAME=WW_I003D \ + PRIVATE_BUILD_DESC="WW_I003D-user 10 QKQ1.200419.002 17.0823.2007.32-0 release-keys" \ + TARGET_DEVICE=ZS661KS + +BUILD_FINGERPRINT := "asus/WW_I003D/ASUS_I003_1:10/QKQ1.200419.002/17.0823.2007.32-0:user/release-keys" diff --git a/setup-makefiles.sh b/setup-makefiles.sh new file mode 100755 index 0000000..72f5ca9 --- /dev/null +++ b/setup-makefiles.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# +# Copyright (C) 2020 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. +# + +set -e + +# Required! +export DEVICE=obiwan +export DEVICE_COMMON=sm8250-common +export VENDOR=asus + +export DEVICE_BRINGUP_YEAR=2020 + +"./../../${VENDOR}/${DEVICE_COMMON}/setup-makefiles.sh" "$@" diff --git a/system.prop b/system.prop new file mode 100644 index 0000000..acf5133 --- /dev/null +++ b/system.prop @@ -0,0 +1,6 @@ +# Asus build +ro.vendor.build.asus.number=17.0823.2007.32-0 +ro.vendor.build.asus.sku=WW +ro.vendor.build.asus.version=17.0823.2007.32 +ro.vendor.build.fota.version=WW_I003D-17.0823.2007.32-0 +ro.vendor.build.software.version=17_0823_2007_32 -- cgit v1.2.3