20161111全志A83T的开发板的驱动调试(LCD+AP6212)lunch octopus_f1-eng

来源:互联网 发布:淘宝买港版note7怎么退 编辑:程序博客网 时间:2024/05/29 14:36
20161111全志A83T的开发板的驱动调试(LCD+AP6212)lunch octopus_f1-eng




rootroot@cm-System-Product-Name:/home/wwt$ cd f1_a83t_android4.4/
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4$ cd lichee/
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/lichee$ ./build.sh config


Welcome to mkscript setup progress
All available chips:
   0. sun8iw1p1
   1. sun8iw3p1
   2. sun8iw5p1
   3. sun8iw6p1
   4. sun8iw7p1
   5. sun8iw8p1
   6. sun8iw9p1
   7. sun9iw1p1
Choice: 3
All available platforms:
   0. android
   1. dragonboard
   2. linux
Choice: 0
All available kernel:
   0. linux-3.4
Choice: 0
All available boards:
   0. f1
   1. fpga
   2. perf1_v1_0
   3. perf2_v1_0
   4. perf3_v1_0
   5. qc
Choice: 0
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/lichee$ ./build.sh 








rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/lichee$ 
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/lichee$ 
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/lichee$ cd linux-3.4/
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/lichee/linux-3.4$ make clean
  CLEAN   .
  CLEAN   drivers/tty/vt
  CLEAN   kernel
  CLEAN   lib
  CLEAN   security/selinux
  CLEAN   usr
  CLEAN   .tmp_versions
  CLEAN   vmlinux System.map .tmp_kallsyms1.o .tmp_kallsyms1.S .tmp_kallsyms2.o .tmp_kallsyms2.S .tmp_vmlinux1 .tmp_vmlinux2 .tmp_System.map
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/lichee/linux-3.4$
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/lichee/linux-3.4$ rm output/ -rf
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/lichee/linux-3.4$ cd ..
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/lichee$
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/lichee$ rm out/ -rf
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/lichee$ 
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/lichee$ 
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/lichee$ cd linux-3.4/
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/lichee/linux-3.4$ 
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/lichee/linux-3.4$ make ARCH=arm menuconfig










1、点亮LCD:
Z:\home\wwt\f1_a83t_android4.4\lichee\brandy\u-boot-2011.09\arch\arm\lib\board.c
//#ifdef CONFIG_ARCH_HOMELET
// 2016/10/27 16:41 wenyuanbo
#if 1
gpio_control();
#endif


不用修改:
Z:\home\wwt\f1_a83t_android4.4\lichee\brandy\u-boot-2011.09\drivers\power\axp81X_supply.c


修改u-boot中的显示,必须重新编译u-boot。
Z:\home\wwt\f1_a83t_android4.4\lichee\brandy\u-boot-2011.09\drivers\video_sunxi\sunxi_v3\obj_video




Z:\home\wwt\f1_a83t_android4.4\lichee\brandy\u-boot-2011.09\include\pmu.h
#define PMU_SUPPLY_FLDO_TYPE    (0x000a0000)
#define PMU_SUPPLY_FLDO1 (0x000a0001)
#define PMU_SUPPLY_FLDO2 (0x000a0002)


使用全志R58中的AP6212的BCM的驱动替换,不然AP6212打开不了。
Z:\home\wwt\f1_a83t_android4.4\lichee\linux-3.4\drivers\misc\rf_pm\wifi_pm.c
Z:\home\wwt\f1_a83t_android4.4\lichee\linux-3.4\drivers\net\wireless\bcmdhd\Makefile


Z:\home\wwt\f1_a83t_android4.4\lichee\linux-3.4\drivers\power\axp_power\axp81x\axp81x-sply.c
#include "axp81x-common.h"


