Yocto - 使用Yocto开发嵌入式Linux系统_02 认识 Yocto 项目

Meeting the Yocto Project
本章向你介绍 Yocto 项目。这里讨论的项目主要概念将贯穿全书。此外,我们还将简要讨论 Yocto 项目的历史、OpenEmbedded、Poky、BitBake、元数据和版本模式。系好安全带,欢迎加入我们的行列!
This chapter introduces you to the Yocto Project. The main concepts of the project discussed here are constantly used throughout the book. In addition, we will briefly discuss the history of the Yocto Project, OpenEmbedded, Poky, BitBake, metadata, and versioning schema. So, fasten your seat belt, and welcome aboard!
1, What is the Yocto Project?
Yocto 项目是 Linux 基金会的一个工作组,其定义如下:
Yocto 项目是一个开源协作项目,帮助开发人员创建基于 Linux 的定制系统,这些系统专为嵌入式产品而设计,与产品的硬件架构无关。Yocto 项目提供了一个灵活的工具集和开发环境,使世界各地的嵌入式设备开发人员能够通过共享技术、软件堆栈、配置和用于创建这些定制 Linux 映像的最佳实践进行协作。
The Yocto Project is a Linux Foundation workgroup and is defined as follows:
The Yocto Project is an open source collaboration project that helps developers create custom Linux-based systems that are designed for embedded products regardless of the product’s hardware architecture. Yocto Project provides a flexible toolset and a development environment that allows embedded device developers across the world to collaborate through shared technologies, software stacks, configurations, and best practices used to create these tailored Linux images.
全球数以千计的开发人员发现,Yocto Project 在系统和应用程序开发,存档和管理收益,以及用于速度、占用空间和内存利用的定制方面都具有优势。该项目是提供嵌入式软件栈的标准。该项目允许针对多种硬件平台进行软件定制和构建交换,并允许维护和扩展软件栈。
Thousands of developers worldwide have discovered that Yocto Project provides advantages in both systems and applications development, archival and management benefits, and customizations used for speed, footprint, and memory utilization. The project is a standard when it comes to delivering embedded software stacks. The project allows software customizations and build interchange for multiple hardware platforms as well as software stacks that can be maintained and scaled.
- Yocto Project Overview and Concepts Manual (Yocto 项目概述和概念手册)
Yocto 项目是一个开源协作项目。它提供模板、工具和方法,帮助我们为嵌入式产品创建基于 Linux 的定制系统,而不受硬件架构的限制。它可以根据 glibc 和 musl C 标准库 生成定制的 Linux 发行版,也可以为裸机开发生成实时操作系统(RTOS)工具链,如 Zephyr 项目所做的那样。
The Yocto Project is an open source collaboration project. It supplies templates, tools, and methods to help us create custom Linux-based systems for embedded products, regardless of the hardware architecture. It can generate tailored Linux distributions based on the glibc and musl C standard libraries and the Real-Time Operating System (RTOS) toolchains for bare-metal development, as done by the Zephyr Project.
该项目由 Linux 基金会成员管理,独立于成员组织,成员组织以多种方式参与该项目并为其提供资源。
Being managed by a Linux Foundation member, the project stays independent of the member organizations, which participate in many ways and supply resources to the project.
该项目成立于 2010 年,由众多硬件制造商、开源操作系统、供应商和电子公司合作完成,旨在减少重复工作,并为新老用户提供资源和信息。这些资源包括 OpenEmbedded 项目提供的核心系统组件 OpenEmbedded Core。
It was founded in 2010 as a collaboration of many hardware manufacturers, open source operating systems, vendors, and electronics companies to reduce duplication of work and supply resources and information catering to new and experienced users. Among these resources is OpenEmbedded Core, the core system component provided by the OpenEmbedded project.
Yocto 项目汇聚了多家公司、社区、项目和工具,它们都有一个共同的目标---构建基于 Linux 的嵌入式产品。这些利益相关者同舟共济,在社区需求的驱动下携手合作。
The Yocto Project aggregates several companies, communities, projects, and tools with the same purpose – to build Linux-based embedded products. These stakeholders are in the same boat, driven by their community needs to work together.
2, Delineating the Yocto Project /  Yocto 项目的概述
为了便于我们理解 Yocto 项目的职责和成果,我们可以用计算器来做类比。输入是一组描述我们所需的数据,即我们的规格。输出则是我们想要的基于 Linux 的嵌入式产品。
To ease our understanding of the duties and outcomes of the Yocto Project, we can use the analogy of a computing machine. The input is a set of data that describes what we want, that is, our specification. As an output, we have the desired Linux-based embedded product.
输出由操作系统的各个部分组成。它包括 Linux 内核、引导加载器和根文件系统(rootfs),它们被捆绑在一起并组织在一起工作。
The output is composed of the pieces of the operating system. It encompasses the Linux kernel, bootloader, and the root filesystem (rootfs) bundled and organized to work together.
Yocto 项目的工具可用于所有中间步骤,以生成 rootfs 捆绑包和其他交付成果。先前构建的软件组件可在构建过程中重复使用,包括应用程序、库或任何软件组件。
The Yocto Project’s tools are present in all intermediary steps to produce the resultant rootfs bundle and other deliverables. The previously built software components are reused across builds – applications, libraries, or any software component.
如果无法重复使用,则按照正确的顺序和所需的配置构建软件组件,包括从各自的源代码库(如 Linux 内核档案库 ( www.kernel.org)、GitHub、BitBucket 和 GitLab)获取所需的源代码。
When reuse is not possible, the software components are built in the correct order and with the desired configuration, including fetching the required source code from their respective repositories, such as The Linux Kernel Archives (www.kernel.org), GitHub, BitBucket, and GitLab.
Yocto 项目的工具为其构建环境、实用程序和工具链做好了准备,从而减少了对主机软件的依赖。这些实用程序、版本和配置选项都独立于主机 Linux 发行版,从而在产生相同结果的同时,最大限度地减少了对主机实用程序的依赖。一个微妙但重要的好处是,它大大提高了确定性,减少了对构建主机的依赖,同时提高了首次构建的成功率。
The Yocto Project’s tools prepare its build environment, utilities, and toolchains, reducing the host software dependency. The utilities, versions, and configuration options are independent of the host Linux distribution, minimizing the number of host utilities to rely on while producing the same result. A subtle but essential implication benefit is the considerable increase in determinism, reduced build host dependencies, but increased first-time builds.
BitBake 和 OpenEmbedded Core 属于 OpenEmbedded 项目,而 Poky 等一些项目则属于 Yocto 项目。它们互为补充,在系统中发挥着特定的作用。我们将在本章和本书中详细了解它们是如何协同工作的。
BitBake and OpenEmbedded Core are under the OpenEmbedded project umbrella, while some projects, such as Poky, are under the Yocto Project umbrella. They are all complementary and play specific roles in the system. We will understand exactly how they work together in this chapter and throughout this book.
3, The alliance of the OpenEmbedded project and the Yocto Project /  OpenEmbedded 项目与 Yocto 项目的联盟
OpenEmbedded 项目创建于 2003 年 1 月左右,当时 OpenZaurus 项目的一些核心开发人员开始使用新的构建系统。从一开始,OpenEmbedded 构建系统就是一个受 Gentoo Portage 软件包系统启发并基于该系统的任务调度程序,名为 BitBake。因此,该项目迅速增加了软件收藏和支持的机器列表。
The OpenEmbedded project was created around January 2003 when some core developers from the OpenZaurus project started to work with the new build system. Since its beginning, the OpenEmbedded build system has been a task scheduler inspired and based on the Gentoo Portage package system named BitBake. As a result, the project quickly grew its software collection and the supported machine list.
由于开发过程混乱且不协调,在需要更加稳定和完善的代码库的产品中使用 OpenEmbedded 十分具有挑战性,这就是 Poky 发行版诞生的原因。Poky 最初是 OpenEmbedded 构建系统的一个子集,在有限的体系结构中拥有更完善、更稳定的代码库。此外,由于规模缩小,Poky 还能开发一些亮点技术,如集成开发环境插件和快速模拟器 (QEMU) 集成,这些技术目前仍在使用中。
Due to chaotic and uncoordinated development, it was challenging to use OpenEmbedded in products that demand a more stable and polished code base, which is how Poky distribution was born. Poky started as a subset of the OpenEmbedded build system, and had a more polished and stable code base across a limited set of architectures. Additionally, its reduced size allowed Poky to develop highlighting technologies, such as IDE plugins and Quick Emulator (QEMU) integration, which are still in use.
Yocto 项目和 OpenEmbedded 项目将其工作合并到一个名为 OpenEmbedded Core 的核心构建系统上。它采用了 Poky 和 OpenEmbedded 的精华,强调更多地使用附加组件、元数据和子集。2010 年 11 月左右,Linux 基金会宣布 Yocto 项目将在 Linux 基金会赞助的项目下继续这项工作。
The Yocto Project and OpenEmbedded project consolidated their efforts on a core build system called OpenEmbedded Core. It uses the best of both Poky and OpenEmbedded, emphasizing the increased use of additional components, metadata, and subsets. Around November 2010, the Linux Foundation announced that the Yocto Project would continue this work under a Linux Foundation-sponsored project.
4, Understanding Poky
Poky 是默认的 Yocto 项目参考发行版,使用 OpenEmbedded 构建系统技术。它由一系列工具、配置文件和配方数据(称为元数据)组成。它与平台无关,使用 BitBake 工具、OpenEmbedded Core 和默认元数据集执行交叉编译,如下图所示。此外,它还提供了一种机制,用于构建和组合成千上万的分布式开源项目,形成一个完全可定制的、完整的、连贯的 Linux 软件栈。
Poky is the default Yocto Project reference distribution, which uses OpenEmbedded build system technology. It is composed of a collection of tools, configuration files, and recipe data (known as metadata). It is platform-independent and performs cross-compiling using the BitBake tool, OpenEmbedded Core, and a default set of metadata, as shown in the following figure. In addition, it provides the mechanism to build and combine thousands of distributed open source projects to form a fully customizable, complete, and coherent Linux software stack.
Poky 的主要目标是提供嵌入式开发人员所需的所有功能。
Poky’s main objective is to provide all the features an embedded developer needs.
[ Figure 1.1 – Poky main components ]
BitBake
BitBake 是一个任务调度和执行系统,可以解析 Python 和 Shell 脚本代码。解析后的代码会生成并运行任务,这些任务是根据代码的依赖关系排序的一系列步骤。
BitBake is a task scheduler and execution system that parses Python and Shell Script code. The code that is parsed generates and runs tasks, which are a set of steps ordered per the code’s dependencies.
BitBake 会评估所有可用的元数据,管理动态变量扩展、依赖关系和代码生成。此外,它还会跟踪所有任务以确保其完成,从而最大限度地利用处理资源,缩短构建时间并提高可预测性。BitBake 的开发在 bitbake-devel@lists.openembedded.org | Home 邮件列表中进行,源代码在 Poky 的 bitbake 子目录中。
BitBake evaluates all available metadata, managing dynamic variable expansion, dependencies, and code generation. In addition, it keeps track of all tasks to ensure their completion, maximizing the use of processing resources to reduce build time and predictability. The development of BitBake happens in the https://lists.openembedded.org/g/bitbake-devel mailing list, and the source code is in the bitbake subdirectory of Poky.
OpenEmbedded Core
OpenEmbedded Core 元数据集提供了 Poky 构建系统的引擎。它提供核心功能,并力求通用和尽可能精简。它支持七种不同的处理器架构(ARM、ARM64、x86、x86-64、PowerPC、PowerPC 64、MIPS、MIPS64、RISC-V32 和 RISC-V 64),仅支持 QEMU 可模拟的平台。
The OpenEmbedded Core metadata collection provides the engine of the Poky build system. It provides the core features and aims to be generic and as lean as possible. It supports seven different processor architectures (ARM, ARM64, x86, x86-64, PowerPC, PowerPC 64, MIPS, MIPS64, RISC-V32, and RISC-V 64), only supporting platforms to be emulated by QEMU.
开发工作集中在 openembedded-core@lists.openembedded.org | Home (mailto: openembedded-core@lists.openembedded.org) 邮件列表中,并将其元数据存放在 Poky 的 meta 子目录中。
The development is centralized in the https://lists.openembedded.org/g/openembedded-core (mailto:openembedded-core@lists.openembedded.org) mailing list and houses its metadata inside the meta subdirectory of Poky.
Metadata
元数据包括配方和配置文件。它由 Python 和 Shell Script 文本文件混合组成,提供了一个非常灵活的工具。Poky 利用这一点扩展了 OpenEmbedded Core,并包括两个不同的层,即其他元数据子集,如下所示:
The metadata includes recipes and configuration files. It is composed of a mix of Python and Shell Script text files, providing a tremendously flexible tool. Poky uses this to extend OpenEmbedded Core and includes two different layers, which are other metadata subsets, shown as follows:
* meta-poky:该层提供默认和支持的发布策略、可视化品牌和元数据跟踪信息(维护者、上游状态等)。该层将作为一个精心策划的模板,供发行版构建者用于为其自定义发行版提供种子。
* meta-poky: This layer provides the default and supported distribution policies, visual branding, and metadata tracking information (maintainers, upstream status, and so on). This is to serve as a curated template that could be used by distribution builders to seed their custom distribution.
* meta-yocto-bsp:提供板级支持包(BSP),作为 Yocto 项目开发和质量保证(QA)流程的参考硬件。
* meta-yocto-bsp: This provides the Board Support Package (BSP) used as the reference hardware for the Yocto Project development and Quality Assurance (QA) process.
5, The Yocto Project releases
Yocto 项目每六个月发布一次版本,分别在四月和十月。这种发布周期确保了持续的开发流程,同时提供了更多的测试点,并将重点放在稳定性上。只要一个版本准备就绪,它就会成为稳定版或长期支持 (LTS) 版。
The Yocto Project has a release every six months, in April and October. This release cycle ensures continuous development flow while providing points of increased testing and focus on stability. A release becomes a Stable or a Long-Term Support (LTS) release whenever a release is ready.
稳定版和长期支持版的支持期有很大不同。稳定版的支持期为 7 个月,每个稳定版有 1 个月的重叠支持期。LTS 版本的最低支持期为 2 年,可选择延长。官方支持期结束后,转为社区支持,最后达到生命周期结束(EOL)。
The support period differs significantly between the stable and LTS releases. The support for the stable release is for 7 months, offering 1 month of overlapped support for every stable release. The LTS release has a minimal support period of 2 years, optionally extended. After the official support period ends, it moves to Community support and finally reaches End Of Life (EOL).
官方发布支持期结束后,如果有社区成员加入成为社区维护者,发布版本就可以转为社区支持版本。最后,当源代码在 2 个月内没有任何变化,或社区维护者不再是活跃成员时,发布版本就会转为 EOL。
When the official release support period ends, a release can be Community support if a community member steps in to become the community maintainer. Finally, a release turns EOL when there is no change in the source code by 2 months, or the community maintainer is no longer an active member.
下图显示了两个发布周期:
The following diagram shows the two release cycles:
[ Figure 1.2 – Stable or LTS release cycles  ] [ 图 1.2 - 稳定版或 LTS 发布周期 ]
表 1.1 列出了 Yocto 项目的版本、代号、发布日期和当前支持级别,如下所示。更新后的表格请访问 Releases - Yocto Project :
Table 1.1 provides the Yocto Project version, codename, release date, and current support level, which can be seen as follows. The updated table is available at Releases - Yocto Project :
Codename
Version
Release Date
Support Level
Mickledore
4.2
April 2023
Future (until October 2023)
Langdale
4.1
October 2022
Stable (until May 2023)
Kirkstone
4.0
May 2022
LTS (minimum April 2024)
Honister
3.4
October 2021
EOL
Hardknott
3.3
April 2021
EOL
Gatesgarth
3.2
Oct 2020
EOL
Dunfell
3.1
April 2020
LTS (until April 2024)
Zeus
3.0
October 2019
EOL
Warrior
2.7
April 2019
EOL
Thud
2.6
Nov 2018
EOL
Sumo
2.5
April 2018
EOL
Rocko
2.4
Oct 2017
EOL
Pyro
2.3
May 2017
EOL
Morty
2.2
Nov 2016
EOL
Krogoth
2.1
Apr 2016
EOL
Jethro
2.0
Nov 2015
EOL
Fido
1.8
Apr 2015
EOL
Dizzy
1.7
Oct 2014
EOL
Daisy
1.6
Apr 2014
EOL
Dora
1.5
Oct 2013
EOL
Dylan
1.4
Apr 2013
EOL
Danny
1.3
Oct 2012
EOL
Denzil
1.2
Apr 2012
EOL
Edison
1.1
Oct 2011
EOL
Bernard
1.0
Apr 2011
EOL
Laverne
0.9
Oct 2010
EOL
Table 1.1 – List of Yocto Project versions
6, Summary
本章概述了 OpenEmbedded 项目与 Yocto 项目的关系、组成 Poky 的组件以及项目的启动过程。下一章将介绍 Poky 工作流程,包括下载、配置和准备 Poky 构建环境的步骤,以及如何使用 QEMU 构建和运行第一个映像。
This chapter provided an overview of how the OpenEmbedded project is related to the Yocto Project, the components that form Poky, and how the project began. The next chapter will introduce the Poky workflow with steps to download, configure, and prepare the Poky build environment and how to have the first image built and running using QEMU.

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.xdnf.cn/news/146430.html

