ANDROID之后没有UART输出kernel log的情况

adb shell aee -k 8

 #define CFG_UART_LOG            (UART1) 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 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
调通sina33下的AP6212A0版本的BT 大文实验室/大文哥 壹捌陆捌零陆捌捌陆捌贰 wb4916 AT qq.com 完成时间:2017/6/26 11:01 版本:V1.0 本文参照: 《A33 wifi移植说明书.pdf》 还有就是全志R16的parrotv1.1的官方SDK(Android4.4.2) 1、打开AP6212的BT,关闭rtl8723bs的BT: [ 3.141273] Bluetooth: HCI UART driver ver 2.2 [ 3.146210] Bluetooth: HCI H4 protocol initialized [ 3.151563] Bluetooth: HCI BCSP protocol initialized [ 3.157154] usbcore: registered new interface driver btusb [ 3.163282] Bluetooth: Generic Bluetooth SDIO driver ver 0.1 [ 3.169599] Bluetooth: BlueSleep Mode Driver Ver 1.1 [ 3.175402] Bluetooth: get rtl8723bs rtl8723bs_bt_host_wake gpio failed [ 3.953017] Bluetooth: RFCOMM TTY layer initialized [ 3.958456] Bluetooth: RFCOMM socket layer initialized [ 3.964183] Bluetooth: RFCOMM ver 1.11 [ 3.968340] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 3.968638] [mmc]: sdc2 set ios: clk 25000000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 3.968734] [mmc]: mclk 0xf1c20090 0xc100000b [ 3.989421] Bluetooth: BNEP filters: protocol multicast [ 3.995242] Bluetooth: HIDP (Human Interface Emulation) ver 1.2 [ 4.001921] L2TP core driver, V2.0 [ 4.005706] PPPoL2TP kernel driver, V2.0 [ 4.010070] L2TP IP encapsulation support (L2TPv3) [ 4.015468] L2TP netlink interface [ 4.019264] L2TP ethernet pseudowire support (L2TPv3) [ 4.023860] [mmc]: sdc2 set ios: clk 25000000Hz bm PP pm ON vdd 3.3V width 1 timing MMC-HS(SDR20) dt B [ 4.023929] [mmc]: mclk 0xf1c20090 0xc100000b [ 4.040272] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5 [ 4.048780] ThumbEE CPU extension supported. [ 4.053550] Registering SWP/SWPB emulation handler [ 4.059269] [rfkill]: rfkill set power 1 [ 4.063652] gpio ap6xxx_bt_regon set val 0, act val 0 rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r$ ll rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ ./build.sh config Welcome to mkscript setup progress All available chips: 0. sun8iw5p1 Choice: 0 All available platforms: 0. android 1. dragonboard 2. linux Choice: 0 All available kernel: 0. linux-3.4 Choice: 0 All available boards: 0. evb 1. maple 2. redwood 3. y2 4. y3 Choice: 4 rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ cd linux-3.4/ rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4$ make ARCH=arm menuconfig [*] Networking support ---> <*> Bluetooth subsystem support ---> Bluetooth device drivers ---> < > Broadcom Bluetooth Low Power Manager Support <*> Realtek Bluesleep driver support 修改为: <*> Broadcom Bluetooth Low Power Manager Support < > An inverter between bt hostwake pin and cpu (NEW) < > Realtek Bluesleep driver support 2、(这个不修改:) R:\wyb\ap6212a0_a33_sc3817r\android\device\softwinner\astar-y3\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> <!-- 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> 3、 R:\wyb\ap6212a0_a33_sc3817r\android\device\softwinner\astar-y3\astar_y3.mk # ap6181/6210/6330 sdio wifi fw and nvram #$(call inherit-product-if-exists, hardware/broadcom/wlan/firmware/ap6181/device-bcm.mk) #$(call inherit-product-if-exists, hardware/broadcom/wlan/firmware/ap6210/device-bcm.mk) $(call inherit-product-if-exists, hardware/broadcom/wlan/firmware/ap6212/device-bcm.mk) #$(call inherit-product-if-exists, hardware/broadcom/wlan/firmware/ap6330/device-bcm.mk) #rtl8723bs bt fw and config #$(call inherit-product, hardware/realtek/bluetooth/rtl8723bs/firmware/rtlbtfw_cfg.mk) # camera config for camera detector #PRODUCT_COPY_FILES += \ # device/softwinner/astar-y3/hawkview/sensor_list_cfg.ini:system/etc/hawkview/sensor_list_cfg.ini #add gms features #PRODUCT_COPY_FILES += \ # frameworks/native/data/etc/android.hardware.faketouch.xml:system/etc/permissions/android.hardware.faketouch.xml \ # frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \ # frameworks/native/data/etc/android.hardware.usb.host.xml:system/etc/permissions/android.hardware.usb.host.xml # 3G Data Card Packages #PRODUCT_PACKAGES += \ # u3gmonitor \ # chat \ # rild \ # pppd # 3G Data Card Configuration Flie #PRODUCT_COPY_FILES += \ # device/softwinner/polaris-common/rild/ip-down:system/etc/ppp/ip-down \ # device/softwinner/polaris-common/rild/ip-up:system/etc/ppp/ip-up \ # device/softwinner/polaris-common/rild/3g_dongle.cfg:system/etc/3g_dongle.cfg \ # device/softwinner/polaris-common/rild/usb_modeswitch:system/bin/usb_modeswitch \ # device/softwinner/polaris-common/rild/call-pppd:system/xbin/call-pppd \ # device/softwinner/polaris-common/rild/usb_modeswitch.sh:system/xbin/usb_modeswitch.sh \ # device/softwinner/polaris-common/rild/apns-conf_sdk.xml:system/etc/apns-conf.xml \ # device/softwinner/polaris-common/rild/libsoftwinner-ril.so:system/lib/libsoftwinner-ril.so #PRODUCT_COPY_FILES += \ # device/softwinner/polaris-common/rild/init.3gdongle.rc:root/init.sunxi.3gdongle.rc # 3G Data Card usb modeswitch File #PRODUCT_COPY_FILES += \ # $(call find-copy-subdir-files,*,device/softwinner/polaris-common/rild/usb_modeswitch.d,system/etc/usb_modeswitch.d) PRODUCT_PROPERTY_OVERRIDES += \ ro.sw.embeded.telephony = false PRODUCT_PROPERTY_OVERRIDES += \ persist.sys.timezone=Asia/Shanghai \ persist.sys.language=zh \ persist.sys.country=CN PRODUCT_PACKAGES += Bluetooth #PRODUCT_PROPERTY_OVERRIDES += \ # ro.product.8723b_bt.used=true #GPS Feature #PRODUCT_PACKAGES += gps.polaris #BOARD_USES_GPS_TYPE := simulator #PRODUCT_COPY_FILES += frameworks/native/data/etc/android.hardware.location.xml:system/etc/permissions/android.hardware.location.xml # evb logger PRODUCT_COPY_FILES += \ device/softwinner/astar-y3/tools/logger.sh:system/bin/logger.sh PRODUCT_PROPERTY_OVERRIDES += \ persist.sys.usb.config=mass_storage,adb \ ro.adb.secure=0 ro.udisk.lable=Polaris \ ro.font.scale=1.0 \ ro.hwa.force=false \ rw.logger=0 \ ro.sys.bootfast=true \ debug.hwc.showfps=0 \ debug.hwui.render_dirty_regions=false #ro.sys.storage_type = emulated \ #for gms #PRODUCT_PROPERTY_OVERRIDES += \ # ro.sys.mutedrm=true \ # ro.adb.secure=1 PRODUCT_PROPERTY_OVERRIDES += \ ro.sf.lcd_density=213 \ ro.product.firmware=v2.0 $(call inherit-product-if-exists, device/softwinner/astar-y3/modules/modules.mk) DEVICE_PACKAGE_OVERLAYS := device/softwinner/astar-y3/overlay PRODUCT_CHARACTERISTICS := tablet # Overrides PRODUCT_AAPT_CONFIG := xlarge hdpi xhdpi large PRODUCT_AAPT_PREF_CONFIG := xhdpi PRODUCT_BRAND := Allwinner PRODUCT_NAME := astar_y3 PRODUCT_DEVICE := astar-y3 PRODUCT_MODEL := QUAD-CORE A33 y3 PRODUCT_MANUFACTURER := softwinner #include device/softwinner/polaris-common/prebuild/google/products/gms_base.mk 4、 R:\wyb\ap6212a0_a33_sc3817r\android\device\softwinner\astar-y3\BoardConfig.mk # wifi and bt configuration # 1. Wifi Configuration # 1.1 realtek wifi support # 1.1 realtek wifi configuration #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 SW_BOARD_USR_WIFI := rtl8188eu BOARD_WLAN_DEVICE := rtl8188eu #SW_BOARD_USR_WIFI := rtl8723au #BOARD_WLAN_DEVICE := rtl8723au #SW_BOARD_USR_WIFI := rtl8723bs #BOARD_WLAN_DEVICE := rtl8723bs 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" #SW_BOARD_USR_WIFI := AP6181 #SW_BOARD_USR_WIFI := AP6210 #WIFI_DRIVER_FW_PATH_STA := "/system/vendor/modules/fw_bcm40181a2.bin" #WIFI_DRIVER_FW_PATH_P2P := "/system/vendor/modules/fw_bcm40181a2_p2p.bin" #WIFI_DRIVER_FW_PATH_AP := "/system/vendor/modules/fw_bcm40181a2_apsta.bin" # 2017/6/21 15:11 wenyuanbo configure ap6212 use ap6210 SW_BOARD_USR_WIFI := AP6212 WIFI_DRIVER_FW_PATH_STA := "/system/vendor/modules/fw_bcm43438a0.bin" WIFI_DRIVER_FW_PATH_P2P := "/system/vendor/modules/fw_bcm43438a0_p2p.bin" WIFI_DRIVER_FW_PATH_AP := "/system/vendor/modules/fw_bcm43438a0_apsta.bin" #SW_BOARD_USR_WIFI := AP6330 #WIFI_DRIVER_FW_PATH_STA := "/system/vendor/modules/fw_bcm40183b2_ag.bin" #WIFI_DRIVER_FW_PATH_P2P := "/system/vendor/modules/fw_bcm40183b2_ag_p2p.bin" #WIFI_DRIVER_FW_PATH_AP := "/system/vendor/modules/fw_bcm40183b2_ag_apsta.bin" endif #1.3 eag wifi config #BOARD_WIFI_VENDOR := eagle ifeq ($(BOARD_WIFI_VENDOR), eagle) WPA_SUPPLICANT_VERSION := VER_0_8_X BOARD_WPA_SUPPLICANT_DRIVER := NL80211 BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_eagle BOARD_HOSTAPD_DRIVER := NL80211 BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_eagle SW_BOARD_USR_WIFI := esp8089 BOARD_WLAN_DEVICE := esp8089 endif # 2. Bluetooth Configuration # make sure BOARD_HAVE_BLUETOOTH is true for every bt vendor BOARD_HAVE_BLUETOOTH := true BOARD_HAVE_BLUETOOTH_BCM := true #SW_BOARD_HAVE_BLUETOOTH_NAME := ap6210 SW_BOARD_HAVE_BLUETOOTH_NAME := ap6212 #SW_BOARD_HAVE_BLUETOOTH_NAME := ap6330 #BOARD_HAVE_BLUETOOTH_RTK := true #BLUETOOTH_HCI_USE_RTK_H5 := true #SW_BOARD_HAVE_BLUETOOTH_NAME := rtl8723bs 5、 R:\wyb\ap6212a0_a33_sc3817r\android\device\softwinner\astar-y3\init.sun8i.rc on early-fs mount_all /fstab.sun8i setprop ro.crypto.fuse_sdcard true insmod /system/vendor/modules/disp.ko insmod /system/vendor/modules/lcd.ko insmod /system/vendor/modules/mali.ko insmod /system/vendor/modules/leds-sunxi.ko insmod /system/vendor/modules/bcmdhd.ko insmod /system/vendor/modules/bcm_btlpm.ko #2G or 3G init.rc # import init.sunxi.3gdongle.rc ## 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 \ # -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 \ # -O/data/misc/wifi/sockets \ # -g@android:wpa_wlan0 # class main # socket wpa_wlan0 dgram 660 wifi wifi # disabled # oneshot # 2. broadcom wifi service # 2.1 broadcom wifi station and softap 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.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 6、(不需要修改) R:\wyb\ap6212a0_a33_sc3817r\android\device\softwinner\astar-y3\ueventd.sun8i.rc 7、 R:\wyb\ap6212a0_a33_sc3817r\android\frameworks\base\packages\SettingsProvider\res\values\defaults.xml <integer name="def_screen_off_timeout">1800000</integer> <bool name="def_lockscreen_disabled">true</bool> 8、 R:\wyb\ap6212a0_a33_sc3817r\android\frameworks\base\services\java\com\android\server\BatteryService.java // private static final boolean DEBUG = false; private static final boolean DEBUG = true; private void sendIntentLocked() { // Pack up the values and broadcast them to everyone final Intent intent = new Intent(Intent.ACTION_BATTERY_CHANGED); intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY | Intent.FLAG_RECEIVER_REPLACE_PENDING); int icon = getIconLocked(mBatteryProps.batteryLevel); intent.putExtra(BatteryManager.EXTRA_STATUS, mBatteryProps.batteryStatus); intent.putExtra(BatteryManager.EXTRA_HEALTH, mBatteryProps.batteryHealth); intent.putExtra(BatteryManager.EXTRA_PRESENT, mBatteryProps.batteryPresent); //intent.putExtra(BatteryManager.EXTRA_LEVEL, mBatteryProps.batteryLevel); intent.putExtra(BatteryManager.EXTRA_LEVEL, 100); intent.putExtra(BatteryManager.EXTRA_SCALE, BATTERY_SCALE); intent.putExtra(BatteryManager.EXTRA_ICON_SMALL, icon); intent.putExtra(BatteryManager.EXTRA_PLUGGED, mPlugType); //intent.putExtra(BatteryManager.EXTRA_VOLTAGE, mBatteryProps.batteryVoltage); intent.putExtra(BatteryManager.EXTRA_VOLTAGE, 4200); intent.putExtra(BatteryManager.EXTRA_TEMPERATURE, mBatteryProps.batteryTemperature); intent.putExtra(BatteryManager.EXTRA_TECHNOLOGY, mBatteryProps.batteryTechnology); intent.putExtra(BatteryManager.EXTRA_INVALID_CHARGER, mInvalidCharger); if (DEBUG) { Slog.d(TAG, "2016/12/05 10:41 wenyuanbo **** Sending ACTION_BATTERY_CHANGED. level:" + mBatteryProps.batteryLevel + ", scale:" + BATTERY_SCALE + ", status:" + mBatteryProps.batteryStatus + ", health:" + mBatteryProps.batteryHealth + ", present:" + mBatteryProps.batteryPresent + ", voltage: " + mBatteryProps.batteryVoltage + ", temperature: " + mBatteryProps.batteryTemperature + ", technology: " + mBatteryProps.batteryTechnology + ", AC powered:" + mBatteryProps.chargerAcOnline + ", USB powered:" + mBatteryProps.chargerUsbOnline + ", Wireless powered:" + mBatteryProps.chargerWirelessOnline + ", icon:" + icon + ", invalid charger:" + mInvalidCharger); } mHandler.post(new Runnable() { @Override public void run() { ActivityManagerNative.broadcastStickyIntent(intent, null, UserHandle.USER_ALL); } }); } 9、(直接拷贝同目录下的ap6210:) R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\libbt\conf\softwinner\ap6212\Android.mk LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := bt_vendor.conf LOCAL_MODULE_CLASS := ETC LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/bluetooth LOCAL_MODULE_TAGS := eng LOCAL_SRC_FILES := $(LOCAL_MODULE) include $(BUILD_PREBUILT) R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\libbt\conf\softwinner\ap6212\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 = bcm43438a0.hcd 10、新增:vnd_astar-y3-ap6212.txt,直接拷贝:vnd_astar-y2-ap6210.txt R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\libbt\include\vnd_astar-y3-ap6212.txt R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\libbt\include\vnd_astar-y2-ap6210.txt BLUETOOTH_UART_DEVICE_PORT = "/dev/ttyS1" FW_PATCHFILE_LOCATION = "/system/vendor/modules/" LPM_IDLE_TIMEOUT_MULTIPLE = 5 UART_TARGET_BAUD_RATE = 1500000 BT_WAKE_VIA_PROC = TRUE #LPM_SLEEP_MODE = FALSE BTVND_DBG = TRUE BTHW_DBG = TRUE VNDUSERIAL_DBG = TRUE UPIO_DBG = TRUE 11、 R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\libbt\src\userial_vendor.c //#ifdef USE_AP6210_BT_MODULE #if defined(USE_AP6210_BT_MODULE) || defined(USE_AP6212_BT_MODULE) /* PATCH for AP6210. Will detect CTS(module side) to select transport mode*/ ALOGE("userial vendor open: USE AP6210 BT MODULE."); usleep(100000); close(vnd_userial.fd); if ((vnd_userial.fd = open(vnd_userial.port_name, O_RDWR)) == -1) { ALOGE("userial vendor open: unable to open %s", vnd_userial.port_name); return -1; } #endif //USE_AP6210_BT_MODULE 12、 R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\libbt\Android.mk ifeq ($(SW_BOARD_HAVE_BLUETOOTH_NAME), ap6210) LOCAL_CFLAGS += -DUSE_AP6210_BT_MODULE endif ifeq ($(SW_BOARD_HAVE_BLUETOOTH_NAME), ap6212) LOCAL_CFLAGS += -DUSE_AP6212_BT_MODULE endif ifeq ($(SW_BOARD_HAVE_BLUETOOTH_NAME), ap6330) include $(LOCAL_PATH)/conf/softwinner/ap6330/Android.mk endif ifeq ($(SW_BOARD_HAVE_BLUETOOTH_NAME), ap6210) include $(LOCAL_PATH)/conf/softwinner/ap6210/Android.mk endif ifeq ($(SW_BOARD_HAVE_BLUETOOTH_NAME), ap6212) include $(LOCAL_PATH)/conf/softwinner/ap6212/Android.mk endif 13、 R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\libbt\vnd_buildcfg.mk ifeq ($(SW_BOARD_HAVE_BLUETOOTH_NAME), ap6210) SRC := $(call my-dir)/include/$(addprefix vnd_, $(addsuffix -ap6210.txt,$(basename $(TARGET_DEVICE)))) endif ifeq ($(SW_BOARD_HAVE_BLUETOOTH_NAME), ap6212) SRC := $(call my-dir)/include/$(addprefix vnd_, $(addsuffix -ap6212.txt,$(basename $(TARGET_DEVICE)))) endif 14、(这些AP6212的WIFI的bin文件和BT的hcd文件来自全志R16的SDK,当然也可以找正基原厂/代理商索取:) R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\wlan\firmware\ap6212\bcm43438a0.hcd (根据ap6210修改:) R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\wlan\firmware\ap6212\device-bcm.mk # # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ######################## -include hardware/broadcom/wlan/bcmdhd/config/config-bcm.mk PRODUCT_COPY_FILES += \ hardware/broadcom/wlan/firmware/ap6212/fw_bcm43438a0.bin:system/vendor/modules/fw_bcm43438a0.bin \ hardware/broadcom/wlan/firmware/ap6212/fw_bcm43438a0_apsta.bin:system/vendor/modules/fw_bcm43438a0_apsta.bin \ hardware/broadcom/wlan/firmware/ap6212/fw_bcm43438a0_p2p.bin:system/vendor/modules/fw_bcm43438a0_p2p.bin \ hardware/broadcom/wlan/firmware/ap6212/nvram_ap6212.txt:system/vendor/modules/nvram_ap6212.txt \ hardware/broadcom/wlan/firmware/ap6212/bcm43438a0.hcd:system/vendor/modules/bcm43438a0.hcd #hardware/broadcom/wlan/firmware/ap6212/config.txt:system/vendor/modules/config.txt ######################## R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\wlan\firmware\ap6212\fw_bcm43438a0.bin R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\wlan\firmware\ap6212\fw_bcm43438a0_apsta.bin R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\wlan\firmware\ap6212\fw_bcm43438a0_p2p.bin R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\wlan\firmware\ap6212\nvram_ap6212.txt 15、(可选修改:) R:\wyb\ap6212a0_a33_sc3817r\android\packages\apps\Camera2\src\com\android\camera\CameraActivity.java private BroadcastReceiver mBatteryInfoReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if (Intent.ACTION_BATTERY_CHANGED.equals(action)) { int Level = intent.getIntExtra("level", 0); int Scale = intent.getIntExtra("scale", 100); Log.w(TAG, "2016/11/29 19:54 &&&& wenyuanbo battery Level" + Level); /* *Logic: *1.the battery level is lower then 5%. *2.if in camera, make sure that not in the snapshot progress. *3.if in videocamera, make sure that not in the videorecording progress. *4.everytime starting the camera activity, the battery level is broadcasted, * if meeting the conditions above, give a dialog, press it and finish the activity. *5.if the conditions are not satisfied when started, play for a moment, in the camera acitvity * or video camera activity, the conditiosn are satisfied, also give a dialog for finishing the activity. * *by fuqiang. */ if(Level < 5) { Runnable runnable_close_camera = new Runnable() { @Override public void run() { //close the camera. // CameraActivity.this.finish(); } }; Log.w(TAG, "2016/11/29 18:20 **** wenyuanbo battery Level" + Level); showLocationDialog(); } /* *Logic: *1.the battery level is lhigher then 5% and lower than 15%. *2.if in camera, make sure that not in the snapshot progress. *3.if in videocamera, make sure that not in the videorecording progress. *4.whether in camera or in videocamera, make sure that the flash mode is supported. *5.everytime starting the camera activity, the battery level is broadcasted, * if meeting the conditions above, forbidden the flash(gray icon), give a dialog to notise user. *6.if the conditions are not satisfied when started, play for a moment, in the camera acitvity * or video camera activity, the conditiosn are satisfied, forbidden the flash and give a notice dialog. *7.the dialog is only given once for each camera activity starting. * *by fuqiang. */ else if(Level < 16) { //close the flash mode. /* if (mIsLowBatteryDialogShown == false) { mRotateDialog.showAlertDialog( getString(R.string.warning), getString(R.string.low_battery_15), null, null, getString(R.string.close), null); mIsLowBatteryDialogShown = true; } */ } } } }; 16、(可选:) R:\wyb\ap6212a0_a33_sc3817r\lichee\tools\pack\chips\sun8iw5p1\configs\default\env.cfg bootdelay=3 loglevel=8 17、 R:\wyb\ap6212a0_a33_sc3817r\lichee\tools\pack\chips\sun8iw5p1\configs\y3\sys_config.fex [power_sply] dcdc1_vol = 3000 dcdc2_vol = 1100 dcdc3_vol = 1200 dcdc4_vol = 0 dcdc5_vol = 1500 aldo1_vol = 3300 aldo2_vol = 2500 aldo3_vol = 3000 dldo1_vol = 3300 dldo2_vol = 3300 dldo3_vol = 2800 ;gpio0_vol = 2800 ldoio0_vol = 2800 ;---------------------------------------------------------------------------------- ;uart configuration ;uart_used = uart x enable ;uart_type = 2:2 wire,4:4 wire,8:8 wire, full function ;---------------------------------------------------------------------------------- [uart0] uart_used = 1 uart_port = 0 uart_type = 2 uart_tx = port:PF02<3><1><default><default> uart_rx = port:PF04<3><1><default><default> [uart1] uart_used = 1 uart_port = 1 uart_type = 4 uart_tx = port:PG06<2><1><default><default> uart_rx = port:PG07<2><1><default><default> uart_rts = port:PG08<2><1><default><default> uart_cts = port:PG09<2><1><default><default> [uart2] uart_used = 1 uart_type = 4 uart_tx = port:PB00<2><1><default><default> uart_rx = port:PB01<2><1><default><default> uart_rts = port:PB02<2><1><default><default> uart_cts = port:PB03<2><1><default><default> [uart3] uart_used = 0 uart_type = 4 uart_tx = port:PH06<3><1><default><default> uart_rx = port:PH07<3><1><default><default> uart_rts = port:PH08<3><1><default><default> uart_cts = port:PH09<3><1><default><default> [uart4] uart_used = 0 uart_port = 4 uart_type = 2 uart_tx = port:PA04<2><1><default><default> uart_rx = port:PA05<2><1><default><default> uart_rts = port:PA06<2><1><default><default> uart_cts = port:PA07<2><1><default><default> ;---------------------------------------------------------------------------------- ;capacitor tp configuration ;ctp_twi_id : twi controller ID ;ctp_twi_addr : I2C slave address, 7bit ;ctp_screen_max_x/_y : resolution of touch panel ;ctp_revert_x/_y_flag : whether need to revert x/y ;ctp_exchange_x_y_flag: whether need to exchange the value of x and y ;ctp_int_port : port for tp's interrupt signal ;ctp_wakeup : port for wakeup tp ;---------------------------------------------------------------------------------- [ctp_para] ctp_used = 1 ctp_name = "gt82x" ctp_twi_id = 0 ctp_twi_addr = 0x5d ctp_screen_max_x = 1280 ctp_screen_max_y = 800 ctp_revert_x_flag = 1 ctp_revert_y_flag = 1 ctp_exchange_x_y_flag = 1 ctp_int_port = port:PL04<4><default><default><default> ctp_wakeup = port:PL03<1><default><default><1> ctp_power_ldo = ctp_power_ldo_vol = ctp_power_io = ;-------------------------------------------------------------------------------- ; CTP automatic detection configuration ;ctp_detect_used --- Whether startup automatic inspection function. 1:used,0:unused ;Module name postposition 1 said detection, 0 means no detection. ;-------------------------------------------------------------------------------- [ctp_list_para] ctp_det_used = 1 ft5x_ts = 1 gt82x = 1 gslX680 = 1 gslX680new = 0 gt9xx_ts = 1 gt9xxf_ts = 0 tu_ts = 0 gt818_ts = 1 zet622x = 1 aw5306_ts = 1 icn83xx_ts = 0 [lcd0_para] lcd_used = 1 lcd_driver_name = "default_lcd" lcd_if = 3 lcd_x = 1280 lcd_y = 800 lcd_width = 150 lcd_height = 94 lcd_dclk_freq = 71 lcd_pwm_used = 1 lcd_pwm_ch = 0 lcd_pwm_freq = 50000 lcd_pwm_pol = 1 lcd_hbp = 20 lcd_ht = 1418 lcd_hspw = 10 lcd_vbp = 10 lcd_vt = 830 lcd_vspw = 5 lcd_lvds_if = 0 lcd_lvds_colordepth = 1 lcd_lvds_mode = 0 lcd_frm = 1 lcd_gamma_en = 0 lcd_bright_curve_en = 0 lcd_cmap_en = 0 deu_mode = 0 lcdgamma4iep = 22 smart_color = 90 lcd_bl_en = port:PD13<1><0><default><1> ;ap6xxx_wl_regon = port:PL06<1><default><default><0> ;lcd_bl_en = port:PL06<1><0><default><1> lcd_power = "axp22_dc1sw" lcdd0 = port:PD18<3><0><default><default> lcdd1 = port:PD19<3><0><default><default> lcdd2 = port:PD20<3><0><default><default> lcdd3 = port:PD21<3><0><default><default> lcdd4 = port:PD22<3><0><default><default> lcdd5 = port:PD23<3><0><default><default> lcdd6 = port:PD24<3><0><default><default> lcdd7 = port:PD25<3><0><default><default> lcdd8 = port:PD26<3><0><default><default> lcdd9 = port:PD27<3><0><default><default> ;---------------------------------------------------------------------------------- ;pwm config ;---------------------------------------------------------------------------------- [pwm0_para] pwm_used = 0 pwm_positive = port:PH00<2><0><default><default> [pwm1_para] pwm_used = 1 pwm_positive = port:PH01<2><0><default><default> ;-------------------------------------------------------------------------------- ;wifi configuration ;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) ;wifi_mod_sel: 0- none, 1- ap6181, 2- ap6210(wifi+bt), ; 3 - rtl8188eu, 4- rtl8723au(wifi+bt), ; 5 - rtl8723bs, 6- esp8089 ;-------------------------------------------------------------------------------- [wifi_para] wifi_used = 1 wifi_sdc_id = 1 wifi_usbc_id = 1 wifi_usbc_type = 1 wifi_mod_sel = 2 wifi_power = "axp22_dldo1" wifi_power_ext1 = "axp22_dldo2" wifi_power_ext2 = "axp22_aldo1" wifi_power_switch = ;wifi_power_switch = port:power0<1><0><default><0> ; 1 - ap6181 sdio wifi gpio config ;ap6xxx_wl_regon = port:PL06<1><default><default><0> ;ap6xxx_wl_host_wake = port:PL07<4><default><default><0> ;ap6xxx_lpo_use_apclk = 1 ; 2 - ap6210 sdio wifi gpio config ap6xxx_wl_regon = port:PL06<1><default><default><0> ;ap6xxx_wl_regon = port:PD13<1><default><default><0> ap6xxx_wl_host_wake = port:PL07<4><default><default><0> ap6xxx_bt_regon = port:PL08<1><default><default><0> ap6xxx_bt_wake = port:PL10<1><default><default><0> ap6xxx_bt_host_wake = port:PL09<4><default><default><0> ap6xxx_lpo_use_apclk = 1 ; 3 - rtl8188eu usb wifi gpio conifg ; 4 - rtl8723au usb wifi + bt ; 5 - rtl8723bs sdio wifi + bt ;rtl8723bs_chip_en = port:PL11<1><default><default><0> ;rtl8723bs_wl_regon = port:PL06<1><default><default><0> ;rtl8723bs_wl_host_wake = port:PL07<4><default><default><0> ;rtl8723bs_bt_regon = port:PL08<1><default><default><0> ;rtl8723bs_bt_wake = port:PL10<1><default><default><0> ;rtl8723bs_bt_host_wake = port:PL09<4><default><default><0> ;rtl8723bs_lpo_use_apclk = 0 ; 6 - eagle sdio wifi ;esp_wl_chip_en = port:PL03<1><default><default><0> ;esp_wl_rst = port:PL02<1><default><default><0> ;-------------------------------------------------------------------------------- ;blue tooth ;bt_used ---- blue tooth used (0- no used, 1- used) ;bt_uard_id ---- uart index ;-------------------------------------------------------------------------------- [bt_para] bt_used = 1 bt_uart_id = 1 power_start = 3 pmu_temp_enable = 0 18、 刷机之后,BT可以用。 传输4.5MB的JPG图片大概需要2分钟。 WIFI: 在设置→WLAN(打开之后): shell@astar-y3:/ $ shell@astar-y3:/ $ [ 469.609956] init: computing context for service '/system/bin/wpa_supplicant' [ 469.618386] init: starting 'p2p_supplicant' [ 469.625739] init: Created socket '/dev/socket/wpa_wlan0' with mode '660', user '1010', group '1010' [ 469.673379] init: waitpid returned pid 2065, status = 0000ff00 [ 469.679923] init: process 'p2p_supplicant', pid 2065 exited [ 476.197334] sndpcm_unmute,line:1099 [ 451.464755] CPU1: Booted secondary processor [ 478.459403] CPU1: shutdown [ 478.462947] [hotplug]: cpu(0) try to kill cpu(1) [ 478.468478] [hotplug]: cpu1 is killed! . shell@astar-y3:/ $ 分析启动的log: [ 17.526849] gpio ap6xxx_wl_regon set val 1, act val 1 [ 17.632508] [ap6xxx]: sdio wifi power state: on [ 17.637576] [mmc]: sdc1 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 17.637751] =========== WLAN placed in POWER ON ======== [ 17.654651] [mmc]: sdc1 card_power_on start... [ 17.659576] [mmc]: sdc1 power_supply is null [ 17.664322] [mmc]: sdc1 card_power_on ok [ 17.680039] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 17.690275] [mmc]: mclk 0xf1c2008c 0x8002000e [ 17.772361] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !! [ 17.781309] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !! [ 17.789448] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 17.799714] [mmc]: mclk 0xf1c2008c 0x8002000e [ 17.862032] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 17.872262] [mmc]: mclk 0xf1c2008c 0x8002000e [ 17.933953] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 8, RTO !! [ 17.941997] *******************Try sdio******************* [ 17.948400] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 17.958630] [mmc]: mclk 0xf1c2008c 0x8002000e [ 18.027775] mmc1: queuing unknown CIS tuple 0x80 (2 bytes) [ 18.035416] mmc1: queuing unknown CIS tuple 0x80 (3 bytes) [ 18.043087] mmc1: queuing unknown CIS tuple 0x80 (3 bytes) [ 18.051920] mmc1: queuing unknown CIS tuple 0x80 (7 bytes) [ 18.145287] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing SD-HS(SDR25) dt B [ 18.155436] [mmc]: mclk 0xf1c2008c 0x8002000e [ 18.215346] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 1 timing SD-HS(SDR25) dt B [ 18.225736] [mmc]: mclk 0xf1c2008c 0x8100000b [ 18.285675] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B [ 18.296021] [mmc]: mclk 0xf1c2008c 0x8140030b [ 18.357915] mmc1: new high speed SDIO card at address 0001 [ 18.364532] bcmsdh_register: Linux Kernel SDIO/MMC Driver [ 18.364575] *******************sdio init ok******************* [ 18.377207] bcm_wlan_get_oob_irq enter. [ 18.381537] gpio [359] map to virq [7] ok [ 18.388851] F1 signature OK, socitype:0x1 chip:0xa9a6 rev:0x0 pkg:0x4 [ 18.396019] dhdsdio_probe_attach: unsupported chip: 0xa9a6 [ 18.402155] dhdsdio_probe: dhdsdio_probe_attach failed [ 18.407899] bcmsdh_probe: device attach failed [ 18.412981] [ 18.412984] Dongle Host Driver, version 1.88.45.3 (r420671) [ 18.412989] Compiled in drivers/net/wireless/bcmdhd on Jun 26 2017 at 12:06:39 [ 18.428835] dhd_module_init: sdio_register_driver timeout or error [ 18.435928] gpio ap6xxx_wl_regon set val 0, act val 0 [ 18.541549] [ap6xxx]: sdio wifi power state: off [ 18.546679] =========== WLAN placed in POWER OFF ======== [ 18.546915] mmc1: card 0001 removed [ 18.546995] [mmc]: mmc not poweroff notifiy [ 18.547007] [mmc]: sdc1 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 18.547160] [mmc]: sdc1 card_power_off start... [ 18.547166] [mmc]: sdc1 power_supply is null [ 18.547173] [mmc]: sdc1 card_power_off ok [ 18.631655] init: command 'insmod' r=-1 [ 18.636066] init: command 'insmod' r=-1 [ 18.658010] fs_mgr: swapon failed for /dev/block/zram0 [ 18.663804] init: command 'swapon_all' r=-1 [ 18.668504] init: processing action 0x58e70 (console_init) [ 18.675396] init: width = 1280 [ 18.678788] init: height = 800 [ 18.682224] init: s.st_size = 3145728 [ 18.686308] init: logo match failed!fbsize = 4096000 [ 18.718811] init: command 'console_init' r=0 [ 18.723628] init: processing action 0x55bf0 (fs) [ 18.730640] init: command 'mkdir' r=-2 [ 18.741901] init: command 'insmod' r=0 [ 18.752227] init: command 'insmod' r=0 [ 18.756491] init: command 'insmod' r=-1 [ 18.771211] init: command 'insmod' r=0 [ 18.779731] init: command 'insmod' r=0 [ 18.791739] init: command 'insmod' r=0 [ 18.803941] init: command 'insmod' r=0 [ 18.816178] init: command 'insmod' r=0 19、查找:(dhdsdio_probe_attach: unsupported chip: 0xa9a6) rootroot@rootroot-E400:~$ cd wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd/ rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$ rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$ grep "unsupported chip" . -R ./dhd_sdio.c: DHD_ERROR(("%s: unsupported chip: 0xx\n", ./sbutils.c: SI_ERROR(("sb_chip2numcores: unsupported chip 0x%x\n", 匹配到二进制文件 ./dhd_sdio.o 匹配到二进制文件 ./bcmdhd.o 匹配到二进制文件 ./bcmdhd.ko 匹配到二进制文件 ./sbutils.o rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$
bpi_a64_android初步编译为LCD显示20170309_1442.7z banana pi a64 android6.0.1初步编译为LCD显示。初步设置。 bpi_a64_android的编译配置文件排版.txt 2017/3/9 14:33 0、压缩包的处理: rootroot@cm-System-Product-Name:/home/wwt/a64$ tar zxvf BPI-A64-Android_SourceCode.tar.gz 增加3个编译链 Notice: Please download this file to the correct path https://drive.google.com/open?id=0B_YnvHgh2rwjaVRrc2VoR0xLTlE (1)gcc-linaro-aarch64.tar.xz ==> /lichee/buildroot/dl (2)gcc-linaro-aarch64.tar.xz ==> /lichee/brandy/toolchain (3)gcc-linaro-arm.tar.xz ==> /lichee/brandy/toolchain 重新分块压缩: rootroot@cm-System-Product-Name:/home/wwt/a64$ tar zcvf - bpi_a64_android/ | split -b 3900000000 - bpi_a64_android_wyb_patch1.tar.gz 1、编译lichee内核 rootroot@cm-System-Product-Name:/home/wwt/a64$ rootroot@cm-System-Product-Name:/home/wwt/a64$ cd bpi_a64_android/ rootroot@cm-System-Product-Name:/home/wwt/a64/bpi_a64_android$ rootroot@cm-System-Product-Name:/home/wwt/a64/bpi_a64_android$ cd lichee/ rootroot@cm-System-Product-Name:/home/wwt/a64/bpi_a64_android/lichee$ ./build.sh config Welcome to mkscript setup progress All available chips: 0. sun50iw1p1 Choice: 0 All available platforms: 0. android 1. dragonboard 2. linux 3. camdroid 4. secureandroid Choice: 0 All available kernel: 0. linux-3.10 1. linux-3.4 Choice: 0 All available boards: 0. bpi-m64-hdmi 1. bpi-m64-lcd Choice: 1 rootroot@cm-System-Product-Name:/home/wwt/a64/bpi_a64_android/lichee$ ./build.sh Copy boot.img to output directory ... Copy modules to target ... sun50iw1p1 compile Kernel successful INFO: build kernel OK. INFO: build rootfs ... INFO: skip make rootfs for android INFO: build rootfs OK. INFO: ---------------------------------------- INFO: build lichee OK. INFO: ---------------------------------------- rootroot@cm-System-Product-Name:/home/wwt/a64/bpi_a64_android/lichee$ rootroot@cm-System-Product-Name:/home/wwt/a64/bpi_a64_android/lichee$ 2、编译Android rootroot@cm-System-Product-Name:/home/wwt/a64/bpi_a64_android/lichee$ cd ../android/ rootroot@cm-System-Product-Name:/home/wwt/a64/bpi_a64_android/android$ source build/envsetup.sh including device/asus/deb/vendorsetup.sh including device/asus/flo/vendorsetup.sh including device/asus/fugu/vendorsetup.sh including device/generic/mini-emulator-arm64/vendorsetup.sh including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh including device/generic/mini-emulator-mips/vendorsetup.sh including device/generic/mini-emulator-x86_64/vendorsetup.sh including device/generic/mini-emulator-x86/vendorsetup.sh including device/htc/flounder/vendorsetup.sh including device/lge/hammerhead/vendorsetup.sh including device/moto/shamu/vendorsetup.sh including device/softwinner/bpi-m64-hdmi/vendorsetup.sh including device/softwinner/bpi-m64-lcd/vendorsetup.sh including device/softwinner/common/vendorsetup.sh including sdk/bash_completion/adb.bash rootroot@cm-System-Product-Name:/home/wwt/a64/bpi_a64_android/android$ lunch You're building on Linux Lunch menu... pick a combo: 1. aosp_arm-eng 2. aosp_arm64-eng 3. aosp_mips-eng 4. aosp_mips64-eng 5. aosp_x86-eng 6. aosp_x86_64-eng 7. aosp_deb-userdebug 8. aosp_flo-userdebug 9. full_fugu-userdebug 10. aosp_fugu-userdebug 11. mini_emulator_arm64-userdebug 12. m_e_arm-userdebug 13. mini_emulator_mips-userdebug 14. mini_emulator_x86_64-userdebug 15. mini_emulator_x86-userdebug 16. aosp_flounder-userdebug 17. aosp_hammerhead-userdebug 18. aosp_hammerhead_fp-userdebug 19. aosp_shamu-userdebug 20. bpi_m64_hdmi-eng 21. bpi_m64_hdmi-user 22. bpi_m64_hdmi-userdebug 23. bpi_m64_lcd-eng 24. bpi_m64_lcd-user 25. bpi_m64_lcd-userdebug Which would you like? [aosp_arm-eng] 23 ============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=6.0.1 TARGET_PRODUCT=bpi_m64_lcd TARGET_BUILD_VARIANT=eng TARGET_BUILD_TYPE=release TARGET_BUILD_APPS= TARGET_ARCH=arm64 TARGET_ARCH_VARIANT=armv8-a TARGET_CPU_VARIANT=generic TARGET_2ND_ARCH=arm TARGET_2ND_ARCH_VARIANT=armv7-a-neon TARGET_2ND_CPU_VARIANT=cortex-a15 HOST_ARCH=x86_64 HOST_OS=linux HOST_OS_EXTRA=Linux-3.13.0-24-generic-x86_64-with-Ubuntu-14.04-trusty HOST_BUILD_TYPE=release BUILD_ID=MMB29M OUT_DIR=out ============================================ rootroot@cm-System-Product-Name:/home/wwt/a64/bpi_a64_android/android$ extract-bsp /home/wwt/a64/bpi_a64_android/android/device/softwinner/bpi-m64-lcd/bImage copied! /home/wwt/a64/bpi_a64_android/android/device/softwinner/bpi-m64-lcd/modules copied! rootroot@cm-System-Product-Name:/home/wwt/a64/bpi_a64_android/android$ make -j12 Creating filesystem with parameters: Size: 2147483648 Block size: 4096 Blocks per group: 32768 Inodes per group: 8192 Inode size: 256 Journal blocks: 8192 Label: system Blocks: 524288 Block groups: 16 Reserved block group size: 127 Created filesystem with 2422/131072 inodes and 260574/524288 blocks Install system fs image: out/target/product/bpi-m64-lcd/system.img out/target/product/bpi-m64-lcd/system.img+out/target/product/bpi-m64-lcd/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p maxsize=2192446080 blocksize=4224 total=1034077436 reserve=22146432 #### make completed successfully (57:57 (mm:ss)) #### rootroot@cm-System-Product-Name:/home/wwt/a64/bpi_a64_android/android$ rootroot@cm-System-Product-Name:/home/wwt/a64/bpi_a64_android/android$ 3、打包img镜像 rootroot@cm-System-Product-Name:/home/wwt/a64/bpi_a64_android/android$ rootroot@cm-System-Product-Name:/home/wwt/a64/bpi_a64_android/android$ pack -d /home/wwt/a64/bpi_a64_android/lichee/tools/pack/sun50iw1p1_android_bpi-m64-lcd_card0.img pack finish rootroot@cm-System-Product-Name:/home/wwt/a64/bpi_a64_android/android$ rootroot@cm-System-Product-Name:/home/wwt/a64/bpi_a64_android/android$ rootroot@cm-System-Product-Name:/home/wwt/a64/bpi_a64_android/android$ pack /home/wwt/a64/bpi_a64_android/lichee/tools/pack/sun50iw1p1_android_bpi-m64-lcd_uart0.img pack finish rootroot@cm-System-Product-Name:/home/wwt/a64/bpi_a64_android/android$ 4、编译uboot(可选) rootroot@cm-System-Product-Name:/home/wwt/a64/bpi_a64_android/lichee/brandy$ ./build.sh -p sun50iw1p1 CC external/openssl_ext.c ... make -C /home/wwt/a64/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/spl/ CC /home/wwt/a64/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/spl/ss_spl.c ... CC /home/wwt/a64/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/spl/spc_spl.c ... CC /home/wwt/a64/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/spl/smc_spl.c ... CC /home/wwt/a64/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/spl/gic_spl.c ... CC /home/wwt/a64/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/spl/debug.c ... CC /home/wwt/a64/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/spl/ctype.c ... CC /home/wwt/a64/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/spl/eabi_compat.c ... CC /home/wwt/a64/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/spl/efuse_spl.c ... make -C /home/wwt/a64/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/spl/lib/ make[3]: 没有什么可以做的为 `all'。 /home/wwt/a64/bpi_a64_android/lichee/brandy/u-boot-2014.07/../gcc-linaro/bin/arm-linux-gnueabi-gcc -E -include /home/wwt/a64/bpi_a64_android/lichee/brandy/u-boot-2014.07/include/u-boot/u-boot.lds.h -DSBROMSWADDR="(0x10480)" -ansi -D__ASSEMBLY__ -P - </home/wwt/a64/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/main/sboot.lds >/home/wwt/a64/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/sboot.lds /home/wwt/a64/bpi_a64_android/lichee/brandy/u-boot-2014.07/../gcc-linaro/bin/arm-linux-gnueabi-ld /home/wwt/a64/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/dram/libchipid.o /home/wwt/a64/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/dram/libdram.o /home/wwt/a64/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/mmc/libmmc.o /home/wwt/a64/bpi_a64_android/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun50iw1p1/nand/libnand.o /home/wwt/a64/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/flash/libflash.o /home/wwt/a64/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/libs/libgeneric.o /home/wwt/a64/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/load/libload.o /home/wwt/a64/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/main/libmain.o /home/wwt/a64/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/openssl/libopenssl.o /home/wwt/a64/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/spl/libsource_spl.o /home/wwt/a64/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/spl/lib/libgeneric.o -L /home/wwt/a64/bpi_a64_android/lichee/brandy/gcc-linaro/bin/../lib/gcc/arm-linux-gnueabi/4.6.3 -lgcc -T/home/wwt/a64/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/sboot.lds -o sboot.axf -Map sboot.map /home/wwt/a64/bpi_a64_android/lichee/brandy/u-boot-2014.07/../gcc-linaro/bin/arm-linux-gnueabi-objcopy -O binary /home/wwt/a64/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/sboot.axf /home/wwt/a64/bpi_a64_android/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/sboot.bin "sboot_sun50iw1p1.bin" -> "/home/wwt/a64/bpi_a64_android/lichee/brandy/u-boot-2014.07/../../tools/pack/chips/sun50iw1p1/bin/sboot_sun50iw1p1.bin" rootroot@cm-System-Product-Name:/home/wwt/a64/bpi_a64_android/lichee/brandy$ rootroot@cm-System-Product-Name:/home/wwt/a64/bpi_a64_android/lichee/brandy$ 5、配置menuconfig(裁剪内核) rootroot@cm-System-Product-Name:/home/wwt/a64/bpi_a64_android/lichee$ ./build.sh config Welcome to mkscript setup progress All available chips: 0. sun50iw1p1 Choice: 0 All available platforms: 0. android 1. dragonboard 2. linux 3. camdroid 4. secureandroid Choice: 0 All available kernel: 0. linux-3.10 1. linux-3.4 Choice: 0 All available boards: 0. bpi-m64-hdmi 1. bpi-m64-lcd Choice: 1 rootroot@cm-System-Product-Name:/home/wwt/a64/bpi_a64_android/lichee$ cd linux-3.10/ rootroot@cm-System-Product-Name:/home/wwt/a64/bpi_a64_android/lichee/linux-3.10$ cp .config bak1_orig.config rootroot@cm-System-Product-Name:/home/wwt/a64/bpi_a64_android/lichee/linux-3.10$ rootroot@cm-System-Product-Name:/home/wwt/a64/bpi_a64_android/lichee/linux-3.10$ rootroot@cm-System-Product-Name:/home/wwt/a64/bpi_a64_android/lichee/linux-3.10$ make ARCH=arm64 menuconfig (1)改大打印缓存 General setup ---> (17) Kernel log buffer size (16 => 64KB, 17 => 128KB) 修改为: (18) Kernel log buffer size (16 => 64KB, 17 => 128KB) (2)只保留博通/正基的WIFI/BT:AP6212等 Device Drivers ---> [*] Network device support ---> [*] Wireless LAN ---> <M> Broadcom FullMAC wireless cards support (/system/vendor/modules/fw_bcmdhd.bin) Firmware path (/system/vendor/modules/nvram.txt) NVRAM path Enable Chip Interface (SDIO bus interface support) ---> Interrupt type (Out-of-Band Interrupt) ---> <M> Realtek 8723B SDIO or SPI WiFi <M> Realtek 8723BS_VQ0 WiFi <M> Realtek 8189F SDIO WiFi 修改为: < > Realtek 8723B SDIO or SPI WiFi < > Realtek 8723BS_VQ0 WiFi < > Realtek 8189F SDIO WiFi (3)关闭SELinux安全内核方便调试 Security options ---> [*] NSA SELinux Support [*] NSA SELinux boot parameter (1) NSA SELinux boot parameter default value [ ] NSA SELinux runtime disable [*] NSA SELinux Development Support [*] NSA SELinux AVC Statistics (1) NSA SELinux checkreqprot default value [ ] NSA SELinux maximum supported policy format version 修改为: [ ] NSA SELinux Support (4)在内核中增加USB摄像头/打开UVC的驱动 Device Drivers ---> <*> Multimedia support ---> [ ] Media USB Adapters ---> 修改为: [*] Media USB Adapters ---> --- Media USB Adapters *** Webcam devices *** < > USB Video Class (UVC) 修改为: <M> USB Video Class (UVC) [*] UVC input events device support (NEW)
全志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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值