下载 >  移动开发 >  Android > dp18_ap6330整理完工20170209_1129.7z

dp18_ap6330整理完工20170209_1129.7z

2017-02-09 上传大小:105KB
r18_ap6330的步骤.txt
2017/2/9 10:47 开始整理


原始SDK默认配置为rtl8723bs,现在要修改为:AP6330。
硬件平台:全志R18。
开发板:DP-18
SDK:Android6.0.1/Linux3.10.65(v2.1版本,发布日期20161008)
WIFI测试需要支持5.8G的AP来测试。BT用普通的Android手机发送图片即可。


1、请严重注意全志R18的架构选择:ARCH=arm64
rootroot@cm-System-Product-Name:/home/wwt/dp18_ap6330/lichee/linux-3.10$ 
rootroot@cm-System-Product-Name:/home/wwt/dp18_ap6330/lichee/linux-3.10$ make ARCH=arm64 menuconfig
rootroot@cm-System-Product-Name:/home/wwt/dp18_ap6330/lichee/linux-3.10$ 

WIFI部分可以关闭realtek:
Device Drivers  --->
	[*] Network device
                             support  --->
		[*]   Wireless LAN  --->
			< >   Realtek 8723B SDIO or SPI WiFi
			< >   Realtek 8723BS_VQ0 WiFi
			< >   Realtek 8189F SDIO WiFi
			< >   Realtek 8723C SDIO or SPI WiFi
可以配置内核打印级别为18(默认为17?)
General setup  --->
	(18) Kernel log buffer size (16 => 64KB, 17 => 128KB)



2、
Z:\home\wwt\dp18_ap6330\android\device\softwinner\tulip-d1\BoardConfig.mk
关闭这里:
# BOARD_WIFI_VENDOR := realtek

打开这里:
BOARD_WIFI_VENDOR := broadcom


蓝牙的修改:
##BOARD_HAVE_BLUETOOTH_BCM := true
BOARD_HAVE_BLUETOOTH_NAME := rtl8723bs_vq0
BOARD_HAVE_BLUETOOTH_RTK_COEX := true
BOARD_HAVE_BLUETOOTH_RTK := true
BLUETOOTH_HCI_USE_RTK_H5 := true
修改为:
BOARD_HAVE_BLUETOOTH_BCM := true
BOARD_HAVE_BLUETOOTH_NAME := ap6330
#BOARD_HAVE_BLUETOOTH_NAME := rtl8723bs_vq0
#BOARD_HAVE_BLUETOOTH_RTK_COEX := true
#BOARD_HAVE_BLUETOOTH_RTK := true
#BLUETOOTH_HCI_USE_RTK_H5 := true




3、
Z:\home\wwt\dp18_ap6330\android\device\softwinner\tulip-d1\init.sun50iw1p1.rc
蓝牙部分:
	#bluesleep
    insmod /system/vendor/modules/rtl_btlpm.ko
修改为:
	#bluesleep
    #insmod /system/vendor/modules/rtl_btlpm.ko

    #network
    insmod /system/vendor/modules/bcmdhd.ko
    insmod /system/vendor/modules/bcm_btlpm.ko


WIFI部分:
关闭这里:
# 1. realtek & eagle wifi service
# 1.1 realtek & eagle 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

# 1.2 realtek & eagle wifi sta p2p concurrent service
service p2p_supplicant /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 \
    -I/system/etc/wifi/wpa_supplicant_overlay.conf \
    -O/data/misc/wifi/sockets \
    -g@android:wpa_wlan0
    class main
    socket wpa_wlan0 dgram 660 wifi wifi
    disabled
    oneshot


打开这里:
#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 \
    -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
    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/p2p_supplicant_overlay.conf \
    -puse_p2p_group_interface=1p2p_device=1use_multi_chan_concurrent=1 \
    -m/data/misc/wifi/p2p_supplicant.conf \
    -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
    class main
    socket wpa_wlan0 dgram 660 wifi wifi
    disabled
    oneshot