如若内容造成侵权/违法违规/事实不符,请联系一条长河网进行投诉反馈,一经查实,立即删除!

相关文章

NC65客开常见问题以及解决方案

NC65客开常见问题以及解决方案 元数据实体对应的数据库表没有创建: 参照发布元数据第三步,生成数据库表 元数据名称和字段名称不一致导致报错: 更改为一致,删除原有的数据库表,重新生成数据库表并且重新发布元数据(如…

【Qt之·文件操作·类QTextStream、QDataStream】

系列文章目录 文章目录 前言一、概述1.1 QTextStream类1.2 QTextStream类的作用和用途 二、基本用法2.1 QTextStream成员函数2.2 QTextStream格式描述符、描述符方法2.3 QDataStream成员函数2.4 创建QTextStream对象并关联输入/输出设备(如文件、标准输入/输出流等&…

34. 模型材质父类Material

学习到现在大家对threejs的材质都有简单的了解,本节课主要结合文档,从JavaScript语法角度,给大家总结一下材质API的语法。 材质父类Material 查询threejs文档,你可以看到基础网格材质MeshBasicMaterial、漫反射网格材质MeshLamb…

C语言中的一些小知识(三)

一、你了解printf()吗? 你知道下面代码的输出结果吗? int a123; printf("%2d \n",a); printf() 函数是 C 语言中用于格式化输出的标准函数,它允许你将数据以特定的格式输出到标准输出设备(通常是屏幕)。p…

中电信翼康基于Apache Dolphinscheduler重构“星海·济世医疗数据中台”实践经验分享

文章作者:尚志忠 编辑整理:曾辉 行业背景 随着大数据、云计算、5G、人工智能等技术的快速发展,以及医疗信息化建设的不断深入,数据中台作为打通医疗数据融合壁垒、实现数据互通与共享、构建高效数据应用的关键信息平台&#xf…

松材线虫目标检测数据集,12522张图-纯手工标注

松材线虫目标检测数据集,12522张图像,专家纯手工标注。 松材线虫目标检测数据集 数据集描述 该数据集是一个专门用于松材线虫(Bursaphelenchus xylophilus)检测的数据集,旨在帮助研究人员和开发者训练和评估基于深度…

Python 操作 Arduino 入门

本文翻译整理自:Arduino With Python: How to Get Started https://realpython.com/arduino-python/ 文章目录 一、Arduino平台1、Arduino硬件2、Arduino软件 二、“Hello, World!”与Arduino1、上传眨眼示例草图2、连接外部组件3、使用面包板 三、“Hello, World!”…

技术美术百人计划 | 《5.1.1 PBR-基于物理的材质》笔记

1. PBR定义-基于物理的材质 PBR,或者用更通俗一些的称呼是指基于物理的渲染(Physically Based Rendering),它指的是一些在不同程度上都基于与现实世界的物理原理更相符的基本理论所构成的渲染技术的集合。 正因为基于物理的渲染目的便是为了使用一种更…

利用Metasploit进行信息收集与扫描

Metasploit之信息收集和扫描 在本文中,我们将学习以下内容 使用Metasploit被动收集信息 使用Metasploit主动收集信息 使用Nmap进行端口扫描 使用db_nmap方式进行端口扫描 使用ARP进行主机发现 UDP服务探测 SMB扫描和枚举 SSH版本扫描 FTP扫描 SMTP枚举 …

关于机器学习和深度学习的区别有哪些?

成长路上不孤单😊😊😊😊😊😊 【14后😊///C爱好者😊///持续分享所学😊///如有需要欢迎收藏转发///😊】 今日分享关于机器学习和深度学习区别的相关内容&…

Jboss CVE-2017-7504 靶场攻略

漏洞介绍 JBoss AS 4.x及之前版本中,JbossMQ实现过程的JMS over HTTP Invocation Layer的 HTTPServerILServlet.java⽂件存在反序列化漏洞,远程攻击者可借助特制的序列化数据利⽤该漏洞执⾏ 任意代码执⾏ 影响范围 JBoss 4.x 以及之前的所有版本 环…

对接阿里asr和Azure asr

1&#xff1a;对接阿里asr 1.1&#xff1a;pom <dependency><groupId>com.alibaba.nls</groupId><artifactId>nls-sdk-recognizer</artifactId><version>2.2.1</version> </dependency>1.2&#xff1a;生成token package c…

Springboot 文件上传下载相关问题

文章目录 关于Springboot 文件上传下载问题解决方案注意事项文件上传文件下载文件删除文件在线打开在写练习的时候&#xff0c;发现了一些小小的问题&#xff0c;已经在 上述代码中体现。① 代码路径碰到中文的时候&#xff0c;会有乱码&#xff0c;需要转换&#xff08;内容中…

fanuc添加地轨步骤图

机器人选项J518 法兰盘选择 FLANGE TYPE SELECT1 一般 机器人类型选择 TYPE SETTING2 J1运动范围设置 机器人->控制启动

鸿蒙开发的基本技术栈及学习路线

随着智能终端设备的不断普及与技术的进步&#xff0c;华为推出的鸿蒙操作系统&#xff08;HarmonyOS&#xff09;迅速引起了全球的关注。作为一个面向多种设备的分布式操作系统&#xff0c;鸿蒙不仅支持手机、平板、智能穿戴设备等&#xff0c;还支持IoT&#xff08;物联网&…

Java 每日一刊(第13期):this super static

“优秀的代码不仅仅是给机器看的&#xff0c;更是给人看的。” 前言 这里是分享 Java 相关内容的专刊&#xff0c;每日一更。 本期将为大家带来以下内容&#xff1a; this 关键字super 关键字static 关键字 this 关键字 this 关键字是 Java 中最常见的关键字之一&#xf…

科技赋能安全,财谷通助力抖音小店腾飞!

在数字经济的浪潮中&#xff0c;短视频与直播带货已成为新时代的商业风口&#xff0c;抖音小店作为这一领域的佼佼者&#xff0c;正引领着无数小微商家踏上创业与转型的快车道。然而&#xff0c;随着市场的日益繁荣&#xff0c;如何有效管理店铺、提升运营效率、保障交易安全成…

Hadoop-MapReduce的 原理 | 块和片 | Shuffle 过程 | Combiner

MapReduce的原理 简单版本&#xff1a; AppMaster: 整个Job任务的核心协调工具 MapTask: 主要用于Map任务的执行 ReduceTask: 主要用于Reduce任务的执行 一个任务提交Job --> AppMaster(项目经理)--> 根据切片的数量统计出需要多少个MapTask任务 --> 向ResourceMan…

伊犁-linux root 密码忘记咋办

1 root 密码忘记了 或者reboot 重启之后在引导界面 按住 e 进入如下界面 然后按住ctrlx 进入这个界面 root 修改成功

【机器学习(九)】分类和回归任务-多层感知机 (MLP) -Sentosa_DSML社区版

文章目录 一、算法概念二、算法原理&#xff08;一&#xff09;感知机&#xff08;二&#xff09;多层感知机1、隐藏层2、激活函数sigma函数tanh函数ReLU函数 3、反向传播算法 三、算法优缺点&#xff08;一&#xff09;优点&#xff08;二&#xff09;缺点 四、MLP分类任务实现…