static int axp_battery_probe(struct platform_device *pdev)
{
……
INIT_DELAYED_WORK(&quick_charge_done_work, axp_chargdone_quick);
INIT_DELAYED_WORK(&sply_charge_done_work, axp_chargedone_check);
axp_update(charger->master, AXP_CHARGE_AC, 0x3,0x07);//@20151203
……
}


修改内核中的显示
Z:\home\wwt\f1_a83t_android4.4\lichee\linux-3.4\drivers\video\sunxi\disp2\disp\Makefile


直接用android5.1.1下调通的配置文件替换:
Z:\home\wwt\f1_a83t_android4.4\lichee\tools\pack\chips\sun8iw6p1\configs\f1\sys_config.fex




rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/lichee/linux-3.4$ ll *.config
ls: 无法访问*.config: 没有那个文件或目录
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/lichee/linux-3.4$ ll .config
-rwxrwxr-x 1 rootroot rootroot 84958 11月 11 15:59 .config*
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/lichee/linux-3.4$ cp .config bak1_orig.config


rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/lichee/linux-3.4$ make ARCH=arm menuconfig


[*] Networking support  --->
-*-   Wireless  --->
< >   Generic IEEE 802.11 Networking Stack (mac80211)
修改为:
<*>   Generic IEEE 802.11 Networking Stack (mac80211)
[ ]   PID controller based rate control algorithm (NEW)
[*]   Minstrel (NEW)
[*]     Minstrel 802.11n support (NEW)
     Default rate control algorithm (Minstrel)  --->
[ ]   Enable mac80211 mesh networking (pre-802.11s) support (NEW)
[ ]   Export mac80211 internals in DebugFS (NEW)
[ ]   Select mac80211 debugging features (NEW)  --->
Device Drivers  --->
[*] Network device support  --->
[*]   Wireless LAN  --->
<M>   Broadcom 4329/30 wireless cards support
(/system/vendor/modules/fw_bcmdhd.bin) Firmware path
(/system/vendor/modules/nvram.txt) NVRAM path
(/system/vendor/modules/config.txt) Config path

<M>   Realtek 8723B SDIO WiFi

修改为:
<M>   Broadcom 4329/30 wireless cards support
(/system/vendor/modules/fw_bcm43438a0.bin) Firmware path
(/system/vendor/modules/nvram_ap6212.txt) NVRAM path
()      Config path

< >   Realtek 8723B SDIO WiFi






rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/lichee/linux-3.4$ diff .config bak1_orig.config 
983,992c983
< CONFIG_MAC80211=y
< CONFIG_MAC80211_HAS_RC=y
< # CONFIG_MAC80211_RC_PID is not set
< CONFIG_MAC80211_RC_MINSTREL=y
< CONFIG_MAC80211_RC_MINSTREL_HT=y
< CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
< CONFIG_MAC80211_RC_DEFAULT="minstrel_ht"
< # CONFIG_MAC80211_MESH is not set
< # CONFIG_MAC80211_DEBUGFS is not set
< # CONFIG_MAC80211_DEBUG_MENU is not set
---
> # CONFIG_MAC80211 is not set
1279,1280d1269
< # CONFIG_LIBERTAS_THINFIRM is not set
< # CONFIG_AT76C50X_USB is not set
1283,1284d1271
< # CONFIG_RTL8187 is not set
< # CONFIG_MAC80211_HWSIM is not set
1287,1288d1273
< # CONFIG_B43 is not set
< # CONFIG_B43LEGACY is not set
1299,1304d1283
< # CONFIG_P54_COMMON is not set
< # CONFIG_RT2X00 is not set
< # CONFIG_RTL8192CU is not set
< # CONFIG_WL1251 is not set
< # CONFIG_WL12XX_MENU is not set
< # CONFIG_ZD1211RW is not set
2682d2660
< # CONFIG_W35UND is not set
3243c3221
< CONFIG_AVERAGE=y
---
> # CONFIG_AVERAGE is not set
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/lichee/linux-3.4$ cp .config bak3_ap6212.config
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/lichee/linux-3.4$ cd ../brandy/
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/lichee/brandy$ ./build.sh -p sun8iw6p1




