AIC8800_USB_porting_guide_v1_1_20220526
AIC8800_USB_porting_guide_v1_1_20220526
AIC8800_USB_porting_guide_v1_1_20220526
Revision: 1.1
2022/05/26
历史更新记录
时间 修改内容 修订人 版本
2021/06/07 初版 Aiden 1.0
2022/05/26 新增 Q&A 栏位 Aiden 1.1
fmacfw.bin Wifi 固件
fw_adid.bin 蓝牙固件
fw_patch.bin 蓝牙固件
fw_patch_table.bin 蓝牙固件
aic8800_porting_package\USB\driver_fw\fw\aic8800 固件档案
aicbt 蓝牙 libbt-vendor
aic8800_porting_package\USB\driver_fw\aic
source "drivers/net/wireless/st/Kconfig"
source "drivers/net/wireless/ti/Kconfig"
source "drivers/net/wireless/zydas/Kconfig"
source "drivers/net/wireless/quantenna/Kconfig"
source "drivers/net/wireless/rockchip_wlan/Kconfig"
source "drivers/net/wireless/aic8800/Kconfig"
修改 kernel/drivers/net/wireless/Kconfig
obj-$(CONFIG_WLAN_VENDOR_MEDIATEK) += mediatek/
obj-$(CONFIG_WLAN_VENDOR_RALINK) += ralink/
obj-$(CONFIG_WLAN_VENDOR_REALTEK) += realtek/
obj-$(CONFIG_WLAN_VENDOR_RSI) += rsi/
obj-$(CONFIG_WLAN_VENDOR_ST) += st/
obj-$(CONFIG_WLAN_VENDOR_TI) += ti/
obj-$(CONFIG_WLAN_VENDOR_ZYDAS) += zydas/
obj-$(CONFIG_WLAN_VENDOR_QUANTENNA) += quantenna/
obj-$(CONFIG_AIC_WLAN_SUPPORT) += aic8800/
修改 kernel/drivers/net/wireless/Makefile
config BT_HCIBTUSB_RTL
bool "Realtek protocol support"
depends on BT_HCIBTUSB
select BT_RTL
default y
help
The Realtek protocol support enables firmware and configuration
download support for Realtek Bluetooth controllers.
config BT_AICBTUSB
tristate "AIC HCI USB driver"
depends on USB
help
AIC Bluetooth HCI USB driver
config BT_RTKBTUSB
tristate "RTK HCI USB driver"
depends on USB
help
RTK Bluetooth HCI USB driver
config BT_HCIBTSDIO
tristate "HCI SDIO driver"
depends on MMC
help
Bluetooth HCI SDIO driver.
This driver is required if you want to use Bluetooth device with
SDIO interface.
Say Y here to compile support for Bluetooth SDIO devices into the
kernel or say M to compile it as module (btsdio).
config BT_HCIUART
kernel/drivers/bluetooth/Kconfig
obj-$(CONFIG_BT_HCIBTUSB) += btusb.o
obj-$(CONFIG_BT_HCIBTSDIO) += btsdio.o
obj-$(CONFIG_BT_AICBTUSB) += aic_btusb.o
obj-$(CONFIG_BT_RTKBTUSB) += rtk_usb.o
kernel/drivers/bluetooth/Makefile
修改内核的 config(或用 make menuconfig),为以下参数
#
# Bluetooth device drivers
#
# CONFIG_BT_HCIBTUSB is not set
CONFIG_BT_AICBTUSB=m
# CONFIG_BT_RTKBTUSB is not set
# CONFIG_BT_HCIBTSDIO is not set
CONFIG_BT_HCIUART=y
CONFIG_BT_HCIUART_H4
.
.
.
# CONFIG_RTL8822BS is not set
# CONFIG_MVL88W8977 is not set
CONFIG_AIC_WLAN_SUPPORT=y
CONFIG_AIC8800_WLAN_SUPPORT=m
CONFIG_AIC_LOADFW_SUPPORT=m
# CONFIG_MAC80211_HWSIM is not set
# CONFIG_USB_NET_RNDIS_WLAN is
3. 编译完后即可得到
aic_btusb.ko、aic8800_fdrv.ko、aic_load_fw.ko
4. 各驱动模块的功用
aic_load_fw.ko:模块固件初始化
aic8800_fdrv.ko:Wifi 驱动
aic_btusb.ko:USB 蓝牙接口
蓝牙移植
将 aic 包放在 andoird\hardware\之下。
aic 放置目录
针对蓝牙部分进行以下修改。
# Bluetooth HAL
PRODUCT_PACKAGES += \
libbt-vendor \
android.hardware.bluetooth@1.0-impl \
android.hardware.bluetooth@1.0-service \
android.hardware.bluetooth@1.0-service.rc
$(LOCAL_PATH)/init.box.samba.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.box.
samba.rc \
device/rockchip/common/cifsmanager.sh:system/bin/cifsmanager.sh
修改 android/device/rockchip/common/device.mk
# for BT
/dev/vflash 0660 bluetooth net_bt_stack
/dev/ttyS0 0660 bluetooth net_bt_stack
/dev/ttyS1 0660 bluetooth net_bt_stack
#/dev/ttyS2 0660 bluetooth net_bt_stack
/dev/rtk_btusb 0660 bluetooth net_bt_stack
/dev/aic_btusb 0660 bluetooth net_bt_stack
# for serial
/dev/ttyS4 0660 system system
# for radio
/dev/ttyUSB0 0660 system radio
修改 android/device/rockchip/common/ueventd.rockchip.rc
BOARD_HAVE_BLUETOOTH_RTK := false
BOARD_HAVE_BLUETOOTH_AIC := true
修改 android/device/rockchip/common/wifi_bt_common.mk
Android 移植
可选择当下开发的平台、主控、系统进行比对,例如:移植 RK3229 Android10 可到补丁包中
的 for_Rockchip/3229/Android10 目录下选择比对 orig 以及 mod 之间的差异,将不同之处
Q&A
Q:GMS 测试发生问题。
A:需要确认 wifi-hal 是否有移植上,可比对移植包中的 orig 以及 mod 进行确认。