4、
Z:\home\wwt\dp18_ap6330\android\device\softwinner\tulip-d1\tulip_d1.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.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 \
    frameworks/native/data/etc/android.software.verified_boot.xml:system/etc/permissions/android.software.verified_boot.xml
    frameworks/native/data/etc/android.hardware.ethernet.xml:system/etc/permissions/android.hardware.ethernet.xml
(在这里增加:)
PRODUCT_COPY_FILES += \
    device/softwinner/tulip-d1/bluetooth/bt_vendor.conf:system/etc/bluetooth/bt_vendor.conf




5、2.4G/5.8G的WIFI双频段的支持:
Z:\home\wwt\dp18_ap6330\android\device\softwinner\tulip-d1\overlay\frameworks\base\core\res\res\values\config.xml
    <!-- Boolean indicating whether the wifi chipset has dual frequency band support -->
    <bool translatable="false" name="config_wifi_dual_band_support">false</bool>
修改为:
    <!-- Boolean indicating whether the wifi chipset has dual frequency band support -->
    <bool translatable="false" name="config_wifi_dual_band_support">true</bool>




6、
Z:\home\wwt\dp18_ap6330\android\device\softwinner\tulip-d1\bluetooth\vnd_tulip-d1.txt
BLUETOOTH_UART_DEVICE_PORT = "/dev/ttyS1"
FW_PATCHFILE_LOCATION = "/etc/firmware/"
UART_TARGET_BAUD_RATE = 1500000
BT_WAKE_VIA_PROC = TRUE
LPM_IDLE_TIMEOUT_MULTIPLE = 5
BTVND_DBG = TRUE
BTHW_DBG = TRUE
VNDUSERIAL_DBG = TRUE
UPIO_DBG = TRUE
SCO_PCM_IF_CLOCK_RATE = 2

修改为(最后一定要记住换一行,否则会出错):
#Set baudrate to 1500000
UART_TARGET_BAUD_RATE=1500000
BLUETOOTH_UART_DEVICE_PORT = "/dev/ttyS1"
FW_PATCHFILE_LOCATION = "/system/vendor/modules/"
LPM_IDLE_TIMEOUT_MULTIPLE = 5
#LPM_SLEEP_MODE = FALSE
BT_WAKE_VIA_PROC = TRUE
BTVND_DBG = TRUE
BTHW_DBG = TRUE
VNDUSERIAL_DBG = TRUE
UPIO_DBG = TRUE


如果最后不换一行,编译报错:
out/target/product/tulip-d1/obj_arm/SHARED_LIBRARIES/libbt-vendor_intermediates/vnd_buildcfg.h:2:0: error: unterminated #ifndef
 #ifndef _VND_BUILDCFG_H
 ^
Host Clang TableGen: llvm-rs-cc (gen-clang-comment-command-list) <= external/clang/include/clang/AST/CommentCommands.td
In file included from hardware/broadcom/libbt/include/bt_vendor_brcm.h:34:0,
                 from hardware/broadcom/libbt/src/upio.c:36:
out/target/product/tulip-d1/obj_arm/SHARED_LIBRARIES/libbt-vendor_intermediates/vnd_buildcfg.h:2:0: error: unterminated #ifndef
 #ifndef _VND_BUILDCFG_H
 ^
In file included from hardware/broadcom/libbt/include/bt_vendor_brcm.h:34:0,
                 from hardware/broadcom/libbt/src/userial_vendor.c:35:
out/target/product/tulip-d1/obj_arm/SHARED_LIBRARIES/libbt-vendor_intermediates/vnd_buildcfg.h:2:0: error: unterminated #ifndef
 #ifndef _VND_BUILDCFG_H
 ^
out/target/product/tulip-d1/obj_arm/SHARED_LIBRARIES/libbt-vendor_intermediates/vnd_buildcfg.h:12:24: error: missing binary operator before token "#"
 #define UPIO_DBG   TRUE#endif
                        ^
hardware/broadcom/libbt/src/upio.c:48:6: note: in expansion of macro 'UPIO_DBG'
 #if (UPIO_DBG == TRUE)
      ^