/home/wwt/f1_a83t_android4.4/lichee/brandy/u-boot-2011.09/../gcc-linaro/bin/arm-linux-gnueabi-objcopy --gap-fill=0xff -O binary u-boot u-boot.bin
"u-boot-sun8iw6p1.bin" -> "/home/wwt/f1_a83t_android4.4/lichee/brandy/u-boot-2011.09/../../tools/pack/chips/sun8iw6p1/bin/u-boot-sun8iw6p1.bin"
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/lichee/brandy$ cd /home/wwt/f1_a83t_android4.4/lichee/brandy/u-boot-2011.09/../../tools/pack/chips/sun8iw6p1/bin/
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/lichee/tools/pack/chips/sun8iw6p1/bin$ 
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/lichee/tools/pack/chips/sun8iw6p1/bin$ 
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/lichee/tools/pack/chips/sun8iw6p1/bin$ cd -
/home/wwt/f1_a83t_android4.4/lichee/brandy
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/lichee/brandy$ 
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/lichee/brandy$ cd ..
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/lichee$ ./build.sh








AP6212:
Z:\home\wwt\f1_a83t_android4.4\android\device\softwinner\octopus-f1\BoardConfig.mk
# 1.1 broadcom wifi support
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 := GB9663
    BOARD_USR_WIFI := AP6212
    include hardware/broadcom/wlan/bcmdhd/firmware/firmware-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_RTK := true
#BLUETOOTH_HCI_USE_RTK_H5 := true
#BOARD_HAVE_BLUETOOTH_NAME := gb9663
BOARD_HAVE_BLUETOOTH_NAME := ap6212
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/softwinner/octopus-f1/bluetooth/


#gsensor & Gyr sensor
#SW_BOARD_USES_SENSORS_TYPE = lsm9ds0
SW_BOARD_USES_SENSORS_TYPE = aw_sensors




Z:\home\wwt\f1_a83t_android4.4\android\device\softwinner\octopus-f1\init.sun8i.rc
# broadcom wifi service
# 1 broadcom wifi bcm40181 bcm40183 station and softap
service wpa_supplicant /system/bin/logwrapper /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
    class main
    socket wpa_wlan0 dgram 660 wifi wifi
    disabled
    oneshot


# 2 braodcom wifi sta p2p concurrent service
service p2p_supplicant /system/bin/logwrapper /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
    class main
    socket wpa_wlan0 dgram 660 wifi wifi
    disabled
    oneshot




Z:\home\wwt\f1_a83t_android4.4\android\device\softwinner\octopus-f1\octopus_f1.mk
PRODUCT_PACKAGES += \
    bt_vendor.conf


# usb
PRODUCT_PROPERTY_OVERRIDES += \
    persist.sys.usb.config=mtp,adb \
    ro.udisk.lable=octopus \
    ro.adb.secure=0


# ui
PRODUCT_PROPERTY_OVERRIDES += \
    ro.property.tabletUI=false \
    ro.sf.lcd_density=160 \
    ro.property.fontScale=1.0 \
    ro.sf.hwrotation=0 




Z:\home\wwt\f1_a83t_android4.4\android\device\softwinner\octopus-f1\bluetooth\bdroid_buildcfg.h
Z:\home\wwt\f1_a83t_android4.4\android\device\softwinner\octopus-f1\bluetooth\bt_vendor.conf
#Firmware name
#FwPatchFileName = bcm20710a1.hcd
FwPatchFileName = bcm43438a0.hcd


Z:\home\wwt\f1_a83t_android4.4\android\device\softwinner\octopus-f1\bluetooth\vnd_octopus-f1.txt
#Set baudrate to 1500000
UART_TARGET_BAUD_RATE=1500000


