CubieBoard中文论坛

 找回密码
 立即注册
搜索
热搜: unable
查看: 8072|回复: 3

Cubieboard2-Android-Cubie-Screen 模组调试说明 修正1可以显示了 wi...

[复制链接]
发表于 2015-6-2 18:03:40 | 显示全部楼层 |阅读模式
Cubieboard2-Android-Cubie-Screen 模组调试说明 修正1可以显示了 windows ANSI.txt

CUBIEBOARD
http://cubie.cc
Fucking cool, 深刻的嵌入式技术和应用讨论社区

Cubieboard2 Android Cubie-Screen 模组调试说明 修正1可以显示了(触摸屏等待修正,反正可以用鼠标)
Cubie-Screen

Website:http://cubieboard.org/
Support: support@cubietech.com  




文档版本        作者        初审        再审
V-0.1-20141226        payne        A.K        Parker




内容目录
1.概要 ..........................................................................................................4
2.硬件要求.......................................................................................................4
3.软件要求.......................................................................................................4
    3.1 SDK 开发包 ..............................................................................................4
        3.1.1 百度云下载.........................................................................................4
        3.1.2 github 下载........................................................................................4
4.Cubieboard2 Cubie-Screen 移植..................................................................................4
    4.1 CB2 驱动源码.............................................................................................4
        4.1.1 下载源码...........................................................................................4
        4.1.2 拷贝相关文件.......................................................................................5
    4.2 系统配置.................................................................................................5
    4.3 内核配置.................................................................................................7
    4.4 编译....................................................................................................10
        4.4.1 编译内核..........................................................................................10
        4.4.2 编译 android......................................................................................10
        4.4.3 固件生成..........................................................................................11
    4.5 烧写固件................................................................................................11




1.概要  
    本文档是基于 Cubieboard2 的 Android 操作系统使用 Cubie-Screen 模块实现小屏显示操作功能, Cubie-Screen 小巧方便灵活,适合没有显示屏的用户使用。


2.硬件要求
    ?  Cubieboard2
    ?  方糖电子 Cubie-Screen 屏
    ?  一个鼠标、键盘


3.软件要求

3.1 SDK 开发包  

3.1.1 百度云下载
http://pan.baidu.com/s/1kTFXnPP  

3.1.2 github下载
git clone https://bitbucket.org/cubietech/a20-android4.2_lichee.git
git clone https://bitbucket.org/cubietech/a20-android4.2_android.git


4.Cubieboard2 Cubie-Screen移植

4.1 CB2 驱动源码

4.1.1 下载源码
http://pan.baidu.com/s/1hquyzB2#path=%2FAdd-On%2FCubieScreen for CB1%26CB2%2F 源码

http://pan.baidu.com/s/1hquyzB2# ... 2590%25E7%25A0%2581
E:\BaiduYunDownload\cubieboard2开发板的资料\cubieboard店资料---0827\cubieboard3.5寸屏资料\CubieScreen for CB1&CB2\源码
android-cbcs-source.7z
解压:
$ 7z x android-cbcs-source.7z  


4.1.2 拷贝相关文件

