9073| 1
|
[教程] 把Robopeak MiniTFT小屏驱动编译进树莓派内核(修正官方教程错... |
本帖最后由 FishX 于 2014-7-7 20:59 编辑 官方的教程和源代码有一点BUG,我在此修正并重新发布一下1) 把下载回来的驱动中的linux-driver文件夹改名为robopeak后复制到内核源码的drivers/video文件夹把和linux-driver并列的common下的inc下的protocol.h文件复制到内核源码的drivers/video/robopeak/src/inc/下 2) 进入小屏源码文件夹wenjiancd drivers/video/robopeak把NewMakefile覆盖Makefile,老的Makefile是独立编译驱动用的,用在内核编译不合适cp NewMakeifle Makefile# Platform or fallback drivers go here 3) 编辑drivers/video下的Kconfig文件nano drivers/video/Kconfig在comment "Frame buffer hardware drivers"这行的后面加入 source "drivers/video/robopeak/Kconfig" 4) 编辑drivers/video下的Makefile文件(官方教程少了此步)nano drivers/video/Makefile在# Platform or fallback drivers go here这行的前边加入obj-$(CONFIG_FB_RPUSBDISP) += robopeak/5)修正驱动头文件引用错误nano robopeak/src/inc/common.h把这几行中的inc/去掉#include "inc/types.h" #include "inc/drvconf.h" #include "inc/devconf.h" #include "inc/protocol.h" 变为 #include "types.h" #include "drvconf.h" #include "devconf.h" #include "protocol.h" 5) 编译前运行menuconfigmake ARCH=arm CROSS_COMPILE=../RpiTools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/bin/arm-bcm2708hardfp-linux-gnueabi- menuconfig 6) 在菜单"Device Drivers -> Graphic supports -> Support for frame buffer display"中选择Robopeak USB Display8) 把Robopeak USB Display设置为模块 (这个选择自动激活了framebuffer选项) 7) 正常编译内核可参考我的教程: https://mc.dfrobot.com.cn/thread-2707-1-1.html |
© 2013-2024 Comsenz Inc. Powered by Discuz! X3.4 Licensed