From 20945cdc9c489e0f48963702571b777674e9671c Mon Sep 17 00:00:00 2001 From: Aaron Kling Date: Wed, 30 Jun 2021 19:19:40 -0500 Subject: [PATCH] dopinder: Configure Realtek Bluetooth/Wi-Fi HALs * We're not unifying things, and the stock MultiHAL requires framework side magic, so we're going with the hardware/realtek solution. * Set Bluetooth overlays based on stock. Change-Id: Ie8e0f2d2a5f1cb8337ebe88b903fb18a71602f18 --- Android.mk | 13 +++++++++++ BoardConfig.mk | 9 ++++++++ device.mk | 8 +++++++ lineage.dependencies | 4 ++++ .../apps/Bluetooth/res/values/config.xml | 22 +++++++++++++++++++ 5 files changed, 56 insertions(+) create mode 100644 Android.mk create mode 100644 overlay/packages/apps/Bluetooth/res/values/config.xml diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..246b24a --- /dev/null +++ b/Android.mk @@ -0,0 +1,13 @@ +# +# Copyright (C) 2021 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +ifeq ($(TARGET_DEVICE), dopinder) + +LOCAL_PATH := $(call my-dir) +include $(call all-makefiles-under,$(LOCAL_PATH)) + +include external/wpa_supplicant_8/wpa_supplicant/wpa_supplicant_conf.mk +endif diff --git a/BoardConfig.mk b/BoardConfig.mk index bd35797..06c6433 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -13,3 +13,12 @@ TARGET_BOOTLOADER_BOARD_NAME := sti6140d360 ## DTB TARGET_DTB_NAME := g12a_s905x2_u212_sti6130d3x0 + +## Wi-Fi +BOARD_WLAN_DEVICE := realtek +BOARD_WPA_SUPPLICANT_DRIVER := NL80211 +WPA_SUPPLICANT_VERSION := VER_0_8_X +BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_rtl +BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_rtl +WIFI_DRIVER_SOCKET_IFACE := wlan0 +PRODUCT_CFI_INCLUDE_PATHS += hardware/realtek/wlan/wpa_supplicant_8_lib diff --git a/device.mk b/device.mk index 5c2b9b6..e92759d 100644 --- a/device.mk +++ b/device.mk @@ -10,6 +10,14 @@ $(call inherit-product, vendor/askey/dopinder/dopinder-vendor.mk) $(call inherit-product, device/amlogic/g12-common/g12.mk) +## Bluetooth +BOARD_HAVE_BLUETOOTH_RTK_TV := true +include hardware/realtek/rtkbt/rtkbt.mk + ## Kernel Modules PRODUCT_PACKAGES += \ 8822cs + +## Overlays +DEVICE_PACKAGE_OVERLAYS += \ + $(DEVICE_PATH)/overlay diff --git a/lineage.dependencies b/lineage.dependencies index 38fca67..0628e31 100644 --- a/lineage.dependencies +++ b/lineage.dependencies @@ -6,5 +6,9 @@ { "repository": "android_hardware_amlogic_kernel-modules_rtl8822cs", "target_path": "hardware/amlogic/kernel-modules/rtl8822cs" + }, + { + "repository": "android_hardware_realtek", + "target_path": "hardware/realtek" } ] diff --git a/overlay/packages/apps/Bluetooth/res/values/config.xml b/overlay/packages/apps/Bluetooth/res/values/config.xml new file mode 100644 index 0000000..7df2fca --- /dev/null +++ b/overlay/packages/apps/Bluetooth/res/values/config.xml @@ -0,0 +1,22 @@ + + false + false + false + false + false + false + false + + false + false + false + false + false + + true + true + true + true + true + true + -- 2.20.1