拷贝 touchscreen 驱动(这里有问题,编译出错!暂时不拷贝)
V:\lichee\linux-3.4\drivers\input\sw_touchscreen\ft5x
$ cp android-cbcs-source/CB2/driver/touchscreen/* a20-android/lichee/linux-3.4/drivers/input/sw_touchscreen/ft5x/
rootroot@rootroot-E400:~/wyb$ cp android-cbcs-source/CB2/driver/touchscreen/* cubieboard2_sdk_20140508/lichee/linux-3.4/drivers/input/sw_touchscreen/ft5x/

rootroot@rootroot-E400:~/wyb/android-cbcs-source/CB2/driver/touchscreen$ ll
total 104
drwxrwxr-x 2 rootroot rootroot  4096  1?. 6 14:50 ./
drwxrwxr-x 4 rootroot rootroot  4096  1?. 6 14:50 ../
-rw-rw-r-- 1 rootroot rootroot 48521  8?.16  2014 ft5x_ts.c
-rw-rw-r-- 1 rootroot rootroot 48521 12?. 8 11:07 ft5x_ts.h


拷贝 disp 相关文件
V:\lichee\linux-3.4\drivers\video\sun7i\disp
$ cp android-cbcs-source/CB2/driver/video/disp/* a20-android/lichee/linux-3.4/drivers/video/sun7i/disp
rootroot@rootroot-E400:~/wyb$ cp android-cbcs-source/CB2/driver/video/disp/* cubieboard2_sdk_20140508/lichee/linux-3.4/drivers/video/sun7i/disp/

rootroot@rootroot-E400:~/wyb/android-cbcs-source/CB2/driver/video/disp$ ll
total 60
drwxrwxr-x 2 rootroot rootroot  4096  1?. 6 14:50 ./
drwxrwxr-x 4 rootroot rootroot  4096  1?. 6 14:50 ../
-rw-rw-r-- 1 rootroot rootroot 48766  8?.16  2014 disp_lcd.c
-rw-rw-r-- 1 rootroot rootroot  2169  8?.16  2014 disp_lcd.h


拷贝 lcd 相关文件(!!!!会有替换的!!!!)
$ cp android-cbcs-source/CB2/driver/video/lcd/* a20-android/lichee/linux-3.4/drivers/video/sun7i/lcd
rootroot@rootroot-E400:~/wyb$ cp android-cbcs-source/CB2/driver/video/lcd/* cubieboard2_sdk_20140508/lichee/linux-3.4/drivers/video/sun7i/lcd

rootroot@rootroot-E400:~/wyb/android-cbcs-source/CB2/driver/video/lcd$ ll
total 24
drwxrwxr-x 2 rootroot rootroot 4096  1?. 6 14:50 ./
drwxrwxr-x 4 rootroot rootroot 4096  1?. 6 14:50 ../
-rw-rw-r-- 1 rootroot rootroot 8397  8?.16  2014 lcd0_panel_cfg.c
-rw-rw-r-- 1 rootroot rootroot 2671  8?.16  2014 lcd_panel_cfg.h


拷贝 ctp 头文件
V:\lichee\linux-3.4\include\linux
$ cp android-cbcs-source/CB2/driver/ctp.h a20-android/lichee/linux-3.4/include/linux/
rootroot@rootroot-E400:~/wyb$ cp android-cbcs-source/CB2/driver/ctp.h cubieboard2_sdk_20140508/lichee/linux-3.4/include/linux/

rootroot@rootroot-E400:~/wyb/android-cbcs-source/CB2/driver$ ll
total 20
drwxrwxr-x 4 rootroot rootroot 4096  1?. 6 14:50 ./
drwxrwxr-x 5 rootroot rootroot 4096  1?. 7 09:41 ../
-rw-rw-r-- 1 rootroot rootroot 1552  8?.16  2014 ctp.h
drwxrwxr-x 2 rootroot rootroot 4096  1?. 6 14:50 touchscreen/
drwxrwxr-x 4 rootroot rootroot 4096  1?. 6 14:50 video/


!!!!说明书不会告诉你的!!!!
还需要拷贝:
Z:\wyb\android-cbcs-source\CB2\kernel_config\cubieboard2_config  (这个文件貌似不是太重要)
拷贝为:V:\lichee\linux-3.4\.config

Z:\wyb\android-cbcs-source\CB2\sys_config\sys_config.fex (这个文件重要,但是原始拷贝过去,被光亮,LCD还是不会有显示了。需要修改!确认分辨率为800*480,即为480p)

;-------------------------------------------------------------------------------
;disp init configuration
;
;disp_mode            (0:screen0<screen0,fb0> 1:screen1<screen1,fb0> 2:two_diff_screen_diff_contents<screen0,screen1,fb0,fb1>
;                      3:two_same_screen_diff_contets<screen0,screen1,fb0> 4:two_diff_screen_same_contents<screen0,screen1,fb0>)
;screenx_output_type  (0:none; 1:lcd; 2:tv; 3:hdmi; 4:vga)
;screenx_output_mode  (used for tv/hdmi output, 0:480i 1:576i 2:480p 3:576p 4:720p50 5:720p60 6:1080i50 7:1080i60 8:1080p24 9:1080p50 10:1080p60 11:pal 14:ntsc)
;screenx_output_mode  (used for vga output, 0:1680*1050 1:1440*900 2:1360*768 3:1280*1024 4:1024*768 5:800*600 6:640*480 10:1920*1080 11:1280*720)
;fbx format           (4:RGB655 5:RGB565 6:RGB556 7:ARGB1555 8:RGBA5551 9:RGB888 10:ARGB8888 12:ARGB4444)
;fbx pixel sequence   (0:ARGB 1:BGRA 2:ABGR 3:RGBA) --- 0 for linux, 2 for android
;lcd0_bright          (lcd0 init bright,the range:[0,256],default:197
;lcd1_bright          (lcd1 init bright,the range:[0,256],default:197
;-------------------------------------------------------------------------------
[disp_init]
disp_init_enable        = 1
disp_mode               = 0

screen0_output_type     = 1
;screen0_output_mode     = 4
screen0_output_mode     = 2


;----------------------------------------------------------------------------------
;boot display configuration
;output_type  (0:none; 1:lcd; 2:tv; 3:hdmi; 4:vga)
;output_mode  (used for tv/hdmi output, 0:480i 1:576i 2:480p 3:576p 4:720p50 5:720p60 6:1080i50 7:1080i60 8:1080p24 9:1080p50 10:1080p60 11:pal 14:ntsc)
;output_mode  (used for vga output, 0:1680*1050 1:1440*900 2:1360*768 3:1280*1024 4:1024*768 5:800*600 6:640*480 10:1920*1080 11:1280*720)
;auto_hpd     (auto detect hdmi/cvbs/ypbpr plug in)
;----------------------------------------------------------------------------------
[boot_disp]
output_type              = 1
;output_mode              = 4
output_mode              = 2
auto_hpd                 = 1


4.2 系统配置

路径:lichee/tools/pack/chips/sun7i/configs/android/sugar-cubieboard2/sys_config.fex
V:\lichee\tools\pack\chips\sun7i\configs\android\sugar-cubieboard2\sys_config.fex

主要配置 disp_init  ctp_para  lcd0_para 部分

具体配置:
[disp_init]

[ctp_para]

[lcd0_para]





回复

使用道具 举报

 楼主| 发表于 2015-6-2 18:04:01 | 显示全部楼层
4.3 内核配置(触摸屏已经默认选中了,没有调试通,压后了!)

配置内核以支持 ft5x touchscreen 驱动,这里是以模块的方式编译进内核
进入内核根目录:
rootroot@rootroot-E400:~/wyb$
rootroot@rootroot-E400:~/wyb$ cd cubieboard2_sdk_20140508/lichee/linux-3.4/

拷贝内核自带配置文件 cubieboard2_config 到内核根目录并改名为.config,如下图:
rootroot@rootroot-E400:~/wyb/cubieboard2_sdk_20140508/lichee/linux-3.4$
rootroot@rootroot-E400:~/wyb/cubieboard2_sdk_20140508/lichee/linux-3.4$ cp arch/arm/configs/cubieboard2_config .config

打开内核配置界面
rootroot@rootroot-E400:~/wyb/cubieboard2_sdk_20140508/lichee/linux-3.4$
rootroot@rootroot-E400:~/wyb/cubieboard2_sdk_20140508/lichee/linux-3.4$ make menuconfig

如下图:

ft5x touchscreen 驱动路径:
--->Device Drivers
    --->Input device support
        ---> sw Touchscreens
            ---> ft5x Touchscreens driver   

默认没有选上“sw Touchscreens ” ,需要将其选为“*” ,进入下一层将“ft5x touchscreen driver”选项选为“*” ,将其编译进内核

如下图所示:

退出保存,选择“Yes”

注:这个路径也是 ft5x touchscreen 驱动文件所在位置:


4.4 编译

4.4.1 编译内核

进入源码 lichee 目录
$cd A20-android/lichee/

推荐(清除临时文件之后再编译):
rootroot@rootroot-E400:~/wyb/cubieboard2_sdk_20140508/lichee/linux-3.4$ make clean

编译
$./build.sh -p sun7i_android

编译内核完成:


4.4.2 编译 android

进入源码 android 目录:
$cd ../android/

清除之前编译产物(必须清除,默认是按照HDMI分辨率编译的,不使用clean编译LCD屏幕就不会有显示!):
$make clean

初始化编译环境,并引入一些辅助的 Shell 函数:
$source build/envsetup.sh           

注:“source build/envsetup.sh”引入了 build/envsetup.sh 脚本,这其中就包括下步使用 lunch 函数

调用 lunch 函数,并指定参数为”sugar_cubieboard2-eng”:
$lunch 15

拷贝内核和模块:
$extract-bsp

编译:
$make -j8   

注:“8”为 CPU 线程数,要根据自己的 PC 机更改

编译完成:


4.4.3  固件生成

打包生成固件

$pack

生成路径:


4.5 烧写固件

http://pan.baidu.com/s/1c0phjOk# ... rd2%2FDoc%2Fandroid


参考资料:
http://www.cubie.cc/forum.php?mo ... 7&highlight=lcd
cubieboard2 加入3.5寸触摸编译出镜像后启动android, LCD没显示

http://www.cubie.cc/forum.php?mo ... &extra=page%3D1
Cubieboard2 android编译及制作固件 [复制链接]

http://blog.csdn.net/lynchyo/article/details/38292407
[原]cubieboard2 android内核与源码编译、内核配置



回复 支持 反对

使用道具 举报

发表于 2015-7-23 16:40:09 | 显示全部楼层
请问你弄好了触摸板那一块的?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2015-7-30 16:19:05 | 显示全部楼层
twj5817 发表于 2015-7-23 16:40
请问你弄好了触摸板那一块的?

折腾了几天,放弃,使用USB鼠标了。你做到哪一个步骤了呀!?????
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|粤ICP备13051116号|cubie.cc---深刻的嵌入式技术讨论社区

GMT+8, 2024-3-28 18:18 , Processed in 0.024962 second(s), 15 queries .

Powered by Discuz! X3.4

© 2001-2012 Comsenz Inc. | Style by Coxxs

返回顶部