全志A33 android6.0 rtl8723蓝牙部分移植

s

 1.准备20150528_RTL8723BU_BT_android5.0_V3.0_P11_FW_svn14422-BTCOEX20150119-5844.zip文件

2.将上面提供的蓝牙驱动文件rtk_btusb.h和rtk_btusb.c拷贝到kernel的drivers/bluetooth/

drivers/bluetooth/rtk_btusb.c
drivers/bluetooth/rtk_btusb.h

3.修改linux-3.4/drivers/bluetooth/Kconfig

config BT_RTKBTUSB
tristate "RTK HCI USB driver"
depends on USB
help
RTK Bluetooth HCI USB driver

3.修改linux-3.4/drivers/bluetooth/Makefile

obj-$(CONFIG_BT_RTKBTUSB) += rtk_btusb.o

4.修改linux-3.4/.config

//usb蓝牙
CONFIG_BT_RTKBTUSB=m
//hid支持
CONFIG_UHID=y
CONFIG_HID_A4TECH=y
CONFIG_HID_ACRUX=y
CONFIG_HID_ACRUX_FF=y
CONFIG_HID_APPLE=y
CONFIG_HID_BELKIN=y
//PAN支持
CONFIG_TUN=y
// AVRCP支持
CONFIG_INPUT_UINPUT=y # User level driver support
CONFIG_INPUT_MISC=y

5.编译kernel,生成

./build.sh
out/sun8iw5p1/android/common/lib/modules/3.4.39/rtk_btusb.ko

6.修改Android device 层 init.rc 插入蓝牙驱动

1.device/softwinner/astar-d7/init.sun8i.rc
on early-fs
.....
insmod /system/vendor/modules/rtk_btusb.ko

7.编译固件后,看蓝牙驱动是否加载成功

root:/ # ls dev/rtk_btusb                                                
dev/rtk_btusb

8.接下来让蓝牙能再hard层显示,修改BoardConfig.mk,添加对Realtek支持

vi device/softwinner/astar-d7/BoardConfig.mk
BOARD_WIFI_VENDOR := realtek
ifeq ($(BOARD_WIFI_VENDOR), realtek)
    WPA_SUPPLICANT_VERSION := VER_0_8_X
    BOARD_WPA_SUPPLICANT_DRIVER := NL80211
    BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_rtl
    BOARD_HOSTAPD_DRIVER        := NL80211
    BOARD_HOSTAPD_PRIVATE_LIB   := lib_driver_cmd_rtl


    BOARD_USR_WIFI := rtl8723bu

    #BOARD_USR_WIFI := rtl8189es

    include hardware/realtek/wlan/config/config.mk
..........
..........
BOARD_HAVE_BLUETOOTH := true
BOARD_HAVE_BLUETOOTH_BCM := true
BOARD_HAVE_BLUETOOTH_NAME := rtl8723bu
BOARD_HAVE_BLUETOOTH_RTK_COEX := true
BOARD_HAVE_BLUETOOTH_RTK := true
BLUETOOTH_HCI_USE_RTK_H5 := true
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/softwinner/astar-d7/bluetooth
TARGET_USE_BOOSTUP_OPZ := true

 9.修改init.sun8i.rc

device/softwinner/astar-d7/init.sun8i.rc
on boot
.......
# bluetooth
 # change back to bluetooth from system
chown bluetooth net_bt_stack /data/misc/Bluetooth
mkdir /data/misc/bluedroid 0770 bluetooth net_bt_stack
chmod 0660 /dev/rtk_btusb
chown bluetooth net_bt_stack /dev/rtk_btusb
 # bluetooth MAC address programming
 chown bluetooth net_bt_stack ro.bt.bdaddr_path
 chown bluetooth net_bt_stack /system/etc/bluetooth
 chown bluetooth net_bt_stack /data/misc/bluetooth
 setprop ro.bt.bdaddr_path "/data/misc/bluetooth/bdaddr"

10. 修改astar_d7.mk,选择支持蓝牙固件,这里固件一般android自带的源码有,我资源里面也有

vi device/softwinner/astar-d7/astar_d7.mk
........

$(call inherit-product, hardware/realtek/bt/firmware/rtl8723a/device-rtl.mk)
$(call inherit-product, hardware/realtek/bt/firmware/rtl8723b/device-rtl.mk)
$(call inherit-product, hardware/realtek/bt/firmware/rtl8821a/device-rtl.mk)
$(call inherit-product, hardware/realtek/bt/firmware/rtl8761a/device-rtl.mk)

#If the customer want support LE, make sure the configure below.
#Realtek add start
PRODUCT_COPY_FILES += \ 
frameworks/native/data/etc/android.hardware.bluetooth.xml:system/etc/permissions/android.hardware.bluetooth.xml \ 
frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml \
#realtek add en
....................

11.修改ueventd.sun8i.rc 增加热插拔usb节点权限

vi device/softwinner/astar-d7/ueventd.sun8i.rc
.....
/dev/rtk_btusb              0660    bluetooth   net_bt_stack

12.修改 file_contexts

vi device/softwinner/astar-common/sepolicy/file_contexts
.....
# Bluetooth
/dev/rtk_btusb              u:object_r:hci_attach_dev:s0

13.修改bt_vendor.conf

vi device/softwinner/astar-d7/bluetooth/bt_vendor.conf
# UART device port where Bluetooth controller is attached
UartPort = /dev/rtk_btusb

# Firmware patch file location
FwPatchFilePath = /system/vendor/modules/

# Firmware Name
FwPatchFileName = bcm20710a1.hcd

 14.修改rtkbt.conf

vi device/softwinner/astar-d7/bluetooth/rtkbt.conf
#For usb /dev/rtk_btusb
BtDeviceNode=/dev/rtk_btusb

此后编译完成后,加载蓝牙发现 hard层没有libbt-vendor_usb.so,打开蓝牙失败!

接下来hard层支持usb蓝牙库

15.将 hardware/realtek/bluetooth/libbt-vendor/下新建文件夹 uart,拷贝libbt-vendor所有文件到uart;

新建文件夹 usb,拷贝libbt-vendor/include下bt_vendor_rtk.h  upio.h  vnd_buildcfg.h 到usb/include;拷贝libbt-vendor/src/bt_vendor_rtk.c  upio.c 到 usb/src

cd hardware/realtek/bluetooth/libbt-vendor/
Android.mk  uart/  usb/
libbt-vendor$ ls uart/
Android.mk  include/  src/
libbt-vendor$ ls uart/include/
bt_vendor_rtk.h  upio.h  userial_vendor.h  vnd_buildcfg.h
libbt-vendor$ ls uart/src/
bt_vendor_rtk.c  hardware.c  upio.c  userial_vendor.c
libbt-vendor$ ls usb/
Android.mk  include/  src/
libbt-vendor$ ls usb/include/
bt_vendor_rtk.h  upio.h  vnd_buildcfg.h
libbt-vendor$ ls usb/src/
bt_vendor_rtk.c  upio.c

16.修改usb/include/vnd_buildcfg.h 下BLUETOOTH_UART_DEVICE_PORT

#ifndef _VND_BUILDCFG_H
#define _VND_BUILDCFG_H
#define BLUETOOTH_UART_DEVICE_PORT   "/dev/rtk_btusb"
#define BTVND_DBG   TRUE
#define LPM_SLEEP_MODE   FALSE
#endif

17.修改usb/Android.mk

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

BDROID_DIR := $(TOP_DIR)system/bt

LOCAL_SRC_FILES := \
        src/bt_vendor_rtk.c \
        src/upio.c

LOCAL_C_INCLUDES += \
        $(LOCAL_PATH)/include \
        $(BDROID_DIR)/hci/include

LOCAL_SHARED_LIBRARIES := \
        libcutils

LOCAL_MODULE := libbt-vendor_usb
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := SHARED_LIBRARIES

include $(BUILD_SHARED_LIBRARY)

18.hardware/realtek/bluetooth/libbt-vendor/新增加Android.mk

LOCAL_PATH := $(call my-dir)

include $(call all-subdir-makefiles)

19.最后编译通过

