一,编译依赖库与必要应用
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) ---> | |
| |

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

被折叠的 条评论
为什么被折叠?



