【BlueZ5】 板载驱动移植全过程,实现Ble Slave(Dbus版本)

本文详细介绍使用Buildroot工具在嵌入式Linux环境下构建蓝牙环境的过程,包括编译依赖库、移植配置文件、准备驱动固件及脚本,以及实现跨平台Demo验证。

一,编译依赖库与必要应用

1,准备编译工作之前,需要了解什么是buildroot,跨平台的库与文件都通过buildroot来实现。

About Buildroot:Buildroot is a tool that simplifies and automates the process of building a complete Linux system for an embedded system, using cross-compilation.
In order to achieve this, Buildroot is able to generate a cross-compilation toolchain, a root filesystem, a Linux kernel image and a bootloader for your target. Buildroot can be used for any combination of these options, independently (you can for example use an existing cross-compilation toolchain, and build only your root filesystem with Buildroot).
Buildroot is useful mainly for people working with embedded systems. Embedded systems often use processors that are not the regular x86 processors everyone is used to having in his PC. They can be PowerPC processors, MIPS processors, ARM processors, etc.
Buildroot supports numerous processors and their variants; it also comes with default configurations for several boards available off-the-shelf. Besides this, a number of third-party projects are based on, or develop their BSP 1 or SDK 2 on top of Buildroot.

Buildroot信息:https://buildroot.org/
Linux下获取链接:

git clone https://git.buildroot.net/buildroot   
git clone git://git.buildroot.net/buildroot

2,设定对应交叉工具链的Buildroot配置信息(如下以Mstar平台为例)

2.1 配置Target Options

| |                                    Target Architecture (ARM (little endian))  --->                                                   | |  
| |                                    Target Binary Format (ELF)  --->                                                                  | |  
| |                                    Target Architecture Variant (cortex-A7)  --->                                                     | |  
| |                                    Target ABI (EABIhf)  --->                                                                         | |  
| |                                    Floating point strategy (VFPv2)  --->                                                             | |  
| |                                    ARM instruction set (ARM)  --->

注意选择对应平台的信息!!!

2.2 配置Toolchain(这一步很关键,如果错了会直接影响编译)

+--------------------------------------------------------------- Toolchain ----------------------------------------------------------------+
  |  Arrow keys navigate the menu.  <Enter> selects submenus ---> (or empty submenus ----).  Highlighted letters are hotkeys.  Pressing <Y>  |  
  |  selects a feature, while <N> excludes a feature.  Press <Esc><Esc> to exit, <?> for Help, </> for Search.  Legend: [*] feature is       |  
  |  selected  [ ] feature is excluded                                                                                                       |  
  |                                                                                                                                          |  
  | +--------------------------------------------------------------------------------------------------------------------------------------+ |  
  | |                                    Toolchain type (External toolchain)  --->                                                         | |  
  | |                                    *** Toolchain External Options ***                                                                | |  
  | |                                    Toolchain (Custom toolchain)  --->                                                                | |  
  | |                                    Toolchain origin (Pre-installed toolchain)  --->                                                  | |  
  | |                                (/opt/arm-buildroot-linux-uclibcgnueabihf-4.9.4/usr) Toolchain path                                   | |  
  | |                                (arm-buildroot-linux-uclibcgnueabihf) Toolchain prefix                                                | |  
  | |                                    External toolchain gcc version (4.9.x)  --->                                                      | |  
  | |                                    External toolchain kernel headers series (3.18.x)  --->                                           | |  
  | |                                    External toolchain C library (uClibc/uClibc-ng)  --->                                             | |  
  | |       
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Tim-Cheng

你的鼓励是我最大的动力,奥利给

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值