android6.0-a33/android# mmm hardware/realtek/bluetooth/libbt-vendor/
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=6.0.1
TARGET_PRODUCT=astar_d7
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a7
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.2.0-27-generic-x86_64-with-Ubuntu-14.04-trusty
HOST_BUILD_TYPE=release
BUILD_ID=MOB30R
OUT_DIR=out
============================================
No private recovery resources for TARGET_DEVICE astar-d7
make: Entering directory `/home/yufea/mnt/A33/blue_wifi_android6/android6.0-a33/android'
target SharedLib: libbt-vendor_usb (out/target/product/astar-d7/obj/SHARED_LIBRARIES/libbt-vendor_usb_intermediates/LINKED/libbt-vendor_usb.so)
target Pack Relocations: libbt-vendor_usb (out/target/product/astar-d7/obj/SHARED_LIBRARIES/libbt-vendor_usb_intermediates/PACKED/libbt-vendor_usb.so)
INFO: Compaction                 : 0 bytes
INFO: Too few relocations to pack after alignment
target Symbolic: libbt-vendor_usb (out/target/product/astar-d7/symbols/system/lib/libbt-vendor_usb.so)
target Strip: libbt-vendor_usb (out/target/product/astar-d7/obj/lib/libbt-vendor_usb.so)

  • 6
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
全志R16平台的android6.0.1系统下的RTL8188EU的配置V1.0 2017/5/31 10:30 1、R:\wyb\rtl8188eu_r16m_20161208\android\device\softwinner\astar-evb30\overlay\frameworks\base\core\res\res\values\config.xml <!-- List of regexpressions describing the interface (if any) that represent tetherable Wifi interfaces. If the device doesn't want to support tethering over Wifi this should be empty. An example would be "softap.*" --> <string-array translatable="false" name="config_tether_wifi_regexs"> <item>"wlan0"</item> </string-array> RTL8188EU没有BT,需要干掉BT的配置(不要显示): <!-- List of regexpressions describing the interface (if any) that represent tetherable bluetooth interfaces. If the device doesn't want to support tethering over bluetooth this should be empty. --> <!-- default: disable Bluetooth PAN feature --> <string-array translatable="false" name="config_tether_bluetooth_regexs"> <item>"bt-pan"</item> </string-array> 2、 R:\wyb\rtl8188eu_r16m_20161208\android\device\softwinner\astar-evb30\astar_evb30.mk PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.camera.xml:system/etc/permissions/android.hardware.camera.xml \ frameworks/native/data/etc/android.hardware.camera.front.xml:system/etc/permissions/android.hardware.camera.front.xml \ frameworks/native/data/etc/android.hardware.ethernet.xml:system/etc/permissions/android.hardware.ethernet.xml \ (干掉BT部分)frameworks/native/data/etc/android.hardware.bluetooth.xml:system/etc/permissions/android.hardware.bluetooth.xml 开启ADB,方便调试: PRODUCT_PROPERTY_OVERRIDES += \ persist.sys.usb.config=mtp \ ro.adb.secure=1 \ ro.sys.mutedrm=true \ rw.logger=0 修改为: PRODUCT_PROPERTY_OVERRIDES += \ persist.sys.usb.config=mass_storage,adb \ ro.adb.secure=0 \ ro.sys.mutedrm=true \ rw.logger=0 3、 R:\wyb\rtl8188eu_r16m_20161208\android\device\softwinner\astar-evb30\BoardConfig.mk # wifi and bt configuration # 1. Wifi Configuration # 1.1 realtek wifi support # 1.1 realtek wifi configuration # BOARD_USR_WIFI: rtl8188eu/rtl8723bs/rtl8723bs_vq0/rtl8723cs (打开realtek这个开关,并配置为rtl8188eu,默认为:rtl8723bs_vq0) BOARD_WIFI_VENDOR := realtek ifeq ($(BOARD_WIFI_VENDOR), realtek) WPA_SUPPLICANT_VERSION := VER_0_8_X BOARD_WPA_SUPPLICANT_DRIVER := NL80211 BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_rtl BOARD_HOSTAPD_DRIVER := NL80211 BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_rtl #BOARD_USR_WIFI := rtl8723bs_vq0 BOARD_USR_WIFI := rtl8188eu BOARD_WLAN_DEVICE := rtl8188eu include hardware/realtek/wlan/config/config.mk endif # 1.2 broadcom wifi support (关闭) #BOARD_WIFI_VENDOR := broadcom ifeq ($(BOARD_WIFI_VENDOR), broadcom) BOARD_WPA_SUPPLICANT_DRIVER := NL80211 WPA_SUPPLICANT_VERSION := VER_0_8_X BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_bcmdhd BOARD_HOSTAPD_DRIVER := NL80211 BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_bcmdhd BOARD_WLAN_DEVICE := bcmdhd WIFI_DRIVER_FW_PATH_PARAM := "/sys/module/bcmdhd/parameters/firmware_path" BOARD_USR_WIFI := ap6212 include hardware/broadcom/wlan/bcmdhd/firmware/$(BOARD_USR_WIFI)/device-bcm.mk endif (关闭) ## 2. Bluetooth Configuration ## make sure BOARD_HAVE_BLUETOOTH is true for every bt vendor #BOARD_HAVE_BLUETOOTH := true #BOARD_HAVE_BLUETOOTH_BCM := true #BOARD_HAVE_BLUETOOTH_NAME := ap6212 #BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/softwinner/astar-evb30/bluetooth 4、 R:\wyb\rtl8188eu_r16m_20161208\android\device\softwinner\astar-evb30\init.sun8i.rc # network (关闭博通:AP6212,打开realtek) #insmod /system/vendor/modules/bcmdhd.ko #insmod /system/vendor/modules/bcm_btlpm.ko insmod /system/vendor/modules/8188eu.ko insmod /system/vendor/modules/usbnet.ko insmod /system/vendor/modules/asix.ko insmod /system/vendor/modules/qf9700.ko insmod /system/vendor/modules/mcs7830.ko insmod /system/vendor/modules/smsc95xx.ko insmod /system/vendor/modules/rtl8150.ko insmod /system/vendor/modules/cdc_ether.ko (关闭) ## bluetooth # # UART device # chmod 0660 /dev/ttyS1 # chown bluetooth net_bt_stack /dev/ttyS1 # # # power up/down interface # chmod 0660 /sys/class/rfkill/rfkill0/state # chmod 0660 /sys/class/rfkill/rfkill0/type # chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state # chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type # # # bluetooth MAC address programming # chown bluetooth net_bt_stack ro.bt.bdaddr_path # chown bluetooth net_bt_stack /system/etc/bluetooth # chown bluetooth net_bt_stack /data/misc/bluetooth # setprop ro.bt.bdaddr_path "/data/misc/bluetooth/bdaddr" # # # bluetooth LPM # chmod 0220 /proc/bluetooth/sleep/lpm # chmod 0220 /proc/bluetooth/sleep/btwrite # chown bluetooth net_bt_stack /proc/bluetooth/sleep/lpm # chown bluetooth net_bt_stack /proc/bluetooth/sleep/btwrite (关闭博通的部分:AP6212) ## broadcom wifi service ## 1 broadcom wifi sta service #service wpa_supplicant /system/bin/wpa_supplicant \ # -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ # -I/system/etc/wifi/wpa_supplicant_overlay.conf \ # -O/data/misc/wifi/sockets \ # -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 # # we will start as root and wpa_supplicant will switch to user wifi # # after setting up the capabilities required for WEXT # # user wifi # # group wifi inet keystore # class main # socket wpa_wlan0 dgram 660 wifi wifi # disabled # oneshot # ## 2 broadcom wifi sta p2p concurrent service #service p2p_supplicant /system/bin/wpa_supplicant \ # -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ # -I/system/etc/wifi/wpa_supplicant_overlay.conf \ # -O/data/misc/wifi/sockets -N \ # -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \ # -I/system/etc/wifi/p2p_supplicant_overlay.conf \ # -puse_p2p_group_interface=1 -e/data/misc/wifi/entropy.bin \ # -g@android:wpa_wlan0 # # we will start as root and wpa_supplicant will switch to user wifi # # after setting up the capabilities required for WEXT # # user wifi # # group wifi inet keystore # class main # socket wpa_wlan0 dgram 660 wifi wifi # disabled # oneshot (增加rtl8188eu部分) # realtek wifi service service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant \ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ -O/data/misc/wifi/sockets \ -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 class main socket wpa_wlan0 dgram 660 wifi wifi disabled oneshot # 1.2 realtek wifi sta p2p concurrent service service p2p_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant \ -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \ -e/data/misc/wifi/entropy.bin -N \ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ -O/data/misc/wifi/sockets \ -g@android:wpa_wlan0 class main socket wpa_wlan0 dgram 660 wifi wifi disabled oneshot 5、 R:\wyb\rtl8188eu_r16m_20161208\android\hardware\realtek\bluetooth\firmware\rtlbtfw_cfg.mk $(LOCAL_PATH)/rtl8703b_config:system/etc/firmware/rtl8703bs_config (关闭realtek的BT,否则会编译出错:) #$(TOP_DIR)device/softwinner/$(basename $(TARGET_DEVICE))/bluetooth/rtkbt.conf:system/etc/bluetooth/rtkbt.conf \ make: *** 没有规则可以创建“out/target/product/astar-evb30/system/etc/bluetooth/rtkbt.conf”需要的目标“device/softwinner/astar-evb30/bluetooth/rtkbt.conf”。 停止。 Export includes file: external/sqlite/dist/Android.mk -- out/target/product/astar-evb30/obj/EXECUTABLES/sqlite3_intermediates/export_includes Notice file: external/sqlite/dist/NOTICE -- out/target/product/astar-evb30/obj/NOTICE_FILES/src//system/xbin/sqlite3.txt Import includes file: out/target/product/astar-evb30/obj/EXECUTABLES/strace_intermediates/import_includes Export includes file: external/strace/Android.mk -- out/target/product/astar-evb30/obj/EXECUTABLES/strace_intermediates/export_includes Import includes file: out/target/product/astar-evb30/obj/EXECUTABLES/su_intermediates/import_includes Export includes file: system/extras/su/Android.mk -- out/target/product/astar-evb30/obj/EXECUTABLES/su_intermediates/export_includes Notice file: system/extras/su/NOTICE -- out/target/product/astar-evb30/obj/NOTICE_FILES/src//system/xbin/su.txt Import includes file: out/target/product/astar-evb30/obj/EXECUTABLES/taskstats_intermediates/import_includes Export includes file: system/extras/taskstats/Android.mk -- out/target/product/astar-evb30/obj/EXECUTABLES/taskstats_intermediates/export_includes Notice file: system/extras/taskstats/NOTICE -- out/target/product/astar-evb30/obj/NOTICE_FILES/src//system/xbin/taskstats.txt Import includes file: out/target/product/astar-evb30/obj/EXECUTABLES/tcpdump_intermediates/import_includes Export includes file: external/tcpdump/Android.mk -- out/target/product/astar-evb30/obj/EXECUTABLES/tcpdump_intermediates/export_includes Import includes file: out/target/product/astar-evb30/obj/EXECUTABLES/timeinfo_intermediates/import_includes Export includes file: system/extras/timeinfo/Android.mk -- out/target/product/astar-evb30/obj/EXECUTABLES/timeinfo_intermediates/export_includes Notice file: system/extras/timeinfo/NOTICE -- out/target/product/astar-evb30/obj/NOTICE_FILES/src//system/xbin/timeinfo.txt make: *** 没有规则可以创建“out/target/product/astar-evb30/system/etc/bluetooth/rtkbt.conf”需要的目标“device/softwinner/astar-evb30/bluetooth/rtkbt.conf”。 停止。 make: *** 正在等待未完成的任务.... 12585 unique nodes, 42861 total 注: 某些输入文件使用或覆盖了已过时的 API。 注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。 注: 某些输入文件使用了未经检查或不安全的操作。 注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。 12585 unique nodes, 42861 total 21515 unique nodes, 102669 total #### make failed to build some targets (01:21 (mm:ss)) #### rootroot@cm-System-Product-Name:/home/rediron/r16m/rtl8188eu_r16m_20161208/android$ grep rtkbt.conf . -R Z:\home\rediron\r16m\rtl8188eu_r16m_20161208\android\hardware\realtek\bluetooth\firmware\rtlbtfw_cfg.mk 6、 R:\wyb\rtl8188eu_r16m_20161208\lichee\tools\pack\chips\sun8iw5p1\configs\evb-30\sys_config.fex (关闭BT) ;-------------------------------------------------------------------------------- ;bluetooth configuration ;bt_used: 0- no used, 1- used ;bt_uard_id: 0- uart0, 1- uart1, 2- uart2 ;bt_rst_n: bt function enable io ;bt_wake: host wake-up bluetooth device ;bt_wak_host: bt device wake-up host ;bt_host_wake_invert: whether bt_host_wake use inverter between ap and module ; 0: not used, 1: used ;-------------------------------------------------------------------------------- [bt_para] bt_used = 0 bt_uart_id = 1 bt_rst_n = port:PL08<1><default><default><0> bt_wake = port:PL10<1><default><default><0> bt_host_wake = port:PL09<4><default><default><0> bt_host_wake_invert = 0 7、配置USB1(接RTL8188EU) rootroot@cm-System-Product-Name:/home/rediron/r16m/rtl8188eu_r16m_20161208$ rootroot@cm-System-Product-Name:/home/rediron/r16m/rtl8188eu_r16m_20161208$ cd lichee/ rootroot@cm-System-Product-Name:/home/rediron/r16m/rtl8188eu_r16m_20161208/lichee$ cd linux-3.4/ rootroot@cm-System-Product-Name:/home/rediron/r16m/rtl8188eu_r16m_20161208/lichee/linux-3.4$ rootroot@cm-System-Product-Name:/home/rediron/r16m/rtl8188eu_r16m_20161208/lichee/linux-3.4$ make ARCH=arm menuconfig Device Drivers ---> [*] USB support ---> <*> SoftWinner SUNXI USB Host Controller support <*> SoftWinner SUNXI USB Host Controller0 <*> SoftWinner SUNXI USB HCI <*> SoftWinner SUNXI USB EHCI0 < > SoftWinner SUNXI USB EHCI1 修改为: <*> SoftWinner SUNXI USB EHCI1 <*> SoftWinner SUNXI USB OHCI0 < > SoftWinner SUNXI USB OHCI1 修改为: <*> SoftWinner SUNXI USB OHCI1 < > SoftWinner SUNXI USB EHCI2 < > SoftWinner SUNXI USB OHCI2 < > SoftWinner SUNXI USB EHCI3 < > SoftWinner SUNXI USB OHCI3 < > SoftWinner SUNXI USB HSIC 不加这里内核报错,但是不影响上网! shell@astar-evb30:/ $ shell@astar-evb30:/ $ [ 30.993687] hci: ERR: not support sunxi_usb_enable_ehci [ 30.999650] hci: ERR: not support sunxi_usb_enable_ohci shell@astar-evb30:/ $ shell@astar-evb30:/ $
全志R16平台的Android6系统下调通rtl8189es 2017/8/28 9:41 版本:V1.1 1、干掉BT选项: Q:\r16m\rtl8189es_r16m\Android\device\softwinner\astar-evb30\overlay\frameworks\base\core\res\res\values\config.xml "bt-pan" 2、 Q:\r16m\rtl8189es_r16m\android\device\softwinner\astar-evb30\astar_evb30.mk $(call inherit-product, build/target/product/full_base.mk) $(call inherit-product, device/softwinner/astar-common/astar-common.mk) $(call inherit-product-if-exists, device/softwinner/astar-evb30/modules/modules.mk) DEVICE_PACKAGE_OVERLAYS := device/softwinner/astar-evb30/overlay \ $(DEVICE_PACKAGE_OVERLAYS) PRODUCT_PACKAGES += Launcher3 PRODUCT_PACKAGES += \ ESFileExplorer \ VideoPlayer #Bluetooth # PartnerChromeCustomizationsProvider PRODUCT_COPY_FILES += \ device/softwinner/astar-evb30/kernel:kernel \ device/softwinner/astar-evb30/fstab.sun8i:root/fstab.sun8i \ device/softwinner/astar-evb30/init.sun8i.rc:root/init.sun8i.rc \ device/softwinner/astar-evb30/init.recovery.sun8i.rc:root/init.recovery.sun8i.rc \ device/softwinner/astar-evb30/ueventd.sun8i.rc:root/ueventd.sun8i.rc \ device/softwinner/astar-evb30/recovery.fstab:recovery.fstab \ device/softwinner/astar-evb30/modules/modules/nand.ko:root/nand.ko \ device/softwinner/astar-evb30/modules/modules/disp.ko:root/disp.ko \ device/softwinner/astar-evb30/modules/modules/lcd.ko:root/lcd.ko \ device/softwinner/astar-evb30/modules/modules/gslX680new.ko:root/gslX680new.ko \ device/softwinner/astar-evb30/modules/modules/sunxi-keyboard.ko:root/sunxi-keyboard.ko \ device/softwinner/astar-evb30/modules/modules/sw-device.ko:root/sw-device.ko \ device/softwinner/astar-evb30/modules/modules/sunxi-keyboard.ko:obj/sunxi-keyboard.ko \ device/softwinner/astar-evb30/modules/modules/sw-device.ko:obj/sw-device.ko \ device/softwinner/astar-evb30/modules/modules/gslX680new.ko:obj/gslX680new.ko PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.camera.xml:system/etc/permissions/android.hardware.camera.xml \ frameworks/native/data/etc/android.hardware.camera.front.xml:system/etc/permissions/android.hardware.camera.front.xml \ frameworks/native/data/etc/android.hardware.ethernet.xml:system/etc/permissions/android.hardware.ethernet.xml #frameworks/native/data/etc/android.hardware.bluetooth.xml:system/etc/permissions/android.hardware.bluetooth.xml # Low mem(memory <= 512M) device should not copy android.software.managed_users.xml #PRODUCT_COPY_FILES += \ # frameworks/native/data/etc/android.software.managed_users.xml:system/etc/permissions/android.software.managed_users.xml PRODUCT_COPY_FILES += \ device/softwinner/astar-evb30/configs/camera.cfg:system/etc/camera.cfg \ device/softwinner/astar-evb30/configs/gsensor.cfg:system/usr/gsensor.cfg \ device/softwinner/astar-evb30/configs/media_profiles.xml:system/etc/media_profiles.xml \ device/softwinner/astar-evb30/configs/sunxi-keyboard.kl:system/usr/keylayout/sunxi-keyboard.kl \ device/softwinner/astar-evb30/configs/tp.idc:system/usr/idc/tp.idc #PRODUCT_COPY_FILES += \ # device/softwinner/astar-evb30/bluetooth/bt_vendor.conf:system/etc/bluetooth/bt_vendor.conf # bootanimation PRODUCT_COPY_FILES += \ device/softwinner/astar-evb30/media/bootanimation.zip:system/media/bootanimation.zip # camera config for camera detector #PRODUCT_COPY_FILES += \ # device/softwinner/astar-evb30/hawkview/sensor_list_cfg.ini:system/etc/hawkview/sensor_list_cfg.ini # Radio Packages and Configuration Flie $(call inherit-product, device/softwinner/common/rild/radio_common.mk) #$(call inherit-product, device/softwinner/common/ril_modem/huawei/mu509/huawei_mu509.mk) #$(call inherit-product, device/softwinner/common/ril_modem/Oviphone/em55/oviphone_em55.mk) #PRODUCT_PROPERTY_OVERRIDES += \ # limit dex2oat threads to improve thermals PRODUCT_PROPERTY_OVERRIDES += \ dalvik.vm.boot-dex2oat-threads=4 \ dalvik.vm.dex2oat-threads=3 \ dalvik.vm.image-dex2oat-threads=4 # Realtek wifi efuse map #PRODUCT_COPY_FILES += \ # device/softwinner/astar-d7/wifi_efuse_8723bs-vq0.map:system/etc/wifi/wifi_efuse_8723bs-vq0.map PRODUCT_PROPERTY_OVERRIDES += \ dalvik.vm.dex2oat-flags=--no-watch-dog \ dalvik.vm.jit.codecachesize=0 \ ro.am.reschedule_service=true PRODUCT_PROPERTY_OVERRIDES += \ ro.frp.pst=/dev/block/by-name/frp PRODUCT_PROPERTY_OVERRIDES += \ persist.sys.usb.config=mass_storage,adb \ ro.adb.secure=0 \ ro.sys.mutedrm=true \ rw.logger=0 # A33 Media PRODUCT_PROPERTY_OVERRIDES += \ ro.config.media=1 PRODUCT_PROPERTY_OVERRIDES += \ dalvik.vm.heapsize=384m \ dalvik.vm.heapstartsize=8m \ dalvik.vm.heapgrowthlimit=80m \ dalvik.vm.heaptargetutilization=0.75 \ dalvik.vm.heapminfree=512k \ dalvik.vm.heapmaxfree=8m \ ro.zygote.disable_gl_preload=false #PRODUCT_PROPERTY_OVERRIDES += \ # ro.config.low_ram=true PRODUCT_PROPERTY_OVERRIDES += \ ro.sf.lcd_density=213 PRODUCT_PROPERTY_OVERRIDES += \ persist.sys.timezone=Asia/Shanghai \ persist.sys.country=CN \ persist.sys.language=zh # stoarge PRODUCT_PROPERTY_OVERRIDES += \ persist.fw.force_adoptable=true PRODUCT_CHARACTERISTICS := tablet PRODUCT_AAPT_CONFIG := mdpi PRODUCT_AAPT_PREF_CONFIG := mdpi #$(call inherit-product-if-exists, vendor/google/products/gms_base.mk) #for 8723bs-vq0,should setmacaddr #PRODUCT_PACKAGES += setmacaddr PRODUCT_BRAND := Allwinner PRODUCT_NAME := astar_evb30 PRODUCT_DEVICE := astar-evb30 PRODUCT_MODEL := QUAD-CORE R16 evb30 PRODUCT_MANUFACTURER := Allwinner 3、在这里配置你所使用的WIFI+BT: Q:\r16m\rtl8189es_r16m\android\device\softwinner\astar-evb30\BoardConfig.mk # wifi and bt configuration # 1. Wifi Configuration # 1.1 realtek wifi support # 1.1 realtek wifi configuration # BOARD_USR_WIFI: rtl8188eu/rtl8723bs/rtl8723bs_vq0/rtl8723cs BOARD_WIFI_VENDOR := realtek ifeq ($(BOARD_WIFI_VENDOR), realtek) WPA_SUPPLICANT_VERSION := VER_0_8_X BOARD_WPA_SUPPLICANT_DRIVER := NL80211 BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_rtl BOARD_HOSTAPD_DRIVER := NL80211 BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_rtl #BOARD_USR_WIFI := rtl8723bs_vq0 #BOARD_USR_WIFI := rtl8188eu BOARD_USR_WIFI := rtl8189es include hardware/realtek/wlan/config/config.mk endif # 1.2 broadcom wifi support #BOARD_WIFI_VENDOR := broadcom ifeq ($(BOARD_WIFI_VENDOR), broadcom) BOARD_WPA_SUPPLICANT_DRIVER := NL80211 WPA_SUPPLICANT_VERSION := VER_0_8_X BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_bcmdhd BOARD_HOSTAPD_DRIVER := NL80211 BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_bcmdhd BOARD_WLAN_DEVICE := bcmdhd WIFI_DRIVER_FW_PATH_PARAM := "/sys/module/bcmdhd/parameters/firmware_path" BOARD_USR_WIFI := ap6212 include hardware/broadcom/wlan/bcmdhd/firmware/$(BOARD_USR_WIFI)/device-bcm.mk endif ## 2. Bluetooth Configuration ## make sure BOARD_HAVE_BLUETOOTH is true for every bt vendor #BOARD_HAVE_BLUETOOTH := true #BOARD_HAVE_BLUETOOTH_BCM := true #BOARD_HAVE_BLUETOOTH_NAME := ap6212 #BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/softwinner/astar-evb30/bluetooth TARGET_USE_BOOSTUP_OPZ := true 4、 Q:\r16m\rtl8189es_r16m\android\device\softwinner\astar-evb30\init.sun8i.rc ## bluetooth # # UART device # chmod 0660 /dev/ttyS1 # chown bluetooth net_bt_stack /dev/ttyS1 # # # power up/down interface # chmod 0660 /sys/class/rfkill/rfkill0/state # chmod 0660 /sys/class/rfkill/rfkill0/type # chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state # chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type # # # bluetooth MAC address programming # chown bluetooth net_bt_stack ro.bt.bdaddr_path # chown bluetooth net_bt_stack /system/etc/bluetooth # chown bluetooth net_bt_stack /data/misc/bluetooth # setprop ro.bt.bdaddr_path "/data/misc/bluetooth/bdaddr" # # # bluetooth LPM # chmod 0220 /proc/bluetooth/sleep/lpm # chmod 0220 /proc/bluetooth/sleep/btwrite # chown bluetooth net_bt_stack /proc/bluetooth/sleep/lpm # chown bluetooth net_bt_stack /proc/bluetooth/sleep/btwrite ## broadcom wifi service ## 1 broadcom wifi sta service #service wpa_supplicant /system/bin/wpa_supplicant \ # -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ # -I/system/etc/wifi/wpa_supplicant_overlay.conf \ # -O/data/misc/wifi/sockets \ # -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 # # we will start as root and wpa_supplicant will switch to user wifi # # after setting up the capabilities required for WEXT # # user wifi # # group wifi inet keystore # class main # socket wpa_wlan0 dgram 660 wifi wifi # disabled # oneshot # ## 2 broadcom wifi sta p2p concurrent service #service p2p_supplicant /system/bin/wpa_supplicant \ # -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ # -I/system/etc/wifi/wpa_supplicant_overlay.conf \ # -O/data/misc/wifi/sockets -N \ # -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \ # -I/system/etc/wifi/p2p_supplicant_overlay.conf \ # -puse_p2p_group_interface=1 -e/data/misc/wifi/entropy.bin \ # -g@android:wpa_wlan0 # # we will start as root and wpa_supplicant will switch to user wifi # # after setting up the capabilities required for WEXT # # user wifi # # group wifi inet keystore # class main # socket wpa_wlan0 dgram 660 wifi wifi # disabled # oneshot # realtek wifi service service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant \ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ -O/data/misc/wifi/sockets \ -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 class main socket wpa_wlan0 dgram 660 wifi wifi disabled oneshot # 1.2 realtek wifi sta p2p concurrent service service p2p_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant \ -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \ -e/data/misc/wifi/entropy.bin -N \ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ -O/data/misc/wifi/sockets \ -g@android:wpa_wlan0 class main socket wpa_wlan0 dgram 660 wifi wifi disabled oneshot 5、可选:为了调试方便 Q:\r16m\rtl8189es_r16m\android\frameworks\base\packages\SettingsProvider\res\values\defaults.xml 60000 false 修改为: 1800000 true 6、解决编译不过的问题。rtl8189es没有BT: Q:\r16m\rtl8189es_r16m\android\hardware\realtek\bluetooth\firmware\rtlbtfw_cfg.mk PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/rtl8723a_fw:system/etc/firmware/rtl8723as_fw \ $(LOCAL_PATH)/rtl8723a_config:system/etc/firmware/rtl8723as_config \ $(LOCAL_PATH)/rtl8723b_fw:system/etc/firmware/rtl8723bs_fw \ $(LOCAL_PATH)/rtl8723b_config:system/etc/firmware/rtl8723bs_config \ $(LOCAL_PATH)/rtl8723b_VQ0_fw:system/etc/firmware/rtl8723bs_VQ0_fw \ $(LOCAL_PATH)/rtl8723b_VQ0_config:system/etc/firmware/rtl8723bs_VQ0_config \ $(LOCAL_PATH)/rtl8723cs_xx_fw:system/etc/firmware/rtl8723cs_xx_fw \ $(LOCAL_PATH)/rtl8723cs_xx_config:system/etc/firmware/rtl8723cs_xx_config \ $(LOCAL_PATH)/rtl8723cs_cg_fw:system/etc/firmware/rtl8723cs_cg_fw \ $(LOCAL_PATH)/rtl8723cs_cg_config:system/etc/firmware/rtl8723cs_cg_config \ $(LOCAL_PATH)/rtl8723cs_vf_fw:system/etc/firmware/rtl8723cs_vf_fw \ $(LOCAL_PATH)/rtl8723cs_vf_config:system/etc/firmware/rtl8723cs_vf_config \ $(LOCAL_PATH)/rtl8703b_fw:system/etc/firmware/rtl8703bs_fw \ $(LOCAL_PATH)/rtl8703b_config:system/etc/firmware/rtl8703bs_config #$(TOP_DIR)device/softwinner/$(basename $(TARGET_DEVICE))/bluetooth/rtkbt.conf:system/etc/bluetooth/rtkbt.conf \ 7、默认的BSP没有加载rtl8189es Q:\r16m\rtl8189es_r16m\android\hardware\libhardware_legacy\wifi\Android.mk # realtek sdio wifi module ifeq ($(BOARD_USR_WIFI), rtl8189fs) LOCAL_CFLAGS += -DRTL_8189FS_WIFI_USED LOCAL_CFLAGS += -DRTL_WIFI_VENDOR endif # realtek sdio wifi module ifeq ($(BOARD_USR_WIFI), rtl8189es) LOCAL_CFLAGS += -DRTL_8189ES_WIFI_USED LOCAL_CFLAGS += -DRTL_WIFI_VENDOR endif Q:\r16m\rtl8189es_r16m\android\hardware\libhardware_legacy\wifi\wifi.c #elif defined RTL_8189FS_WIFI_USED /* rtl8189FS sdio wifi */ #ifndef WIFI_DRIVER_MODULE_PATH #define WIFI_DRIVER_MODULE_PATH "/system/vendor/modules/8189fs.ko" #endif #ifndef WIFI_DRIVER_MODULE_NAME #define WIFI_DRIVER_MODULE_NAME "8189fs" #endif #ifndef WIFI_DRIVER_MODULE_ARG #define WIFI_DRIVER_MODULE_ARG "ifname=wlan0 if2name=p2p0" #endif #elif defined RTL_8189ES_WIFI_USED /* rtl8189ES sdio wifi */ #ifndef WIFI_DRIVER_MODULE_PATH #define WIFI_DRIVER_MODULE_PATH "/system/vendor/modules/8189es.ko" #endif #ifndef WIFI_DRIVER_MODULE_NAME #define WIFI_DRIVER_MODULE_NAME "8189es" #endif #ifndef WIFI_DRIVER_MODULE_ARG #define WIFI_DRIVER_MODULE_ARG "ifname=wlan0 if2name=p2p0" #endif #elif defined ESPRESSIF_ESP8089_WIFI_USED /* esp8089 sdio wifi */ #ifndef WIFI_DRIVER_MODULE_PATH #define WIFI_DRIVER_MODULE_PATH "/system/vendor/modules/esp8089.ko" #endif #ifndef WIFI_DRIVER_MODULE_NAME #define WIFI_DRIVER_MODULE_NAME "esp8089" #endif #ifndef WIFI_DRIVER_MODULE_ARG #define WIFI_DRIVER_MODULE_ARG "" #endif #endif 8、WIFI+BT的驱动识别: Q:\r16m\rtl8189es_r16m\lichee\Linux-3.4\drivers\misc\rf_pm\bt_pm.c static int rfkill_set_power(void *data, bool blocked) { unsigned int mod_sel = get_rf_mod_type(); RF_MSG("rfkill set power %d\n", !blocked); switch (mod_sel){ case 2: /* ap6210 */ case 5: /* rtl8723bs */ case 7: /* ap6476 */ case 8: /* ap6330 */ case 9: /* gb9663 */ case 10: /* ap6212 */ if (!blocked) { if(bt_rst_n != -1) gpio_set_value(bt_rst_n, 1); } else { if(bt_rst_n != -1) gpio_set_value(bt_rst_n, 0); } break; default: RF_MSG("no bt module matched !!\n"); } bt_state = !blocked; msleep(10); return 0; } Q:\r16m\rtl8189es_r16m\lichee\linux-3.4\drivers\misc\rf_pm\rf_pm.c char *module_list[] = { " ", "ap6181", "ap6210", "rtl8188eu", "rtl8723au", "rtl8723bs", "esp8089", "ap6476", "ap6330", "gb9663", "ap6212", "rtl8189es" }; static int rf_pm_probe(struct platform_device *pdev) { get_module_res(); if (mod_info.num 0){ on_off = 1; } else { on_off = 0; } wifi_pm_msg("wifi power %s\n", on?"on":"off"); switch(mod_num){ case 1: /* ap6181 */ case 2: /* ap6210 */ case 5: /* rtl8723bs */ case 6: /* esp8089 */ case 7: /* ap6476 */ case 8: /* ap6330 */ case 9: /* gb9663*/ case 10: /* ap6212 */ case 11: /* rtl8189es */ if (wl_info.wl_reg_on != -1) gpio_set_value(wl_info.wl_reg_on, on_off); break; case 3: /* rtl8188eu */ rf_module_power(on_off); break; case 4: /* rtl8723au */ break; default: wifi_pm_msg("wrong module select %d !\n", mod_num); } wl_info.wl_power_state = on_off; wifi_state = on_off; } EXPORT_SYMBOL(wifi_pm_power); 9、直接使用全志R16平台的parrot v1.1系统下的rtl8189es驱动代替。Android6.0.1自带的驱动貌似有问题! Q:\r16m\rtl8189es_r16m\lichee\linux-3.4\drivers\net\wireless\rtl8189es\ rootroot@rootroot-E400:~/wyb/rtl8189es_r16m$ 7za x rtl8189es_r16m验证通过20170818_1659没有外层目录.7z -r -o./ rootroot@rootroot-E400:~/wyb/rtl8189es_r16m$ cd lichee/linux-3.4/drivers/net/wireless/ rootroot@rootroot-E400:~/wyb/rtl8189es_r16m/lichee/linux-3.4/drivers/net/wireless$ rootroot@rootroot-E400:~/wyb/rtl8189es_r16m/lichee/linux-3.4/drivers/net/wireless$ rm rtl8189es -rf rootroot@rootroot-E400:~/wyb/rtl8189es_r16m/lichee/linux-3.4/drivers/net/wireless$ tar zxvf rtl8189es4.tar.gz 10、可选操作:为了调试方便 Q:\r16m\rtl8189es_r16m\lichee\tools\pack\chips\sun8iw5p1\configs\default\env.cfg #kernel command arguments console=ttyS0,115200 nand_root=/dev/nandd mmc_root=/dev/mmcblk0p7 init=/init loglevel=8 #set kernel cmdline if boot.img or recovery.img has no cmdline we will use this setargs_nand=setenv bootargs console=${console} root=${nand_root} init=${init} ion_cma_list="120m,256m" loglevel=${loglevel} partitions=${partitions} setargs_mmc=setenv bootargs console=${console} root=${mmc_root} init=${init} ion_cma_list="120m,256m" loglevel=${loglevel} partitions=${partitions} #nand command syntax: sunxi_flash read address partition_name read_bytes #0x40007800 = 0x40008000(kernel entry) - 0x800(boot.img header 2k) boot_normal=sunxi_flash read 40007800 boot;boota 40007800 boot_recovery=sunxi_flash read 40007800 recovery;boota 40007800 boot_fastboot=fastboot #recovery key recovery_key_value_max=0x13 recovery_key_value_min=0x10 #fastboot key fastboot_key_value_max=0x8 fastboot_key_value_min=0x2 #uboot system env config bootdelay=3 #default bootcmd, will change at runtime according to key press bootcmd=run setargs_nand boot_normal#default nand boot 11、 Q:\r16m\rtl8189es_r16m\lichee\tools\pack\chips\sun8iw5p1\configs\evb-30\sys_config.fex ;--------------------------------------------------------------------------------------------------------- ; wakeup_src_para: ; sometimes, u would like to add more wakeup src in standby mode, these para will be ; help; ; u need to make sure the standby mode support the wakeup src. Also, some hw ; condition must be guaranteed. ; including: ; cpu_en: power on or off. ; 1: mean power on ; 0: mean power off ; cpu_freq: indicating lowest freq. unit is Mhz; ; dram selfresh_en: selfresh or not. ; 1: enable enter selfresh ; 0: disable enter selfresh ; dram_pll: if not enter selfresh, indicating lowest freq. unit is Mhz; ; wakeup_src: to make the scenario work, the wakeup src is needed. ;--------------------------------------------------------------------------------------------------------- [wakeup_src_para] cpu_en = 0 cpu_freq = 48 ; (cpu:apb:ahb) pll_ratio = 0x111 dram_selfresh_en= 1 dram_freq = 36 wakeup_src_wl = port:PL07 ;wakeup_src_bt = port:PL09 bb_wake_ap = port:PL02 ;-------------------------------------------------------------------------------- ;wifi/bt/fm/gps/nfc modules configuration ;module_num: ; 0- none ; 1- ap6181(wifi) ; 2- ap6210/ap6212(wifi+bt) ; 3- rtl8188eu(wifi) ; 4- rtl8723au(wifi+bt) ; 5- rtl8723bs/rtl8723bs-vq0(wifi+bt) ; 6- esp8089(wifi) ; 7- ap6476(wifi+bt+fm+gps) ; 8- ap6330(wifi+bt+fm) ; 9- gb9663(wifi+bt+fm) ; 10- ap6212(wifi+bt) ; 11- rtl8189es(wifi) ;module_power1: ""- bat, "axp_dldo1"- axp dldo1 ;module_power1_vol: power1 voltage, mv; not used for module_power1 is "" ;module_power2: ""- bat, "axp_dldo2"- axp dldo2 ;module_power2_vol: power2 voltage, mv; not used for module_power2 is "" ;module_power3: ""- bat, "axp_dldo2"- axp dldo2 ;module_power3_vol: power3 voltage, mv; not used for module_power3 is "" ;power_switch: module power switch io when bat supply ;chip_en: enable chip io ;lpo_use_apclk: ""- not use, "losc_out"- a23/33, "ac10032k1"?"ac10032k2"?"ac10032k3"- a80/a83 ;-------------------------------------------------------------------------------- [rf_para] module_num = 11 module_power1 = "axp22_dldo1" module_power1_vol = 3300000 module_power2 = "axp22_dldo2" module_power2_vol = 3300000 module_power3 = "axp22_aldo1" module_power3_vol = 3300000 power_switch = chip_en = lpo_use_apclk = "losc_out" ;-------------------------------------------------------------------------------- ;wifi configuration ;wifi_used: 0-not use, 1- use ;wifi_sdc_id: 0- SDC0, 1- SDC1, 2- SDC2, 3- SDC3 ;wifi_usbc_id: 0- USB0, 1- USB1, 2- USB2 ;wifi_usbc_type: 1- EHCI(speed 2.0), 2- OHCI(speed 1.0) ;wl_reg_on: wifi function enable io ;wl_host_wake: wifi device wake-up host ;wl_host_wake_invert: whether wl_host_wake use inverter between ap and module ; 0: not used, 1: used ;-------------------------------------------------------------------------------- [wifi_para] wifi_used = 1 wifi_sdc_id = 1 wifi_usbc_id = 1 wifi_usbc_type = 1 wl_reg_on = port:PL06 wl_host_wake = port:PL07 rtl8189es_host_wake = port:PL07 wl_host_wake_invert = 0 ;-------------------------------------------------------------------------------- ;bluetooth configuration ;bt_used: 0- no used, 1- used ;bt_uard_id: 0- uart0, 1- uart1, 2- uart2 ;bt_rst_n: bt function enable io ;bt_wake: host wake-up bluetooth device ;bt_wak_host: bt device wake-up host ;bt_host_wake_invert: whether bt_host_wake use inverter between ap and module ; 0: not used, 1: used ;-------------------------------------------------------------------------------- [bt_para] bt_used = 0 ;bt_uart_id = 1 ;bt_rst_n = port:PL08 ;bt_wake = port:PL10 ;bt_host_wake = port:PL09 ;bt_host_wake_invert = 0 power_start = 3 pmu_temp_enable = 0
全志R16平台的Android6系统下调通rtl8189es 2017/8/28 9:41 版本:V1.1 1、干掉BT选项: Q:\r16m\rtl8189es_r16m\Android\device\softwinner\astar-evb30\overlay\frameworks\base\core\res\res\values\config.xml <!-- List of regexpressions describing the interface (if any) that represent tetherable bluetooth interfaces. If the device doesn't want to support tethering over bluetooth this should be empty. --> <!-- default: disable Bluetooth PAN feature --> <string-array translatable="false" name="config_tether_bluetooth_regexs"> <item>"bt-pan"</item> </string-array> 2、 Q:\r16m\rtl8189es_r16m\android\device\softwinner\astar-evb30\astar_evb30.mk $(call inherit-product, build/target/product/full_base.mk) $(call inherit-product, device/softwinner/astar-common/astar-common.mk) $(call inherit-product-if-exists, device/softwinner/astar-evb30/modules/modules.mk) DEVICE_PACKAGE_OVERLAYS := device/softwinner/astar-evb30/overlay \ $(DEVICE_PACKAGE_OVERLAYS) PRODUCT_PACKAGES += Launcher3 PRODUCT_PACKAGES += \ ESFileExplorer \ VideoPlayer #Bluetooth # PartnerChromeCustomizationsProvider PRODUCT_COPY_FILES += \ device/softwinner/astar-evb30/kernel:kernel \ device/softwinner/astar-evb30/fstab.sun8i:root/fstab.sun8i \ device/softwinner/astar-evb30/init.sun8i.rc:root/init.sun8i.rc \ device/softwinner/astar-evb30/init.recovery.sun8i.rc:root/init.recovery.sun8i.rc \ device/softwinner/astar-evb30/ueventd.sun8i.rc:root/ueventd.sun8i.rc \ device/softwinner/astar-evb30/recovery.fstab:recovery.fstab \ device/softwinner/astar-evb30/modules/modules/nand.ko:root/nand.ko \ device/softwinner/astar-evb30/modules/modules/disp.ko:root/disp.ko \ device/softwinner/astar-evb30/modules/modules/lcd.ko:root/lcd.ko \ device/softwinner/astar-evb30/modules/modules/gslX680new.ko:root/gslX680new.ko \ device/softwinner/astar-evb30/modules/modules/sunxi-keyboard.ko:root/sunxi-keyboard.ko \ device/softwinner/astar-evb30/modules/modules/sw-device.ko:root/sw-device.ko \ device/softwinner/astar-evb30/modules/modules/sunxi-keyboard.ko:obj/sunxi-keyboard.ko \ device/softwinner/astar-evb30/modules/modules/sw-device.ko:obj/sw-device.ko \ device/softwinner/astar-evb30/modules/modules/gslX680new.ko:obj/gslX680new.ko PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.camera.xml:system/etc/permissions/android.hardware.camera.xml \ frameworks/native/data/etc/android.hardware.camera.front.xml:system/etc/permissions/android.hardware.camera.front.xml \ frameworks/native/data/etc/android.hardware.ethernet.xml:system/etc/permissions/android.hardware.ethernet.xml #frameworks/native/data/etc/android.hardware.bluetooth.xml:system/etc/permissions/android.hardware.bluetooth.xml # Low mem(memory <= 512M) device should not copy android.software.managed_users.xml #PRODUCT_COPY_FILES += \ # frameworks/native/data/etc/android.software.managed_users.xml:system/etc/permissions/android.software.managed_users.xml PRODUCT_COPY_FILES += \ device/softwinner/astar-evb30/configs/camera.cfg:system/etc/camera.cfg \ device/softwinner/astar-evb30/configs/gsensor.cfg:system/usr/gsensor.cfg \ device/softwinner/astar-evb30/configs/media_profiles.xml:system/etc/media_profiles.xml \ device/softwinner/astar-evb30/configs/sunxi-keyboard.kl:system/usr/keylayout/sunxi-keyboard.kl \ device/softwinner/astar-evb30/configs/tp.idc:system/usr/idc/tp.idc #PRODUCT_COPY_FILES += \ # device/softwinner/astar-evb30/bluetooth/bt_vendor.conf:system/etc/bluetooth/bt_vendor.conf # bootanimation PRODUCT_COPY_FILES += \ device/softwinner/astar-evb30/media/bootanimation.zip:system/media/bootanimation.zip # camera config for camera detector #PRODUCT_COPY_FILES += \ # device/softwinner/astar-evb30/hawkview/sensor_list_cfg.ini:system/etc/hawkview/sensor_list_cfg.ini # Radio Packages and Configuration Flie $(call inherit-product, device/softwinner/common/rild/radio_common.mk) #$(call inherit-product, device/softwinner/common/ril_modem/huawei/mu509/huawei_mu509.mk) #$(call inherit-product, device/softwinner/common/ril_modem/Oviphone/em55/oviphone_em55.mk) #PRODUCT_PROPERTY_OVERRIDES += \ # limit dex2oat threads to improve thermals PRODUCT_PROPERTY_OVERRIDES += \ dalvik.vm.boot-dex2oat-threads=4 \ dalvik.vm.dex2oat-threads=3 \ dalvik.vm.image-dex2oat-threads=4 # Realtek wifi efuse map #PRODUCT_COPY_FILES += \ # device/softwinner/astar-d7/wifi_efuse_8723bs-vq0.map:system/etc/wifi/wifi_efuse_8723bs-vq0.map PRODUCT_PROPERTY_OVERRIDES += \ dalvik.vm.dex2oat-flags=--no-watch-dog \ dalvik.vm.jit.codecachesize=0 \ ro.am.reschedule_service=true PRODUCT_PROPERTY_OVERRIDES += \ ro.frp.pst=/dev/block/by-name/frp PRODUCT_PROPERTY_OVERRIDES += \ persist.sys.usb.config=mass_storage,adb \ ro.adb.secure=0 \ ro.sys.mutedrm=true \ rw.logger=0 # A33 Media PRODUCT_PROPERTY_OVERRIDES += \ ro.config.media=1 PRODUCT_PROPERTY_OVERRIDES += \ dalvik.vm.heapsize=384m \ dalvik.vm.heapstartsize=8m \ dalvik.vm.heapgrowthlimit=80m \ dalvik.vm.heaptargetutilization=0.75 \ dalvik.vm.heapminfree=512k \ dalvik.vm.heapmaxfree=8m \ ro.zygote.disable_gl_preload=false #PRODUCT_PROPERTY_OVERRIDES += \ # ro.config.low_ram=true PRODUCT_PROPERTY_OVERRIDES += \ ro.sf.lcd_density=213 PRODUCT_PROPERTY_OVERRIDES += \ persist.sys.timezone=Asia/Shanghai \ persist.sys.country=CN \ persist.sys.language=zh # stoarge PRODUCT_PROPERTY_OVERRIDES += \ persist.fw.force_adoptable=true PRODUCT_CHARACTERISTICS := tablet PRODUCT_AAPT_CONFIG := mdpi PRODUCT_AAPT_PREF_CONFIG := mdpi #$(call inherit-product-if-exists, vendor/google/products/gms_base.mk) #for 8723bs-vq0,should setmacaddr #PRODUCT_PACKAGES += setmacaddr PRODUCT_BRAND := Allwinner PRODUCT_NAME := astar_evb30 PRODUCT_DEVICE := astar-evb30 PRODUCT_MODEL := QUAD-CORE R16 evb30 PRODUCT_MANUFACTURER := Allwinner 3、在这里配置你所使用的WIFI+BT: Q:\r16m\rtl8189es_r16m\android\device\softwinner\astar-evb30\BoardConfig.mk # wifi and bt configuration # 1. Wifi Configuration # 1.1 realtek wifi support # 1.1 realtek wifi configuration # BOARD_USR_WIFI: rtl8188eu/rtl8723bs/rtl8723bs_vq0/rtl8723cs BOARD_WIFI_VENDOR := realtek ifeq ($(BOARD_WIFI_VENDOR), realtek) WPA_SUPPLICANT_VERSION := VER_0_8_X BOARD_WPA_SUPPLICANT_DRIVER := NL80211 BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_rtl BOARD_HOSTAPD_DRIVER := NL80211 BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_rtl #BOARD_USR_WIFI := rtl8723bs_vq0 #BOARD_USR_WIFI := rtl8188eu BOARD_USR_WIFI := rtl8189es include hardware/realtek/wlan/config/config.mk endif # 1.2 broadcom wifi support #BOARD_WIFI_VENDOR := broadcom ifeq ($(BOARD_WIFI_VENDOR), broadcom) BOARD_WPA_SUPPLICANT_DRIVER := NL80211 WPA_SUPPLICANT_VERSION := VER_0_8_X BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_bcmdhd BOARD_HOSTAPD_DRIVER := NL80211 BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_bcmdhd BOARD_WLAN_DEVICE := bcmdhd WIFI_DRIVER_FW_PATH_PARAM := "/sys/module/bcmdhd/parameters/firmware_path" BOARD_USR_WIFI := ap6212 include hardware/broadcom/wlan/bcmdhd/firmware/$(BOARD_USR_WIFI)/device-bcm.mk endif ## 2. Bluetooth Configuration ## make sure BOARD_HAVE_BLUETOOTH is true for every bt vendor #BOARD_HAVE_BLUETOOTH := true #BOARD_HAVE_BLUETOOTH_BCM := true #BOARD_HAVE_BLUETOOTH_NAME := ap6212 #BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/softwinner/astar-evb30/bluetooth TARGET_USE_BOOSTUP_OPZ := true 4、 Q:\r16m\rtl8189es_r16m\android\device\softwinner\astar-evb30\init.sun8i.rc ## bluetooth # # UART device # chmod 0660 /dev/ttyS1 # chown bluetooth net_bt_stack /dev/ttyS1 # # # power up/down interface # chmod 0660 /sys/class/rfkill/rfkill0/state # chmod 0660 /sys/class/rfkill/rfkill0/type # chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state # chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type # # # bluetooth MAC address programming # chown bluetooth net_bt_stack ro.bt.bdaddr_path # chown bluetooth net_bt_stack /system/etc/bluetooth # chown bluetooth net_bt_stack /data/misc/bluetooth # setprop ro.bt.bdaddr_path "/data/misc/bluetooth/bdaddr" # # # bluetooth LPM # chmod 0220 /proc/bluetooth/sleep/lpm # chmod 0220 /proc/bluetooth/sleep/btwrite # chown bluetooth net_bt_stack /proc/bluetooth/sleep/lpm # chown bluetooth net_bt_stack /proc/bluetooth/sleep/btwrite ## broadcom wifi service ## 1 broadcom wifi sta service #service wpa_supplicant /system/bin/wpa_supplicant \ # -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ # -I/system/etc/wifi/wpa_supplicant_overlay.conf \ # -O/data/misc/wifi/sockets \ # -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 # # we will start as root and wpa_supplicant will switch to user wifi # # after setting up the capabilities required for WEXT # # user wifi # # group wifi inet keystore # class main # socket wpa_wlan0 dgram 660 wifi wifi # disabled # oneshot # ## 2 broadcom wifi sta p2p concurrent service #service p2p_supplicant /system/bin/wpa_supplicant \ # -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ # -I/system/etc/wifi/wpa_supplicant_overlay.conf \ # -O/data/misc/wifi/sockets -N \ # -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \ # -I/system/etc/wifi/p2p_supplicant_overlay.conf \ # -puse_p2p_group_interface=1 -e/data/misc/wifi/entropy.bin \ # -g@android:wpa_wlan0 # # we will start as root and wpa_supplicant will switch to user wifi # # after setting up the capabilities required for WEXT # # user wifi # # group wifi inet keystore # class main # socket wpa_wlan0 dgram 660 wifi wifi # disabled # oneshot # realtek wifi service service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant \ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ -O/data/misc/wifi/sockets \ -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 class main socket wpa_wlan0 dgram 660 wifi wifi disabled oneshot # 1.2 realtek wifi sta p2p concurrent service service p2p_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant \ -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \ -e/data/misc/wifi/entropy.bin -N \ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ -O/data/misc/wifi/sockets \ -g@android:wpa_wlan0 class main socket wpa_wlan0 dgram 660 wifi wifi disabled oneshot 5、可选:为了调试方便 Q:\r16m\rtl8189es_r16m\android\frameworks\base\packages\SettingsProvider\res\values\defaults.xml <integer name="def_screen_off_timeout">60000</integer> <bool name="def_lockscreen_disabled">false</bool> 修改为: <integer name="def_screen_off_timeout">1800000</integer> <bool name="def_lockscreen_disabled">true</bool> 6、解决编译不过的问题。rtl8189es没有BT: Q:\r16m\rtl8189es_r16m\android\hardware\realtek\bluetooth\firmware\rtlbtfw_cfg.mk PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/rtl8723a_fw:system/etc/firmware/rtl8723as_fw \ $(LOCAL_PATH)/rtl8723a_config:system/etc/firmware/rtl8723as_config \ $(LOCAL_PATH)/rtl8723b_fw:system/etc/firmware/rtl8723bs_fw \ $(LOCAL_PATH)/rtl8723b_config:system/etc/firmware/rtl8723bs_config \ $(LOCAL_PATH)/rtl8723b_VQ0_fw:system/etc/firmware/rtl8723bs_VQ0_fw \ $(LOCAL_PATH)/rtl8723b_VQ0_config:system/etc/firmware/rtl8723bs_VQ0_config \ $(LOCAL_PATH)/rtl8723cs_xx_fw:system/etc/firmware/rtl8723cs_xx_fw \ $(LOCAL_PATH)/rtl8723cs_xx_config:system/etc/firmware/rtl8723cs_xx_config \ $(LOCAL_PATH)/rtl8723cs_cg_fw:system/etc/firmware/rtl8723cs_cg_fw \ $(LOCAL_PATH)/rtl8723cs_cg_config:system/etc/firmware/rtl8723cs_cg_config \ $(LOCAL_PATH)/rtl8723cs_vf_fw:system/etc/firmware/rtl8723cs_vf_fw \ $(LOCAL_PATH)/rtl8723cs_vf_config:system/etc/firmware/rtl8723cs_vf_config \ $(LOCAL_PATH)/rtl8703b_fw:system/etc/firmware/rtl8703bs_fw \ $(LOCAL_PATH)/rtl8703b_config:system/etc/firmware/rtl8703bs_config #$(TOP_DIR)device/softwinner/$(basename $(TARGET_DEVICE))/bluetooth/rtkbt.conf:system/etc/bluetooth/rtkbt.conf \ 7、默认的BSP没有加载rtl8189es Q:\r16m\rtl8189es_r16m\android\hardware\libhardware_legacy\wifi\Android.mk # realtek sdio wifi module ifeq ($(BOARD_USR_WIFI), rtl8189fs) LOCAL_CFLAGS += -DRTL_8189FS_WIFI_USED LOCAL_CFLAGS += -DRTL_WIFI_VENDOR endif # realtek sdio wifi module ifeq ($(BOARD_USR_WIFI), rtl8189es) LOCAL_CFLAGS += -DRTL_8189ES_WIFI_USED LOCAL_CFLAGS += -DRTL_WIFI_VENDOR endif Q:\r16m\rtl8189es_r16m\android\hardware\libhardware_legacy\wifi\wifi.c #elif defined RTL_8189FS_WIFI_USED /* rtl8189FS sdio wifi */ #ifndef WIFI_DRIVER_MODULE_PATH #define WIFI_DRIVER_MODULE_PATH "/system/vendor/modules/8189fs.ko" #endif #ifndef WIFI_DRIVER_MODULE_NAME #define WIFI_DRIVER_MODULE_NAME "8189fs" #endif #ifndef WIFI_DRIVER_MODULE_ARG #define WIFI_DRIVER_MODULE_ARG "ifname=wlan0 if2name=p2p0" #endif #elif defined RTL_8189ES_WIFI_USED /* rtl8189ES sdio wifi */ #ifndef WIFI_DRIVER_MODULE_PATH #define WIFI_DRIVER_MODULE_PATH "/system/vendor/modules/8189es.ko" #endif #ifndef WIFI_DRIVER_MODULE_NAME #define WIFI_DRIVER_MODULE_NAME "8189es" #endif #ifndef WIFI_DRIVER_MODULE_ARG #define WIFI_DRIVER_MODULE_ARG "ifname=wlan0 if2name=p2p0" #endif #elif defined ESPRESSIF_ESP8089_WIFI_USED /* esp8089 sdio wifi */ #ifndef WIFI_DRIVER_MODULE_PATH #define WIFI_DRIVER_MODULE_PATH "/system/vendor/modules/esp8089.ko" #endif #ifndef WIFI_DRIVER_MODULE_NAME #define WIFI_DRIVER_MODULE_NAME "esp8089" #endif #ifndef WIFI_DRIVER_MODULE_ARG #define WIFI_DRIVER_MODULE_ARG "" #endif #endif 8、WIFI+BT的驱动识别: Q:\r16m\rtl8189es_r16m\lichee\Linux-3.4\drivers\misc\rf_pm\bt_pm.c static int rfkill_set_power(void *data, bool blocked) { unsigned int mod_sel = get_rf_mod_type(); RF_MSG("rfkill set power %d\n", !blocked); switch (mod_sel){ case 2: /* ap6210 */ case 5: /* rtl8723bs */ case 7: /* ap6476 */ case 8: /* ap6330 */ case 9: /* gb9663 */ case 10: /* ap6212 */ if (!blocked) { if(bt_rst_n != -1) gpio_set_value(bt_rst_n, 1); } else { if(bt_rst_n != -1) gpio_set_value(bt_rst_n, 0); } break; default: RF_MSG("no bt module matched !!\n"); } bt_state = !blocked; msleep(10); return 0; } Q:\r16m\rtl8189es_r16m\lichee\linux-3.4\drivers\misc\rf_pm\rf_pm.c char *module_list[] = { " ", "ap6181", "ap6210", "rtl8188eu", "rtl8723au", "rtl8723bs", "esp8089", "ap6476", "ap6330", "gb9663", "ap6212", "rtl8189es" }; static int rf_pm_probe(struct platform_device *pdev) { get_module_res(); if (mod_info.num <= 0) return -1; //moduls power init switch(mod_info.num){ case 1: /* ap6181 */ case 2: /* ap6210 */ case 5: /* rtl8723bs */ case 6: /* esp8089 */ case 7: /* ap6476 */ case 8: /* ap6330 */ case 9: /* gb9663 */ case 10: /* ap6212 */ case 11: /* rtl8189es */ rf_module_power(1); break; case 3: /* rtl8188eu */ case 4: /* rtl8723au */ rf_module_power(0); break; default: rf_pm_msg("wrong module select %d !\n", mod_info.num); } //opt ap 32k if(mod_info.lpo_use_apclk && strcmp(mod_info.lpo_use_apclk, "")){ ap_32k = clk_get(NULL, mod_info.lpo_use_apclk); if (!ap_32k || IS_ERR(ap_32k)){ rf_pm_msg("get clk %s failed!\n", mod_info.lpo_use_apclk); return -1; } rf_pm_msg("set %s 32k out\n", mod_info.lpo_use_apclk); enable_ap_32k(1); } scene_lock_init(&gpio_hold_standby, SCENE_GPIO_HOLD_STANDBY, "rf_pm"); return 0; } Q:\r16m\rtl8189es_r16m\lichee\linux-3.4\drivers\misc\rf_pm\wifi_pm.c void wifi_pm_power(int on) { int mod_num = get_rf_mod_type(); int on_off = 0; if (on > 0){ on_off = 1; } else { on_off = 0; } wifi_pm_msg("wifi power %s\n", on?"on":"off"); switch(mod_num){ case 1: /* ap6181 */ case 2: /* ap6210 */ case 5: /* rtl8723bs */ case 6: /* esp8089 */ case 7: /* ap6476 */ case 8: /* ap6330 */ case 9: /* gb9663*/ case 10: /* ap6212 */ case 11: /* rtl8189es */ if (wl_info.wl_reg_on != -1) gpio_set_value(wl_info.wl_reg_on, on_off); break; case 3: /* rtl8188eu */ rf_module_power(on_off); break; case 4: /* rtl8723au */ break; default: wifi_pm_msg("wrong module select %d !\n", mod_num); } wl_info.wl_power_state = on_off; wifi_state = on_off; } EXPORT_SYMBOL(wifi_pm_power); 9、直接使用全志R16平台的parrot v1.1系统下的rtl8189es驱动代替。Android6.0.1自带的驱动貌似有问题! Q:\r16m\rtl8189es_r16m\lichee\linux-3.4\drivers\net\wireless\rtl8189es\ rootroot@rootroot-E400:~/wyb/rtl8189es_r16m$ 7za x rtl8189es_r16m验证通过20170818_1659没有外层目录.7z -r -o./ rootroot@rootroot-E400:~/wyb/rtl8189es_r16m$ cd lichee/linux-3.4/drivers/net/wireless/ rootroot@rootroot-E400:~/wyb/rtl8189es_r16m/lichee/linux-3.4/drivers/net/wireless$ rootroot@rootroot-E400:~/wyb/rtl8189es_r16m/lichee/linux-3.4/drivers/net/wireless$ rm rtl8189es -rf rootroot@rootroot-E400:~/wyb/rtl8189es_r16m/lichee/linux-3.4/drivers/net/wireless$ tar zxvf rtl8189es4.tar.gz 10、可选操作:为了调试方便 Q:\r16m\rtl8189es_r16m\lichee\tools\pack\chips\sun8iw5p1\configs\default\env.cfg #kernel command arguments console=ttyS0,115200 nand_root=/dev/nandd mmc_root=/dev/mmcblk0p7 init=/init loglevel=8 #set kernel cmdline if boot.img or recovery.img has no cmdline we will use this setargs_nand=setenv bootargs console=${console} root=${nand_root} init=${init} ion_cma_list="120m,256m" loglevel=${loglevel} partitions=${partitions} setargs_mmc=setenv bootargs console=${console} root=${mmc_root} init=${init} ion_cma_list="120m,256m" loglevel=${loglevel} partitions=${partitions} #nand command syntax: sunxi_flash read address partition_name read_bytes #0x40007800 = 0x40008000(kernel entry) - 0x800(boot.img header 2k) boot_normal=sunxi_flash read 40007800 boot;boota 40007800 boot_recovery=sunxi_flash read 40007800 recovery;boota 40007800 boot_fastboot=fastboot #recovery key recovery_key_value_max=0x13 recovery_key_value_min=0x10 #fastboot key fastboot_key_value_max=0x8 fastboot_key_value_min=0x2 #uboot system env config bootdelay=3 #default bootcmd, will change at runtime according to key press bootcmd=run setargs_nand boot_normal#default nand boot 11、 Q:\r16m\rtl8189es_r16m\lichee\tools\pack\chips\sun8iw5p1\configs\evb-30\sys_config.fex ;--------------------------------------------------------------------------------------------------------- ; wakeup_src_para: ; sometimes, u would like to add more wakeup src in standby mode, these para will be ; help; ; u need to make sure the standby mode support the wakeup src. Also, some hw ; condition must be guaranteed. ; including: ; cpu_en: power on or off. ; 1: mean power on ; 0: mean power off ; cpu_freq: indicating lowest freq. unit is Mhz; ; dram selfresh_en: selfresh or not. ; 1: enable enter selfresh ; 0: disable enter selfresh ; dram_pll: if not enter selfresh, indicating lowest freq. unit is Mhz; ; wakeup_src: to make the scenario work, the wakeup src is needed. ;--------------------------------------------------------------------------------------------------------- [wakeup_src_para] cpu_en = 0 cpu_freq = 48 ; (cpu:apb:ahb) pll_ratio = 0x111 dram_selfresh_en= 1 dram_freq = 36 wakeup_src_wl = port:PL07<4><default><default><0> ;wakeup_src_bt = port:PL09<4><default><default><0> bb_wake_ap = port:PL02<4><default><default><0> ;-------------------------------------------------------------------------------- ;wifi/bt/fm/gps/nfc modules configuration ;module_num: ; 0- none ; 1- ap6181(wifi) ; 2- ap6210/ap6212(wifi+bt) ; 3- rtl8188eu(wifi) ; 4- rtl8723au(wifi+bt) ; 5- rtl8723bs/rtl8723bs-vq0(wifi+bt) ; 6- esp8089(wifi) ; 7- ap6476(wifi+bt+fm+gps) ; 8- ap6330(wifi+bt+fm) ; 9- gb9663(wifi+bt+fm) ; 10- ap6212(wifi+bt) ; 11- rtl8189es(wifi) ;module_power1: ""- bat, "axp_dldo1"- axp dldo1 ;module_power1_vol: power1 voltage, mv; not used for module_power1 is "" ;module_power2: ""- bat, "axp_dldo2"- axp dldo2 ;module_power2_vol: power2 voltage, mv; not used for module_power2 is "" ;module_power3: ""- bat, "axp_dldo2"- axp dldo2 ;module_power3_vol: power3 voltage, mv; not used for module_power3 is "" ;power_switch: module power switch io when bat supply ;chip_en: enable chip io ;lpo_use_apclk: ""- not use, "losc_out"- a23/33, "ac10032k1"?"ac10032k2"?"ac10032k3"- a80/a83 ;-------------------------------------------------------------------------------- [rf_para] module_num = 11 module_power1 = "axp22_dldo1" module_power1_vol = 3300000 module_power2 = "axp22_dldo2" module_power2_vol = 3300000 module_power3 = "axp22_aldo1" module_power3_vol = 3300000 power_switch = chip_en = lpo_use_apclk = "losc_out" ;-------------------------------------------------------------------------------- ;wifi configuration ;wifi_used: 0-not use, 1- use ;wifi_sdc_id: 0- SDC0, 1- SDC1, 2- SDC2, 3- SDC3 ;wifi_usbc_id: 0- USB0, 1- USB1, 2- USB2 ;wifi_usbc_type: 1- EHCI(speed 2.0), 2- OHCI(speed 1.0) ;wl_reg_on: wifi function enable io ;wl_host_wake: wifi device wake-up host ;wl_host_wake_invert: whether wl_host_wake use inverter between ap and module ; 0: not used, 1: used ;-------------------------------------------------------------------------------- [wifi_para] wifi_used = 1 wifi_sdc_id = 1 wifi_usbc_id = 1 wifi_usbc_type = 1 wl_reg_on = port:PL06<1><default><default><0> wl_host_wake = port:PL07<4><default><default><0> rtl8189es_host_wake = port:PL07<4><default><default><0> wl_host_wake_invert = 0 ;-------------------------------------------------------------------------------- ;bluetooth configuration ;bt_used: 0- no used, 1- used ;bt_uard_id: 0- uart0, 1- uart1, 2- uart2 ;bt_rst_n: bt function enable io ;bt_wake: host wake-up bluetooth device ;bt_wak_host: bt device wake-up host ;bt_host_wake_invert: whether bt_host_wake use inverter between ap and module ; 0: not used, 1: used ;-------------------------------------------------------------------------------- [bt_para] bt_used = 0 ;bt_uart_id = 1 ;bt_rst_n = port:PL08<1><default><default><0> ;bt_wake = port:PL10<1><default><default><0> ;bt_host_wake = port:PL09<4><default><default><0> ;bt_host_wake_invert = 0 power_start = 3 pmu_temp_enable = 0
### 回答1: 全志A33是全志科技推出的一款低功耗、高性能的32位ARM Cortex-A7处理器,适用于智能穿戴设备、智能音箱、平板电脑等场景。Debian是一种常用的Linux操作系统,具有丰富的应用程序和强大的系统设置。全志A33 Debian固件就是将Debian操作系统移植全志A33处理器上的一种固件,能够将全志A33处理器变成一台类似于电脑的设备。 使用全志A33 Debian固件可以实现如下功能: 1.运行普通PC上的应用程序 2.连接外部设备,如键盘、鼠标、外置硬盘等 3.使用缺省的GNOME桌面环境,支持多任务和多用户功能 4.支持浏览器、邮件客户端、媒体播放器等应用程序 5.通过SSH协议进行远程登录和管理 6.充分利用全志A33的性能,提供比其他嵌入式解决方案更好的用户体验。 总之,全志A33 Debian固件可以大大提高全志A33处理器的实用性和灵活性,使用户可以在嵌入式系统中获得更多的多媒体、游戏、互联网等方面的体验。 ### 回答2: 全志a33处理器是一款广泛应用于智能电视、平板电脑、智能家居等领域的芯片,它采用ARM Cortex A7结构设计,能够提供快速稳定的性能表现。而Debian固件则是为这种处理器开发的一种系统镜像,它基于Debian操作系统开发,兼具稳定性和开放性。 Debian固件的开源性和普适性让其成为软件开发者的首选,这个系统可以让用户享受到更多的开发自由度和DIY空间。而全志a33芯片的流行,也带来了对其能否支持Debian固件的讨论。经过不断的努力,目前已经可以使用全志a33 Debian固件来打造更高效的智能设备了。 使用全志a33 Debian固件,用户可以利用安装包管理器和便捷的命令行方式来自由控制系统,开发维护更加灵活自在。此外,全志a33 Debian固件也内置了大量的软件库和应用支持,帮助开发人员快速构建想要的功能。这种固件还支持多系统同时运行,方便用户在一个设备上运行不同版本的应用程序,提升了设备的效率和兼容性。 综上所述,全志a33 Debian固件是一种功能齐全、兼具可靠性和自由性的系统,众多开发者和用户都对其有很高的期望。相信随着技术和市场的不断变化,这种固件也将会展现更加出色的表现。 ### 回答3: 全志A33是一款低功耗、高性能的ARM Cortex-A7处理器,广泛用于平板电脑、智能家居、智能设备等领域。其中,Debian固件指的是以Debian Linux作为基础系统的固件。 全志A33 Debian固件的优势在于可以利用Debian社区的广泛资源和软件包,为用户提供更加丰富和稳定的软件支持。此外,Debian固件还可以定制化,用户可以根据实际需求选择安装所需要的软件和服务,而不必依赖于预装软件包。 但是,全志A33 Debian固件也存在一些不足之处。首先,由于Debian系统的安全性要求较高,因此对硬件的要求也相应升高,需要支持的硬件也较多,这可能会导致部分硬件不兼容而无法使用。其次,Debian固件相对于定制化的固件来说,开发难度和复杂度都较高,对开发者的技术水平和精力要求也较高。 综上所述,全志A33 Debian固件相对于其他定制化固件来说,拥有更加丰富和稳定的软件支持和更多的可定制化功能,同时也存在一些不足之处需要用户和开发者注意。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值