Host Clang TableGen: llvm-rs-cc (gen-clang-comment-nodes) <= external/clang/include/clang/Basic/CommentNodes.td
hardware/broadcom/libbt/src/upio.c: In function 'proc_btwrite_timeout':
hardware/broadcom/libbt/src/upio.c:194:47: warning: unused parameter 'arg' [-Wunused-parameter]
 static void proc_btwrite_timeout(union sigval arg)
                                               ^
make: *** [out/target/product/tulip-d1/obj_arm/SHARED_LIBRARIES/libbt-vendor_intermediates/src/bt_vendor_brcm.o] 错误 1
make: *** 正在等待未完成的任务....
hardware/broadcom/libbt/src/userial_vendor.c: In function 'userial_vendor_ioctl':
hardware/broadcom/libbt/src/userial_vendor.c:351:63: warning: unused parameter 'p_data' [-Wunused-parameter]
 void userial_vendor_ioctl(userial_vendor_ioctl_op_t op, void *p_data)
                                                               ^
hardware/broadcom/libbt/src/userial_vendor.c: In function 'userial_set_port':
hardware/broadcom/libbt/src/userial_vendor.c:386:28: warning: unused parameter 'p_conf_name' [-Wunused-parameter]
 int userial_set_port(char *p_conf_name, char *p_conf_value, int param)
                            ^
hardware/broadcom/libbt/src/userial_vendor.c:386:65: warning: unused parameter 'param' [-Wunused-parameter]
 int userial_set_port(char *p_conf_name, char *p_conf_value, int param)
                                                                 ^
In file included from hardware/broadcom/libbt/include/bt_vendor_brcm.h:34:0,
                 from hardware/broadcom/libbt/src/hardware.c:44:
out/target/product/tulip-d1/obj_arm/SHARED_LIBRARIES/libbt-vendor_intermediates/vnd_buildcfg.h:2:0: error: unterminated #ifndef
 #ifndef _VND_BUILDCFG_H
 ^
hardware/broadcom/libbt/src/upio.c: In function 'upio_set':
hardware/broadcom/libbt/src/upio.c:360:52: warning: unused parameter 'polarity' [-Wunused-parameter]
 void upio_set(uint8_t pio, uint8_t action, uint8_t polarity)
                                                    ^
make: *** [out/target/product/tulip-d1/obj_arm/SHARED_LIBRARIES/libbt-vendor_intermediates/src/userial_vendor.o] 错误 1
Host Clang TableGen: llvm-rs-cc (gen-clang-diags-defs -clang-component=Common) <= external/clang/include/clang/Basic/Diagnostic.td
make: *** [out/target/product/tulip-d1/obj_arm/SHARED_LIBRARIES/libbt-vendor_intermediates/src/upio.o] 错误 1
In file included from hardware/broadcom/libbt/include/bt_vendor_brcm.h:34:0,
                 from hardware/broadcom/libbt/src/conf.c:32:
out/target/product/tulip-d1/obj_arm/SHARED_LIBRARIES/libbt-vendor_intermediates/vnd_buildcfg.h:2:0: error: unterminated #ifndef
 #ifndef _VND_BUILDCFG_H
 ^
hardware/broadcom/libbt/src/hardware.c: In function 'hw_set_patch_file_path':
hardware/broadcom/libbt/src/hardware.c:1496:34: warning: unused parameter 'p_conf_name' [-Wunused-parameter]
 int hw_set_patch_file_path(char *p_conf_name, char *p_conf_value, int param)
                                  ^
hardware/broadcom/libbt/src/hardware.c:1496:71: warning: unused parameter 'param' [-Wunused-parameter]
 int hw_set_patch_file_path(char *p_conf_name, char *p_conf_value, int param)
                                                                       ^
hardware/broadcom/libbt/src/hardware.c: In function 'hw_set_patch_file_name':
hardware/broadcom/libbt/src/hardware.c:1514:34: warning: unused parameter 'p_conf_name' [-Wunused-parameter]
 int hw_set_patch_file_name(char *p_conf_name, char *p_conf_value, int param)
                                  ^
