全志的R58平台的原始SDK调通SC5806的开发板(lunch octopus_perf-eng)

来源:互联网 发布:淘宝神笔网址 编辑:程序博客网 时间:2024/05/15 16:47
全志的R58平台的原始SDK调通SC5806的开发板(lunch octopus_perf-eng)


开发板:索智的SC5806
SDK:android4.4.4,linux3.4.39


1、LCD+CTP
需要修改的文件:
直接替换(DDR的配置不对的话,系统都刷不进去)
R:\wyb\perf3_r58_sc5806\lichee\tools\pack\chips\sun8iw6p1\configs\f1\sys_config.fex


触摸屏的文件:
R:\wyb\perf3_r58_sc5806\lichee\linux-3.4\drivers\input\touchscreen\gslx680new\Makefile


uboot中的LCD显示驱动:
R:\wyb\perf3_r58_sc5806\lichee\brandy\u-boot-2011.09\drivers\video_sunxi\sunxi_v3\obj_video
内核中的LCD显示驱动:
R:\wyb\perf3_r58_sc5806\lichee\linux-3.4\drivers\video\sunxi\disp2\disp\Makefile


开机要显示必须重新编译uboot
rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/android$ cd ../lichee/brandy/
rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/lichee/brandy$ ./build.sh -p sun8iw6p1




rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/lichee/brandy$ 
rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/lichee/brandy$ cd ..
rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/lichee$ ./build.sh config


Welcome to mkscript setup progress
All available chips:
   0. sun50iw1p1
   1. sun8iw1p1
   2. sun8iw3p1
   3. sun8iw5p1
   4. sun8iw6p1
   5. sun8iw7p1
   6. sun8iw8p1
   7. sun8iw9p1
   8. sun9iw1p1
Choice: 4
All available platforms:
   0. android
   1. dragonboard
   2. linux
   3. camdroid
Choice: 0
All available kernel:
   0. linux-3.4
Choice: 0
All available boards:
   0. f1
   1. fpga
   2. n1
   3. perf1_v1_0
   4. perf2_v1_0
   5. perf3_v1_0
   6. qc
Choice: 5
rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/lichee$ 
rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/lichee$ cd linux-3.4
rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/lichee/linux-3.4$ make ARCH=arm menuconfig


Device Drivers  --->
Input device support  --->
[*]   Touchscreens  --->


<M>   gslX680NEW touchscreen driver
修改为:
<*>   gslX680NEW touchscreen driver




rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/lichee/linux-3.4$ cp .config bak2_ctp.config
rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/lichee/linux-3.4$ cd ..
rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/lichee$ ./build.sh 
rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/lichee$ cd ../android/
rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/android$ source build/envsetup.sh 
including device/asus/grouper/vendorsetup.sh
including device/asus/tilapia/vendorsetup.sh
including device/asus/flo/vendorsetup.sh
including device/asus/deb/vendorsetup.sh
including device/lge/hammerhead/vendorsetup.sh
including device/lge/mako/vendorsetup.sh
including device/generic/x86/vendorsetup.sh
including device/generic/armv7-a-neon/vendorsetup.sh
including device/generic/mips/vendorsetup.sh
including device/softwinner/octopus-f1/vendorsetup.sh
including device/softwinner/octopus-n1/vendorsetup.sh
including device/softwinner/astar-y3/vendorsetup.sh
including device/softwinner/octopus-perf/vendorsetup.sh
including device/softwinner/common/vendorsetup.sh
including device/softwinner/kylin-p1/vendorsetup.sh
including device/samsung/manta/vendorsetup.sh
including sdk/bash_completion/adb.bash
rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/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. aosp_grouper-userdebug
     6. aosp_tilapia-userdebug
     7. aosp_flo-userdebug
     8. aosp_deb-userdebug
     9. aosp_hammerhead-userdebug
     10. aosp_mako-userdebug
     11. mini_x86-userdebug
     12. mini_armv7a_neon-userdebug
     13. mini_mips-userdebug
     14. octopus_f1-eng
     15. octopus_f1-user
     16. octopus_n1-eng
     17. octopus_n1-user
     18. astar_y3-eng
     19. astar_y3-user
     20. octopus_perf-eng
     21. octopus_perf-user
     22. kylin_p1-eng
     23. kylin_p1-user
     24. aosp_manta-userdebug


