一、什麼是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/zh-hk/n/136076.html