一、什么是bootlin
Bootlin是一家提供嵌入式Linux开发的顾问公司,公司前身称为“Free Electrons”。其专注于开发、支持和培训在嵌入式领域中广泛使用的开源技术,如Linux、U-Boot、Buildroot、BusyBox等。
与其它嵌入式开发顾问公司不同,Bootlin开发的开源软件项目被广泛采用和推广,如U-Boot、Linux内核功能等。
自2018年以来,Bootlin已为全世界数百个公司提供了服务,在很多顶级的嵌入式启动板上应用广泛。
二、bootlin开发项目案例
1、基于SAM9G35的精密摄像机
SAM9G35是Atmel公司的一款基于ARM9内核的SoC芯片。该摄像机采用了Linux操作系统,并集成了OpenCV和ALSA进行图像和声音处理。该项目是Bootlin将它在嵌入式Linux操作系统和视频处理方面的深厚技术优势与客户的需求相结合的成功案例。
/******************************************************************************
* capture.h
*
*****************************************************************************/
#ifndef __CAPTURE_H__
#define __CAPTURE_H__
#define MAX_CAMERAS 10
/* Structures to pass arguments to threads */
struct buffer {
void * start;
size_t length;
};
struct thread_param {
int camera_idx;
char subdev_name[32];
struct v4l2_format format;
int fd;
struct buffer * buffers;
int n_buffers;
int width;
int height;
int nb_pixelformats;
struct v4l2_pix_format * pix_fmts;
int * in_menu_items;
int * out_menu_items;
int nb_in_menu_items, nb_out_menu_items;
double query_time;
int keep_count;
int * counter;
pthread_mutex_t * mutex;
pthread_cond_t * condition;
};
/* Structures to store personal settings */
struct preset {
char name[32];
int standard;
int input;
int hor_size;
int ver_size;
int fps;
int fourcc;
int ircut;
};
struct personal_settings {
int active_camera;
int active_preset;
struct preset presets[MAX_CAMERAS][11];
};
#endif
2、RRZ Robotics平台
RRZ Robotics是一家专业的机器人公司,提供各种服务,包括基于ROS的机器人和自动化系统开发。Bootlin为该公司提供了关键技术支持,并为他们的生产策略提供了基于Yocto Project的构建方法。
# Process of configuring the Access Point associated with the Wi-Fi Cellular Gateway # Connect an Ethernet cable to the LAN port of the Gateway and to your computer. # Set your computer's Ethernet adapter to DHCP mode. # Execute: ping 192.168.2.1 to find out whether the device is reachable (stay connected via Ethernet). # Disconnect the modem from the Gateway. # Enter the following command in your Terminal: ssh root@192.168.2.1 Password authentication should be enabled for the root user. After successful login, the command prompt should show: root@linaro-alip: ~# If your shell prompt indicates a different path, please set your gateway IP in the Linux environment variable GATEWAY_IP. For example: export GATEWAY_IP=192.168.2.1
三、与bootlin相关的技术领域
1、Buildroot
Buildroot是一个简单、高效、易于使用的工具,可用于自动构建嵌入式Linux系统。它是一个由Makefile和Kconfig文件组成的构建系统,可让用户对Linux内核、Bootloader、库和应用程序等进行配置和构建。
由于Bootlin在Buildroot的开发和维护方面有很深的参与,因此Buildroot是Bootlin的技术水平的体现,同时也为许多嵌入式和嵌入式Linux开发人员提供了一个快速简便的构建系统。以下是一个Buildroot示例:
## To have a web page in our target system, we can simply use the lighttpd package
## that will provide a web server and we can use a package that will provide
## content (here a sample "static" web site)
##
## For packages that require configuration, we need to pass-through a
## configuration file and this is done via the Config.in file
##
## As a bonus, we'll add a configuration to update the system time from the
## internet
menu "Target Packages"
menu "Web servers"
source "package/lighttpd/Config.in"
source "package/kosarko/buildroot-package/Config.in"
endmenu
source "package/ntp/Config.in"
endmenu
2、U-Boot
U-Boot是一个开放源代码的引导加载程序。U-Boot可以从Flash、RAM和其他储存器中启动操作系统,并支持大多数的芯片架构和开发平台,例如ARM、MIPS和x86等,并且是嵌入式Linux开发中的标准引导加载程序。
U-Boot是Bootlin以及社区的成员们共同维护的一款开源软件项目,它将开源软件的应用推广到嵌入式设备的启动过程中。以下是一个U-Boot示例:
U-Boot 2016.11 (Dec 29 2017 - 10:52:58 -0200) CPU: AArch64 Processor [410fd034] Model: Rockchip RK3399 Ibox3399 Board: Ibox3399 DRAM: 4 GiB MMC: DWMMC@fd800000: 2, DWMMC@fd820000: 1 MMC Device 1 not found MMC Device 2 not found MMC Device 3 not found MMC Device 0 not found no mmc device at slot 0 no mmc device at slot 1 no mmc device at slot 2 no mmc device at slot 3 In: serial@11030000 Out: serial@11030000 Err: serial@11030000 Model: Rockchip RK3399 Ibox3399
四、bootlin的开发与课程培训
1、嵌入式Linux开发课程
一些大企业、小公司和个人都关注嵌入式Linux开发领域的培训。Bootlin的嵌入式Linux培训是一个经过实践验证的培训,它涵盖了从最低层的系统的构建到应用程序的开发和应用。以下是培训的主要内容:
- 构建和裁剪Linux内核和用户空间工具链。
- 封装Linux文件系统作为root文件系统。
- 交叉编译和调试应用程序。
- 使用Bootlin的Emulator,训练课程到实际开发项目的转化。
2、Linux Device Drivers开发课程
Linux驱动程序非常基础,涉及嵌入式Linux的高级内核开发技术。成为一名嵌入式Linux内核开发人员的第一步是学习如何编写驱动程序。Bootlin的Linux Device Drivers开发课程是开发Linux驱动程序的最佳方式,以下是培训的主要内容:
- 了解Linux驱动程序概念。
- 学习如何管理内核数据结构。
- 学习如何自实现一个基于字符设备的设备驱动程序,了解ioctl函数。
- 学习如何实现一个基于内核线程和等待队列的字符设备驱动程序,了解如何使驱动程序支持读写操作。
- 学习如何实现一个基于中断的字符设备驱动程序,了解如何使用中断和原子操作。
- 运行之前自己写的驱动程序。
五、结语
总之,Bootlin是一个深入研究嵌入式Linux的技术专家和第三方机构。它的技术专家通常是Linux社区中活跃的成员,他们贡献了大量的patch、维护了许多的开源项目。
正是Bootlin提供了与Linux相关的一系列产品和服务,使许多公司和开发人员可以更轻松和更有效地使用Linux和相关技术,同时也在许多嵌入式设备项目中完成了重要的工作。
原创文章,作者:UGYB,如若转载,请注明出处:https://www.506064.com/n/136076.html
微信扫一扫
支付宝扫一扫