• 正文
    • 添加驱动
    • 编译测试
  • 相关推荐
申请入驻 产业图谱

飞凌嵌入式ElfBoard ELF 1板卡-开发板适配之蓝牙

03/03 09:50
1043
加入交流群
扫码加入
获取工程师必备礼包
参与热点资讯讨论

添加驱动

RTL8723DU还具备蓝牙功能,现在我们添加ELF 1开发板对RTL8723DU蓝牙功能的支持。

一、RTL8723DU蓝牙驱动在ELF 1开发板资料包2-Linux 源代码 02-1 驱动源码8_realtekbluetoothrtkbt

将这几个文件复制到内核源码的drivers/bluetooth/目录下。

另外在ELF 1开发板资料包2-Linux 源代码 02-1 驱动源码8_realtekbluetoothfirmware下还有RTL8723DU的蓝牙固件

需要复制到开发板根文件系统的lib/firmware/目录下,RTL8723DU在初始化过程中,会加载此固件,我们的文件系统已经放好了这两个固件文件,这里不再添加。

二、更改drivers/bluetooth/下Makefile文件

打开drivers/bluetooth/Makefile文件,添加如下内容:

obj-$(CONFIG_BT_HCIBTUSB_RTLBTUSB) := rtk_btusb.o

rtk_btusb-objs := rtk_bt.o rtk_misc.o rtk_coex.o

打开drivers/bluetooth/Kconfig文件,添加如下内容:

config BT_HCIBTUSB_RTLBTUSB

tristate "Realtek HCI USB driver support"

depends on USB

help

Realtek Bluetooth HCI USB driver.

This driver is required if you want to use Realtek Bluetooth

device with USB interface.

Say Y here to compile support for Bluetooth USB devices into the

kernel or say M to compile it as module (rtk_btusb).

效果如下:

三、内核配置

在以下路径,添加下图配置:

Networking support

-> Bluetooth subsystem support

在以下路径,添加下图配置:

Networking support

-> Bluetooth subsystem support

-> Bluetooth device drivers

在以下路径,添加下图配置:

Device Drivers

-> Input device support

-> Miscellaneous devices

在以下路径,添加下图配置:

Device Drivers

-> HID support

通过make menuconfig修改的内容写入到了.config文件,当使用make imx6ull_elf1_defconfig配置内核源码时,.config文件会被覆盖,因此,需要替换原有的imx6ull_elf1_defconfig。

elf@ubuntu:~/work/linux-imx-imx_4.1.15_2.0.0_ga$ cp .config arch/arm/configs/imx6ull_elf1_defconfig

编译测试

编译内核、设备树和模块并拷贝到开发板:

elf@ubuntu:~/work/linux-imx-imx_4.1.15_2.0.0_ga$ ./build.sh

elf@ubuntu:~/work/linux-imx-imx_4.1.15_2.0.0_ga$ scp arch/arm/boot/zImage   root@172.16.0.175:/run/media/mmcblk1p1/

elf@ubuntu:~/work/linux-imx-imx_4.1.15_2.0.0_ga$ scp .tmp/rootfs/modules.tar.bz2 root@172.16.0.175:/

在开发板中解压modules.tar.bz2

root@ELF1:~# tar xvf /modules.tar.bz2

进行sync操作后重启开发板:

编译之后,将镜像加载到开发板,测试方法参考《01-0 ELF1、ELF1S开发板_快速启动手册_V1》“3.1.19 蓝牙测试”章节。

点赞
收藏
评论
分享
加入交流群
举报

相关推荐

登录即可解锁
  • 海量技术文章
  • 设计资源下载
  • 产业链客户资源
  • 写文章/发需求
立即登录