Which would you like? [aosp_arm-eng] 20


============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.4.4
TARGET_PRODUCT=octopus_perf
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@rootroot-E400:~/wyb/perf3_r58_sc5806/android$ 


rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/android$ extract-bsp 
/home/rootroot/wyb/perf3_r58_sc5806/android/device/softwinner/octopus-f1/bImage copied!
/home/rootroot/wyb/perf3_r58_sc5806/android/device/softwinner/octopus-f1/modules copied!
rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/android$ make bootimage
rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/android$ pack


LCD可以显示了,CTP有反应。




2、调通AP6212的WIFI和BT:
R:\wyb\perf3_r58_sc5806\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 := 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 := ap6212
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/softwinner/octopus-perf/bluetooth/




这里不用修改:
R:\wyb\perf3_r58_sc5806\android\device\softwinner\octopus-f1\init.sun8i.rc
R:\wyb\perf3_r58_sc5806\android\device\softwinner\octopus-f1\octopus_f1.mk


不用修改:
R:\wyb\perf3_r58_sc5806\android\device\softwinner\octopus-f1\overlay\frameworks\base\core\res\res\values\config.xml


R:\wyb\perf3_r58_sc5806\android\device\softwinner\octopus-f1\bluetooth\vnd_octopus-f1.txt
#Set baudrate to 1500000
UART_TARGET_BAUD_RATE=1500000


R:\wyb\perf3_r58_sc5806\android\device\softwinner\octopus-perf\bluetooth\bt_vendor.conf
#Firmware name
#FwPatchFileName = bcm20710a1.hcd
FwPatchFileName = bcm43438a0.hcd


不用修改
R:\wyb\perf3_r58_sc5806\android\device\softwinner\octopus-f1\bluetooth\bdroid_buildcfg.h


直接替换
R:\wyb\perf3_r58_sc5806\lichee\tools\pack\chips\sun8iw6p1\configs\f1\sys_config.fex


不用修改
R:\wyb\perf3_r58_sc5806\android\frameworks\base\packages\SettingsProvider\res\values\defaults.xml


这里也必须要添加AP6212的WIFI和BT的选项:
R:\wyb\perf3_r58_sc5806\android\hardware\broadcom\wlan\bcmdhd\firmware\firmware-bcm.mk
R:\wyb\perf3_r58_sc5806\android\hardware\broadcom\libbt\Android.mk




rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/lichee/linux-3.4$ make clean
rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/lichee/linux-3.4$ make ARCH=arm menuconfig
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
(/system/vendor/modules/config.txt) Config path
修改为:
<M>   Broadcom FullMAC wireless cards support
(/system/vendor/modules/fw_bcm43438a0.bin) Firmware path
(/system/vendor/modules/nvram_ap6212.txt) NVRAM path
(/system/vendor/modules/config.txt) Config path

<M>   Realtek 8723B SDIO or SPI WiFi
取消选中:
< >   Realtek 8723B SDIO or SPI WiFi




rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/lichee/linux-3.4$ cp .config bak3_wifi.config
rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/lichee/linux-3.4$ rm output -rf
rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/lichee$ cd ..
rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/lichee$ rm out/ -rf
rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/lichee$ ./build.sh 
rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/lichee$ cd ../android/
rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/android$ source build/envsetup.sh 
including device/asus/grouper/vendorsetup.sh
including device/asus/tilapia/vendorsetup.sh
including device/asus/flo/vendorsetup.sh
including device/asus/deb/vendorsetup.sh
including device/lge/hammerhead/vendorsetup.sh
including device/lge/mako/vendorsetup.sh
including device/generic/x86/vendorsetup.sh
including device/generic/armv7-a-neon/vendorsetup.sh
including device/generic/mips/vendorsetup.sh
including device/softwinner/octopus-f1/vendorsetup.sh
including device/softwinner/octopus-n1/vendorsetup.sh
including device/softwinner/astar-y3/vendorsetup.sh
including device/softwinner/octopus-perf/vendorsetup.sh
including device/softwinner/common/vendorsetup.sh
including device/softwinner/kylin-p1/vendorsetup.sh
including device/samsung/manta/vendorsetup.sh
including sdk/bash_completion/adb.bash
rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/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. aosp_grouper-userdebug
     6. aosp_tilapia-userdebug
     7. aosp_flo-userdebug
     8. aosp_deb-userdebug
     9. aosp_hammerhead-userdebug
     10. aosp_mako-userdebug
     11. mini_x86-userdebug
     12. mini_armv7a_neon-userdebug
     13. mini_mips-userdebug
     14. octopus_f1-eng
     15. octopus_f1-user
     16. octopus_n1-eng
     17. octopus_n1-user
     18. astar_y3-eng
     19. astar_y3-user
     20. octopus_perf-eng
     21. octopus_perf-user
     22. kylin_p1-eng
     23. kylin_p1-user
     24. aosp_manta-userdebug