hardware/broadcom/libbt/src/hardware.c:1514:71: warning: unused parameter 'param' [-Wunused-parameter]
 int hw_set_patch_file_name(char *p_conf_name, char *p_conf_value, int param)
                                                                       ^
make: *** [out/target/product/tulip-d1/obj_arm/SHARED_LIBRARIES/libbt-vendor_intermediates/src/conf.o] 错误 1
make: *** [out/target/product/tulip-d1/obj_arm/SHARED_LIBRARIES/libbt-vendor_intermediates/src/hardware.o] 错误 1

#### make failed to build some targets (39:16 (mm:ss)) ####

rootroot@cm-System-Product-Name:/home/wwt/dp18_ap6330/android$ 
rootroot@cm-System-Product-Name:/home/wwt/dp18_ap6330/android$ 
rootroot@cm-System-Product-Name:/home/wwt/dp18_ap6330/android$ find . -name vnd_buildcfg.h
./hardware/realtek/bluetooth/libbt-vendor/include/vnd_buildcfg.h
./out/target/product/tulip-d1/obj_arm/SHARED_LIBRARIES/libbt-vendor_intermediates/vnd_buildcfg.h
./out/target/product/tulip-d1/gen/SHARED_LIBRARIES/libbt-vendor_intermediates/vnd_buildcfg.h
rootroot@cm-System-Product-Name:/home/wwt/dp18_ap6330/android$ diff hardware/realtek/bluetooth/libbt-vendor/include/vnd_buildcfg.h out/target/product/tulip-d1/obj_arm/SHARED_LIBRARIES/libbt-vendor_intermediates/vnd_buildcfg.h
0a1
> /* Auto-generated from device/softwinner/tulip-d1/bluetooth/vnd_tulip-d1.txt on 2017年 02月 09日 星期四 08:44:42 CST */
2a4
> #define UART_TARGET_BAUD_RATE 1500000
4c6
< #define FW_PATCHFILE_LOCATION   "/etc/firmware/"
---
> #define FW_PATCHFILE_LOCATION   "/system/vendor/modules/"
6c8
< #define SCO_USE_I2S_INTERFACE   TRUE
---
> #define BT_WAKE_VIA_PROC   TRUE
10,11c12
< #define UPIO_DBG   TRUE
< #endif
---
> #define UPIO_DBG   TRUE#endif
rootroot@cm-System-Product-Name:/home/wwt/dp18_ap6330/android$ cp out/target/product/tulip-d1/obj_arm/SHARED_LIBRARIES/libbt-vendor_intermediates/vnd_buildcfg.h .
rootroot@cm-System-Product-Name:/home/wwt/dp18_ap6330/android$ cp hardware/realtek/bluetooth/libbt-vendor/include/vnd_buildcfg.h h2.h
rootroot@cm-System-Product-Name:/home/wwt/dp18_ap6330/android$ 




7、5.7 bt_vendor.conf(请新建这个文件)
Z:\home\wwt\dp18_ap6330\android\device\softwinner\tulip-d1\bluetooth\bt_vendor.conf
# UART device port where Bluetooth controller is attached
UartPort = /dev/ttyS1

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

#Firmware name
FwPatchFileName = bcm40183b2.hcd




8、5.8 bdroid_buildcfg.h
Z:\home\wwt\dp18_ap6330\android\device\softwinner\tulip-d1\bluetooth\bdroid_buildcfg.h

#define BTA_DM_COD {0x1A, 0x01, 0x1C}
修改为:
#define BTA_DM_COD {0x1A, 0x01, 0x14}

#define BTIF_HF_SERVICE_NAMES  { BTIF_HSAG_SERVICE_NAME, NULL }
修改为:
#define BTIF_HF_SERVICE_NAMES  { BTIF_HSAG_SERVICE_NAME }