Z:\home\wwt\f1_a83t_android4.4\android\frameworks\base\packages\SettingsProvider\res\values\defaults.xml
Z:\home\wwt\f1_a83t_android4.4\android\hardware\broadcom\libbt\Android.mk
Z:\home\wwt\f1_a83t_android4.4\android\hardware\broadcom\wlan\bcmdhd\firmware\firmware-bcm.mk








去掉Google Play
Z:\home\wwt\f1_a83t_android4.4\android\device\softwinner\octopus-f1\octopus_f1.mk
#include device/softwinner/common/prebuild-common/google/products/gms_base.mk






rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/lichee$ cd ../android/
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/android$ source build/envsetup.sh 
including device/softwinner/octopus-f1/vendorsetup.sh
including device/softwinner/common/vendorsetup.sh
including device/softwinner/octopus-perf/vendorsetup.sh
including device/lge/mako/vendorsetup.sh
including device/lge/hammerhead/vendorsetup.sh
including device/samsung/manta/vendorsetup.sh
including device/generic/x86/vendorsetup.sh
including device/generic/mips/vendorsetup.sh
including device/generic/armv7-a-neon/vendorsetup.sh
including device/asus/tilapia/vendorsetup.sh
including device/asus/deb/vendorsetup.sh
including device/asus/grouper/vendorsetup.sh
including device/asus/flo/vendorsetup.sh
including sdk/bash_completion/adb.bash
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/android$ lunch


You're building on Linux


Lunch menu... pick a combo:
     1. aosp_arm-eng
     2. aosp_x86-eng
     3. aosp_mips-eng
     4. vbox_x86-eng
     5. octopus_f1-eng
     6. octopus_f1-user
     7. octopus_perf-eng
     8. octopus_perf-user
     9. aosp_mako-userdebug
     10. aosp_hammerhead-userdebug
     11. aosp_manta-userdebug
     12. mini_x86-userdebug
     13. mini_mips-userdebug
     14. mini_armv7a_neon-userdebug
     15. aosp_tilapia-userdebug
     16. aosp_deb-userdebug
     17. aosp_grouper-userdebug
     18. aosp_flo-userdebug


Which would you like? [aosp_arm-eng] 5


============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.4.4
TARGET_PRODUCT=octopus_f1
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a7
HOST_ARCH=x86
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=KTU84Q
OUT_DIR=out
============================================


rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/android$ extract-bsp 
/home/wwt/f1_a83t_android4.4/android/device/softwinner/octopus-f1/bImage copied!
/home/wwt/f1_a83t_android4.4/android/device/softwinner/octopus-f1/modules copied!
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/android$ 
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/android$ make -j12


including ./external/apache-xml/Android.mk ...
including ./external/bison/Android.mk ...
including ./external/blktrace/Android.mk ...
including ./external/bluetooth/bluedroid/Android.mk ...
including ./external/bouncycastle/Android.mk ...
including ./external/bsdiff/Android.mk ...
including ./external/bzip2/Android.mk ...
including ./external/ceres-solver/Android.mk ...
including ./external/checkpolicy/Android.mk ...
including ./external/chromium-libpac/Android.mk ...
including ./external/chromium/Android.mk ...
including ./external/chromium_org/Android.mk ...
build/core/base_rules.mk:134: *** external/chromium_org/android_webview: MODULE.TARGET.JAVA_LIBRARIES.android_webview_java already defined by device/softwinner/common/prebuild-common/google/frameworks。 停止。
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/android$ cd device/softwinner/common/prebuild-common/google/frameworks
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/android/device/softwinner/common/prebuild-common/google/frameworks$ 
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/android/device/softwinner/common/prebuild-common/google/frameworks$ mv Android.mk Android.mk_bak
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/android/device/softwinner/common/prebuild-common/google/frameworks$ cd -
/home/wwt/f1_a83t_android4.4/android
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/android$ make -j12
rootroot@cm-System-Product-Name:/home/wwt/f1_a83t_android4.4/android$ pack

0 0