Linux kernel

  • Post author:
  • Post category:linux


个人理解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、 设计硬件相关的设备驱动。



版权声明:本文为qq_15063463原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。