9、5.9 sys_config.fex
Z:\home\wwt\dp18_ap6330\lichee\tools\pack\chips\sun50iw1p1\configs\d1\sys_config.fex
;--------------------------------------------------------------------------------
;wlan configuration
;wlan_used:         0-not use, 1- use
;wlan_busnum:       sdio/usb index
;clocks:            external low power clock input (32.768KHz)
;wlan_power:        input supply voltage
;wlan_io_regulator: wlan/sdio I/O voltage
;wlan_regon:        power up/down internal regulators used by wifi section
;wlan_hostwake:     wlan to wake-up host
;--------------------------------------------------------------------------------
[wlan]
wlan_used           = 1
wlan_busnum         = 1
;clocks              =
(根据手册增加)
wlan_power          = "vcc-wifi"
wlan_io_regulator   = "vcc-wifi-io"
wlan_regon          = port:PL02<1><default><default><0>
wlan_hostwake       = port:PL03<6><default><default><0>

;--------------------------------------------------------------------------------
;bluetooth configuration
;bt_used:           0- no used, 1- used
;clocks:            external low power clock input (32.768KHz)
;bt_power:          input supply voltage       
;bt_io_regulator:   bluetooth I/O voltage
;bt_rst_n:          power up/down internal regulators used by BT section
;--------------------------------------------------------------------------------
[bt]
bt_used             = 1
clocks              =
(根据手册增加)
bt_power            = "vcc-wifi"
bt_io_regulator     = "vcc-wifi-io"
bt_rst_n            = port:PL04<1><default><default><0>




可选更改:
10、
Z:\home\wwt\dp18_ap6330\lichee\tools\pack\chips\sun50iw1p1\configs\default\env.cfg
修改为:
bootdelay=3

uboot在引导进内核的时候延时3秒钟。




11、如果编译不过,可以直接在hardware中关闭realtek的编译选项:Android.mk(改名处理)
Z:\home\wwt\dp18_ap6330\android\hardware\realtek\Android_bak.mk

Z:\home\wwt\dp18_ap6330\android\hardware\realtek\bluetooth\Android.mk(改名处理)
ifeq ($(BOARD_HAVE_BLUETOOTH_RTK),true)
修改为:
ifeq ($(BOARD_HAVE_BLUETOOTH_RTK),false)                        
...展开收缩
综合评分:0
开通VIP 立即下载

评论共有0条

 

VIP会员动态

0 1 2
关闭
img

spring mvc+mybatis+mysql+maven+bootstrap 整合实现增删查改简单实例.zip

资源所需积分/C币 当前拥有积分 当前拥有C币
5 0 0
点击完成任务获取下载码
输入下载码
为了良好体验,不建议使用迅雷下载
img

dp18_ap6330整理完工20170209_1129.7z

会员到期时间: 剩余下载个数: 剩余C币: 剩余积分:0
为了良好体验,不建议使用迅雷下载
VIP下载
您今日下载次数已达上限(为了良好下载体验及使用,每位用户24小时之内最多可下载20个资源)

积分不足!

资源所需积分/C币 当前拥有积分
您可以选择
开通VIP
4000万
程序员的必选
600万
绿色安全资源
现在开通
立省522元
或者
购买C币兑换积分 C币抽奖
img

资源所需积分/C币 当前拥有积分 当前拥有C币
5 4 45
为了良好体验,不建议使用迅雷下载
确认下载
img

资源所需积分/C币 当前拥有积分 当前拥有C币
5 0 0
为了良好体验,不建议使用迅雷下载
开通VIP
img

资源所需积分/C币 当前拥有积分 当前拥有C币
5 4 45
您的积分不足,将扣除 10 C币
为了良好体验,不建议使用迅雷下载
确认下载
下载
无法举报自己的资源

兑换成功

你当前的下载分为234开始下载资源
你还不是VIP会员
开通VIP会员权限,免积分下载
立即开通

你下载资源过于频繁,请输入验证码

您因违反CSDN下载频道规则而被锁定帐户,如有疑问,请联络:webmaster@csdn.net!

举报

若举报审核通过,可返还被扣除的积分

  • 举报人:
  • 被举报人:
  • 举报的资源分:
  • *类型:
  • *详细原因: