# BSP内核移植FBTFT
首先吧fbtft从主线目录拷贝到bsp目录
修改Makefile和Kconfig
~~~
obj-$(CONFIG_FB_TFT) += fbtft/
source "drivers/staging/fbtft/Kconfig"
~~~
编译出错:
~~~
drivers/staging/fbtft/fbtft-bus.c: In function 'fbtft_write_vmem16_bus8':
drivers/staging/fbtft/fbtft-bus.c:130:28: error: 'struct fb_info' has no member named 'screen_buffer'
~~~
修改include/linux/fb.h:L839
~~~
union {
char __iomem *screen_base; /* Virtual address */
char *screen_buffer;
};
~~~
出错:
~~~
drivers/staging/fbtft/fbtft-core.c: In function 'fbtft_request_gpios':
drivers/staging/fbtft/fbtft-core.c:148:4: error: implicit declaration of function 'devm_gpio_request_one' [-Werror=implicit-function-declaration]
CC drivers/video/sunxi/disp2/disp/de/disp_manager.o
drivers/staging/fbtft/fbtft-core.c: In function 'fbtft_framebuffer_alloc': CC drivers/video/sunxi/disp2/disp/de/disp_private.o
drivers/staging/fbtft/fbtft-core.c:753:3: error: implicit declaration of function 'devm_kcalloc' [-Werror=implicit-function-declaration]
drivers/staging/fbtft/fbtft-core.c:753:16: warning: assignment makes pointer from integer without a cast [enabled by default]
drivers/staging/fbtft/fbtft-core.c: In function 'fbtft_probe_common':
drivers/staging/fbtft/fbtft-core.c:1403:23: error: 'struct spi_master' has no member named 'bits_per_word_mask'
drivers/staging/fbtft/fbtft-core.c:1403:3: error: implicit declaration of function 'SPI_BPW_MASK' [-Werror=implicit-function-declaration]
CC drivers/video/sunxi/disp2/disp/de/disp_smart_backlight.o
~~~
新内核使用了devm前缀的函数,说明参考这里:
http://blog.csdn.net/cc289123557/article/details/52137803
改回旧版本接口
~~~
int devm_gpio_request_one(struct device *dev, unsigned gpio,
unsigned long flags, const char *label)
int gpio_request_one(unsigned gpio, unsigned long flags, const char *label)
~~~
出错:
spi结构体,注释掉相应部分。(9bit没用到)
~~~
drivers/staging/fbtft/fbtft-core.c: In function 'fbtft_probe_common':
drivers/staging/fbtft/fbtft-core.c:1403:23: error: 'struct spi_master' has no member named 'bits_per_word_mask'
drivers/staging/fbtft/fbtft-core.c:1403:3: error: implicit declaration of function 'SPI_BPW_MASK' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
scripts/Makefile.build:307: recipe for target 'drivers/staging/fbtft/fbtft-core.o' failed
make[3]: *** [drivers/staging/fbtft/fbtft-core.o] Error 1
make[3]: *** Waiting for unfinished jobs....
CC drivers/video/sunxi/disp2/disp/dev_disp.o
drivers/staging/fbtft/flexfb.c: In function 'flexfb_probe_common':
drivers/staging/fbtft/flexfb.c:688:24: error: 'struct spi_master' has no member named 'bits_per_word_mask'
drivers/staging/fbtft/flexfb.c:689:8: error: implicit declaration of function 'SPI_BPW_MASK' [-Werror=implicit-function-declaration]
CC drivers/video/sunxi/disp2/disp/dev_fb.o
CC drivers/video/sunxi/disp2/disp/dev_disp_debugfs.o
cc1: some warnings being treated as errors
~~~
编译通过。
加载方式:
~~~
ili9341@0 {
compatible = "ilitek,ili9341";
reg = <0>;
spi-max-frequency = <50000000>;
rotate = <270>;
bgr;
fps = <30>;
buswidth = <8>;
reset-gpios = <&pio 1 7 GPIO_ACTIVE_LOW>;
dc-gpios = <&pio 1 5 GPIO_ACTIVE_LOW>;
debug = <0>;
};
~~~
- 前言
- 荔枝派TODO任务领取
- linux使用小贴士
- 入门篇
- 板卡介绍
- 开箱指南
- 烧录启动系统
- 联网方法
- 镜像使用
- 镜像说明
- buildroot系统使用
- debian系统使用
- 外设操作
- 外设操作概览
- 低速外设
- GPIO
- GPIO模拟低速接口
- UART
- PWM
- I2C
- SPI
- 高速接口
- SDIO
- USB
- EtherNet
- DVP CSI
- MIPI CSI
- 模拟外设
- CODEC
- LRADC
- 常见设备驱动
- USB摄像头
- USB 3G/4G 网卡
- 舵机
- 开发篇
- UBOOT适配
- UBOOT编译
- UBOOT配置
- UBOOT配置屏幕分辨率
- UBOOT配置SPI启动
- Linux内核开发
- Linux内核编译
- BSP Linux内核编译.md
- Linux内核选项
- 外设驱动与设备树
- RTL8723BS驱动
- 根文件系统定制
- buildroot定制系统
- buildroot添加软件包
- openwrt定制系统
- emdebian定制系统
- camdriod开发
- camdriod编译
- 主线Uboot引导Camdriod
- 系统镜像打包
- XBOOT适配
- 荔枝运行XBOOT
- 应用篇
- 游戏机-基于EmulationStation
- 游戏机-gnuboy
- 语音识别-科大讯飞云
- GUI-QT5
- 语音识别-离线关键词识别
- 路由器-Lichee Zero
- 投稿文章
- 荔枝派Zero开箱指南
- Zero i2c oled使用指南
- zero SPI LCD使用指南
- Zero u-boot编译和使用指南
- TF WiFi使用方法
- Zero Ethernet使用指南
- Zero 移植Qt5.4.1
- ZeroSpiNorFlash启动系统制作指南
- Visio-uboot-sunxi流程
- lichee 编译踩坑记录(ilichee ZERO)
- lichee_zero_外设GPIO接口
- TF WIFI 小白编
- 从零开始LicheePi Zero的开发
- 认识Zero的硬件
- 搭建Zero的开发环境
- 主线Uboot
- 主线kernel
- BSP kernel
- BSP内核启动
- bsp内核的摄像头使用
- BSP内核中的保留内存
- uboot启动BSP内核常见错误
- BSP内核 FBTFT移植
- BSP内核启动错误及警告解决
- buildroot 根文件系统
- emdebian 根文件系统
- SPI Flash 系统编译
- sunxi-fel增加对16M 以上flash的支持
- overlayfs的使用
- jffs2系统挂载不上的常见原因
- JFFS2 文件系统简介
- uboot对spi flash的识别
- bsp内核的SPI flash启动
- Docker开发环境
- Docker 命令速查
- 基础ubuntu系统配置
- docker离线镜像
- Zero系统烧录
- dd镜像烧录
- 分区镜像烧录
- SPI Flash系统烧录
- 一键镜像烧录
- Zero外设把玩
- I2C操作
- PWM输出
- CODEC的使用
- 以太网使用指南
- GPIO操作
- 文件IO方式
- C语言接口(mmap)
- Python操作GPIO
- pinctrl-sunxi介绍
- UART操作
- 点屏
- 点屏之RGB屏
- 点屏之SPI屏 ili9341
- 点屏之SPI OLED
- 点屏之I2C OLED
- 点屏之SPI屏 ili9488
- 点屏之MCU屏
- 点屏之触摸屏驱动
- 点屏之simple-framebuffer
- 点屏之屏幕时序
- 时钟控制器CCM
- 摄像头
- BSP DVP摄像头
- BSP MIPI 摄像头
- 主线DVP摄像头
- 主线 MIPI摄像头
- SPI 操作
- 应用层开发
- 开机自启动
- Segment Fault调试
- Zero通过OTG共享PC网络
- USB摄像头使用
- 基于QT的GUI开发
- 移植tslib
- 移植QT5.9.1
- 移植QT4.8.7
- QtCreator使用
- Qt5.x移植到Qt4.8
- Qt字体相关
- Qt移植总结
- Qt裁剪
- Qt去除鼠标指针显示
- zero_imager使用
- 驱动开发
- 设备树简介
- GPU/DRM 显示驱动
- sys下设备树查看
- atmel触摸屏驱动分析
- atmel触摸屏中断改轮询
- uboot下gpio操作
- helloworld驱动编译演示
- FBTFT分析
- 内核模块静态加载的顺序
- SPI驱动分析
- SPI 驱动编写
- Uboot开发
- 开机logo
- 看门狗的使用
- 关于系统reboot
- 内核printk等级设置