Which would you like? [aosp_arm-eng] 20


============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.4.4
TARGET_PRODUCT=octopus_perf
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@rootroot-E400:~/wyb/perf3_r58_sc5806/android$ 


rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/android$ make clean
============================================
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
============================================
PRODUCT_COPY_FILES device/softwinner/octopus-common/hardware/audio/audio_policy.conf:system/etc/audio_policy.conf ignored.
PRODUCT_COPY_FILES device/softwinner/octopus-common/hardware/audio/phone_volume.conf:system/etc/phone_volume.conf ignored.
No private recovery resources for TARGET_DEVICE octopus-f1
Entire build directory removed.
rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/android$ 
rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/android$ extract-bsp 
/home/wwt/f1_r58_sc5806/android/device/softwinner/octopus-f1/bImage copied!
/home/wwt/f1_r58_sc5806/android/device/softwinner/octopus-f1/modules copied!
rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/android$ make -j8
rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/android$ pack


AP6212的WIFI和BT都可以用了




3、打开以太网卡:
R:\wyb\perf3_r58_sc5806\lichee\tools\pack\chips\sun8iw6p1\configs\f1\sys_config.fex
修改:
gmac_used          = 0
为:
gmac_used          = 1




系统系统的时候需要加载以太网驱动模块:sunxi_gmac.ko
R:\wyb\perf3_r58_sc5806\android\device\softwinner\octopus-f1\init.sun8i.rc
# insmod network
    insmod /system/vendor/modules/sunxi_gmac.ko




编译一下内核和android既可以了,不需要重新编译。




4、去掉Google Play
R:\wyb\perf3_r58_sc5806\android\device\softwinner\octopus-perf\octopus_perf.mk
使用#关闭最后一行:
#include device/softwinner/common/prebuild-common/google/products/gms_base.mk


R:\wyb\perf3_r58_sc5806\android\device\softwinner\common\prebuild-common\google\frameworks\Android.mk
将修改为Android_bak.mk或者直接删除。
将android执行make clean之后重新编译,打包即可。




5、打开USB摄像头(加载UVC之后还是出错)
rootroot@rootroot-E400:~/wyb/perf3_r58_sc5806/lichee/linux-3.4$ make ARCH=arm menuconfig
Device Drivers  --->
<*> Multimedia support  --->
[*]   Video capture adapters  --->
[*]   V4L USB devices  --->
--- V4L USB devices
< >   USB Video Class (UVC)
修改为:
<*>   USB Video Class (UVC)

[*]     UVC input events device support

编译内核之后,
shell@octopus-perf:/dev $ ll v*
crw------- root     root       7,   0 2016-11-10 15:03 vcs
crw------- root     root       7,   1 2016-11-10 15:03 vcs1
crw------- root     root       7, 128 2016-11-10 15:03 vcsa
crw------- root     root       7, 129 2016-11-10 15:03 vcsa1
crwxrwx--- media    media     81,   0 2016-11-10 15:03 video0
crwxrwx--- media    media     81,   1 2016-11-10 15:03 video1
shell@octopus-perf:/dev $ 


系统自带的Camera应用不能打开USB摄像头。
有可能是错配的CSI接口的摄像头,具体原因待查。

0 0
原创粉丝点击