Linux kernel

個人理解BSP(板級支持包)是Bootloader,Kernel 和文件系統加起來的統稱。

Linux和Unix中任何東西都是文件。目錄是文件,文件是文件,設備也是文件。設備通常被當作節點,但仍然是文件。

在嵌入式操作系統中,BootLoader是在操作系統內核運行之前運行。可以初始化硬件設備、建立內存空間映射圖,從而將系統的軟硬件環境帶到一個合適狀態,以便爲最終調用操作系統內核準備好正確的環境。在嵌入式系統中,通常並沒有像BIOS那樣的固件程序(注,有的嵌入式CPU也會內嵌一段短小的啓動程序),因此整個系統的加載啓動任務就完全由BootLoader來完成。

嵌入式 Linux開發Kernel移植(一)——kernel內核簡介 https://blog.csdn.net/A642960662/article/details/66473732

To start with, Linux is a kernel, and Ubuntu is a "Linux distribution". Every operating system has a kernel, and the Mac OS X kernel - XNU - actually shares a lot of qualities with Linux, kernel-wise, as Linux is based on UNIX, and so is XNU.


A kernel is the most low-level piece of the rather complicated architecture that makes up an operating system, and even within the kernel there are tons of layers. But in a nutshell, the kernel interacts with the hardware, and most of what builds on top of that, is stuff that Ubuntu includes in its distribution. The kernel is an abstraction layer between the hardware and the apps. Saying that the kernel does "all the heavy lifting" may be over-simplifying things, but a kernel does some extremely heavy lifting nonetheless.

Everything that doesn't use a terminal interface, but a graphical one, is Ubuntu stuff. But it goes a lot deeper than that as a lot of stuff that only uses a terminal interface also is Ubuntu stuff.

Every version of Ubuntu comes with a specific version of the Linux kernel packaged "at the bottom". A certain version is chosen that can be thoroughly tested, as the Ubuntu developers want to make sure that everything they distribute as a package works smoothly together. As an example, the Ubuntu developers don't want to release an OS where the kernel includes such bugs as the one referenced in the article you linked. Now, I don't even know if this bug ever made it into a stable release of the Linux kernel, but unless it's someone who manually updates to the more or less bleeding edge of kernel development, Ubuntu users were not affected by this bug.

BSP(Board Support Package),板級支持包,也稱爲硬件抽象層HAL或者中間層。

它將系統上層軟件和底層硬件分離開來,使系統上層軟件開發人員無需關係底層硬件的具體情況,根據BSP層提供的接口開發即可。

BSP是相對於操作系統而言的,不同的操作系統有不同定義形式的BSP,要求BSP所實現的功能也有所不同。

在嵌入式Linux系統中,主要是初始化底層硬件並引導操作系統;同時,BSP又是和硬件相關的,還要考慮對硬件的初始化操作。這些初始化操作主要是對CPU、內存、中斷等相關的寄存器及協處理器進行正確的配置。

在不同的開發階段,因爲核心和文件系統所處的位置不同,BSP所要完成的工 作也有所不同;在開發調試階段,BSP要能夠與主機通信並從主機下載核心;在目標產品中,BSP要能夠從非易失存儲設備中加載核心。

擴展資料

BSP有兩個特點:硬件相關性和操作系統相關性。

設計一個完整的BSP需要完成兩部分工作:

A、 嵌入式系統的硬件初始化和BSP功能。

片級初始化:純硬件的初始化過程,把嵌入式微處理器從上電的默認狀態逐步設置成系統所要求的工作狀態。

板級初始化:包含軟硬件兩部分在內的初始化過程,爲隨後的系統初始化和應用程序建立硬件和軟件的運行環境。

系統級初始化:以軟件爲主的初始化過程,進行操作系統的初始化。

B、 設計硬件相關的設備驅動。

發佈了3 篇原創文章 · 獲贊 60 · 訪問量 4萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章