Without BOARD_WLAN_DEVICE, libwifi-hal's fallback returns
WIFI_ERROR_NOT_SUPPORTED from init_wifi_vendor_hal_func_table, which
causes the AIDL wifi HAL (com.android.hardware.wifi) to fail at startup:
E android.hardware.wifi-service: Can not initialize the vendor
function pointer table
E android.hardware.wifi-service: Wifi HAL start failed
The bcmdhd implementation of init_wifi_vendor_hal_func_table uses
purely generic nl80211 — it scans /sys/class/net/ for phy80211
interfaces, creates netlink sockets, and resolves the nl80211 family
ID via genl_ctrl_resolve(). There are no bcmdhd-specific IOCTLs or
vendor commands in the core startup path (wifi_initialize, wifi_cleanup,
wifi_event_loop, wifi_get_ifaces, wifi_get_iface_name); the vendor
commands are only used for optional advanced features (RTT, NAN, etc.)
that this device does not use.
108 lines
3.4 KiB
Makefile
108 lines
3.4 KiB
Makefile
#
|
|
# Copyright (C) 2021-2022 KonstaKANG
|
|
# Copyright (C) 2025 Venkata Atchuta Bheemeswara Sarma Darbha
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
DEVICE_PATH := device/rockchip/tart
|
|
|
|
|
|
TARGET_ARCH := arm64
|
|
TARGET_ARCH_VARIANT := armv8-a
|
|
TARGET_CPU_ABI := arm64-v8a
|
|
TARGET_CPU_ABI2 :=
|
|
TARGET_CPU_VARIANT := generic
|
|
TARGET_CPU_VARIANT_RUNTIME := cortex-a76
|
|
|
|
|
|
|
|
# Bluetooth
|
|
BOARD_HAVE_BLUETOOTH := true
|
|
|
|
# Bootloader
|
|
TARGET_NO_BOOTLOADER := true
|
|
|
|
|
|
# Display
|
|
TARGET_SCREEN_DENSITY := 240
|
|
|
|
|
|
|
|
|
|
# Kernel
|
|
BOARD_CUSTOM_BOOTIMG := true
|
|
BOARD_CUSTOM_BOOTIMG_MK := $(DEVICE_PATH)/mkbootimg.mk
|
|
BOARD_KERNEL_IMAGE_NAME := Image
|
|
BOARD_KERNEL_CMDLINE := console=ttyS2,1500000 no_console_suspend root=/dev/ram0 rootwait androidboot.hardware=tart
|
|
|
|
# Bring-up debugging: expose an interactive shell on the ttyS2 serial console.
|
|
# The kernel already logs to ttyS2, but without androidboot.console set,
|
|
# ro.boot.console is empty and init's `console` service never binds a shell to
|
|
# it. This is the only introspection path on this device (no working
|
|
# WiFi/Ethernet, USB-C is power-in so no USB adb). Inert on `user` builds (the
|
|
# console service is gated on ro.debuggable=1); remove before any release build.
|
|
BOARD_KERNEL_CMDLINE += androidboot.console=ttyS2
|
|
|
|
# Source kernel build (overrides the deprecated prebuilt kernel)
|
|
TARGET_KERNEL_SOURCE := kernel/rockchip/tart
|
|
TARGET_KERNEL_CONFIG := tart_defconfig
|
|
TARGET_KERNEL_ARCH := arm64
|
|
|
|
# Manifest
|
|
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := $(DEVICE_PATH)/framework_compatibility_matrix.xml
|
|
DEVICE_MANIFEST_FILE := $(DEVICE_PATH)/manifest.xml
|
|
PRODUCT_MANIFEST_FILES := $(DEVICE_PATH)/product_manifest.xml
|
|
|
|
|
|
# Partition sizes
|
|
BOARD_FLASH_BLOCK_SIZE := 4096
|
|
BOARD_USES_METADATA_PARTITION := true
|
|
BOARD_BOOTIMAGE_PARTITION_SIZE := 134217728 # 128M
|
|
BOARD_METADATAIMAGE_PARTITION_SIZE := 16777216 # 16M
|
|
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 3221225472 # 3072M
|
|
BOARD_USERDATAIMAGE_PARTITION_SIZE := 134217728 # 128M
|
|
BOARD_VENDORIMAGE_PARTITION_SIZE := 536870912 # 512M (was 384M; broad USB WiFi
|
|
# firmware bundle left zero headroom)
|
|
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
|
|
TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
|
|
TARGET_USERIMAGES_USE_EXT4 := true
|
|
|
|
|
|
|
|
# Platform
|
|
TARGET_BOARD_PLATFORM := rk3588
|
|
|
|
TARGET_BOOTLOADER_BOARD_NAME := tart
|
|
|
|
# Properties
|
|
TARGET_VENDOR_PROP += $(DEVICE_PATH)/vendor.prop
|
|
|
|
# Recovery
|
|
TARGET_NO_RECOVERY := true
|
|
|
|
# SELinux
|
|
BOARD_SEPOLICY_DIRS += device/rockchip/tart/sepolicy
|
|
BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive
|
|
|
|
# Treble
|
|
TARGET_COPY_OUT_VENDOR := vendor
|
|
|
|
|
|
# Wifi
|
|
# BOARD_WLAN_DEVICE := bcmdhd selects the Broadcom wifi HAL implementation.
|
|
# Despite its name, bcmdhd's init_wifi_vendor_hal_func_table uses purely
|
|
# generic nl80211 — it scans /sys/class/net/ for phy80211 interfaces, creates
|
|
# netlink sockets, and resolves the nl80211 family ID. The functions are
|
|
# Broadcom-generic, not bcmdhd-specific; any nl80211-compatible adapter
|
|
# (mt7921u, rtw88, ath9k_htc, etc.) works fine.
|
|
#
|
|
# Without BOARD_WLAN_DEVICE, libwifi-hal's fallback returns
|
|
# WIFI_ERROR_NOT_SUPPORTED from init_wifi_vendor_hal_func_table, causing the
|
|
# AIDL wifi HAL (com.android.hardware.wifi) to fail at startup with "Can not
|
|
# initialize the vendor function pointer table".
|
|
BOARD_WLAN_DEVICE := bcmdhd
|
|
BOARD_HOSTAPD_DRIVER := NL80211
|
|
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
|
|
#WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true
|
|
WPA_SUPPLICANT_VERSION := VER_0_8_X
|