当前位置: 首页 > news >正文

Yocto - 使用Yocto开发嵌入式Linux系统_04 使用Toaster来创建一个image

Using Toaster to Bake an Image

既然我们已经知道了如何在 Poky 中使用 BitBake 构建图像,那么接下来我们就来学习如何使用 Toaster 构建图像。我们将重点介绍 Toaster 最直接的使用方法,并介绍它的其他功能,让你了解它的能力。

Now that we know how to build an image using BitBake within Poky, we will learn how to do the same using Toaster. We are going to focus on the most straightforward usage of Toaster and also cover what else it can do so that you know about its capabilities.

1, What is Toaster?

Toaster 是一个用于配置和运行构建的网络界面。它与 BitBake 和 Poky 构建系统通信,以管理和收集有关构建、软件包和镜像的信息。

Toaster is a web interface to configure and run builds. It communicates with the BitBake and Poky build system to manage and gather information about the builds, packages, and images.

使用 Toaster 有两种方法:

* 本地使用: 我们可以将 Toaster 作为本地实例运行,适合单用户开发,提供 BitBake 命令行的图形界面和一些构建信息。

* 托管: 适合多用户使用。Toaster 服务器会构建和存储用户的工件。使用托管实例时,其组件可分布在多台机器上。

There are two ways to use Toaster:

* Locally: We can run Toaster as a local instance, suitable for single-user development, providing a graphical interface to the BitBake command lines and some build information.

* Hosted: This is suitable for multiple users. The Toaster servers build and store the users’ artifacts. Its components can be spread across several machines when using a hosted instance.

在本章中,我们将把 Toaster 作为本地实例使用。不过,如果你想将其用作托管实例,请访问以下网站获取说明 - Toaster Manual (Toaster User Manual — The Yocto Project ® 4.0.4 documentation)。

In this chapter, we will use Toaster as a local instance. However, if you want to use it as a hosted instance, please visit the following website for instructions – Toaster Manual ( Toaster User Manual — The Yocto Project ® 4.0.4 documentation ).

注意事项

请记住,每项托管服务都需要注意其安全性。在使用托管实例之前,请考虑这一点。

Note

Bear in mind that every hosted service requires attention to its security. Think about this before using a hosted instance.

2,Installing Toaster

Toaster 使用 Python Django 框架。最简单的安装方法是使用 Python 的 pip 工具。在第 2 章 “构建基于 Poky 的系统”中配置主机时,我们已经安装了该工具。现在,我们可以运行以下命令,在 Poky 源代码目录下安装 Toaster 的其他需求:

Toaster uses the Python Django framework. The easiest way to install it is by using Python’s pip utility. We already installed this when configuring our host machine in Chapter 2, Baking Our Poky-Based System. We can now install the rest of Toaster’s requirements inside the Poky source directory by running the following command:

$ pip3 install --user -r bitbake/toaster-requirements.txt

WARNING: The script sqlformat is installed in '/home/dev/.local/bin' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

3, Starting Toaster

安装好 Toaster 所需配置后,我们就可以启动它的服务器了。为此,我们应进入 Poky 目录并运行以下命令:

Once we have installed Toaster’s requirements, we are ready to start its server. To do this, we should go to Poky’s directory and run the following commands:

$ source oe-init-build-env

$ source toaster start

这些命令需要一些时间才能完成。一切就绪后,网络服务器开始运行。结果如下图所示。

The commands take some time to finish. When everything is set up, the web server is started. The result is shown in the following figure.

[Figure 3.1 – The result of the source toaster startup]

要访问 Toaster 网络界面,请打开你喜欢的浏览器并输入以下内容:

To access the Toaster web interface, open your favorite browser and enter the following:

http://127.0.0.1:8000

注意事项

Toaster 默认从 8000 端口启动。网络端口参数允许你使用不同的端口,例如:$ source toaster start webport=8400。

Note

By default, Toaster starts on port 8000. The webport parameter lets you use a different port – for example, $ source toaster start webport=8400.

接下来,我们可以看到 Toaster 的起始页面:

Next, we can see the starting page of Toaster:

[Figure 3.2 – The Toaster welcome page]

4, Building an image for QEMU

按照第 2 章 “构建基于 Poky 的系统 ”中的相同步骤,我们将构建 QEMU x86-64 仿真的映像。

Following the same steps used in Chapter 2, Baking Our Poky-Based System, we will build an image of the QEMU x86-64 emulation.

由于我们目前没有项目(配置和构建的集合),因此需要启动一个项目。创建项目名称并选择目标版本,如下图所示:

Since we currently don’t have a project, a collection of configurations and builds, we need to start one. Create a project name and choose the target release, as shown in the following screenshot:

[Figure 3.3 – Creating a new project with Toaster]

创建我的第一个项目后,我们可以看到项目主界面,如下图所示:

After creating my-first-project, we can see the main project screen, as shown in the following screenshot:

[Figure 3.4 – The first page of the project]

在 “配置”选项卡上,转到 “机器”,将目标机器更改为 qemux86-64:

While on the Configuration tab, go to Machine and change the target machine to qemux86-64:

[Figure 3.5 – How to choose the target machine]

然后,单击 “图像配方”选项卡,选择要构建的图像。在本例中,正如第 2 章 “构建基于 Poky 的系统 ”中所使用的,我们可以构建 core-image-full-cmdline:

After that, click the Image recipes tab to choose the image you want to build. In this example, as used in Chapter 2, Baking Our Poky-Based System, we can build core-image-full-cmdline:

[Figure 3.6 – How to find an image using Search]

下面的截图显示了构建过程:

The following screenshot shows the build process:

[Figure 3.7 – Toaster during the image build]

构建过程需要一些时间,但之后我们就可以看到构建的图像以及一些统计数据,如下图所示:

The build process takes some time, but after that, we can see the built image along with some statistics, as shown in the following screenshot:

[Figure 3.8 – The image build artifact report]

我们还可以验证生成的文件集,如下图所示:

We can also verify the generated set of files, as shown in the following screenshot:

[Figure 3.9 – The core-image-full-cmdline directory structure as shown in Toaster]

Toaster 是一款功能强大的工具。你可以在本地开发机器或共享服务器上使用它,以图形方式显示构建过程。你可以返回启动 Toaster 的终端,运行 runqemu qemux86-64 core-image-full-cmdline。你将看到如下截图所示:

Toaster is a powerful tool. You can use it on a local development machine or a shared server to get a graphic representation of the build. You can return to the terminal where you started Toaster to run runqemu qemux86-64 core-image-full-cmdline. You will see what is shown in the following screenshot:

[Figure 3.10 – The QEMU screen during the Linux kernel boot]

完成 Linux 启动后,会出现登录提示,如图 3.11 所示。

After finishing the Linux booting, you will see a login prompt, as shown in Figure 3.11.

[Figure 3.11 – The QEMU screen during user login ]

我们可以使用空密码登录 root 账户。

We can log in to the root account using an empty password.

相关文章:

Yocto - 使用Yocto开发嵌入式Linux系统_04 使用Toaster来创建一个image

Using Toaster to Bake an Image 既然我们已经知道了如何在 Poky 中使用 BitBake 构建图像,那么接下来我们就来学习如何使用 Toaster 构建图像。我们将重点介绍 Toaster 最直接的使用方法,并介绍它的其他功能,让你了解它的能力。 Now that we…...

【C#生态园】后端服务与网络库:选择适合你游戏开发的利器

网络通信不再难题:六种常用游戏开发网络库详解 前言 随着网络游戏行业的蓬勃发展,对于实时多玩家游戏服务和网络通信库的需求也日益增长。在游戏开发中,选择合适的后端服务和网络库可以极大地影响游戏的性能、稳定性和用户体验。本文将介绍…...

计算机前沿技术-人工智能算法-大语言模型-最新研究进展-2024-09-30

计算机前沿技术-人工智能算法-大语言模型-最新研究进展-2024-09-30 目录 文章目录 计算机前沿技术-人工智能算法-大语言模型-最新研究进展-2024-09-30目录1. Proof Automation with Large Language Models概览:论文研究背景:技术挑战:如何破局…...

【漏洞复现】JeecgBoot 积木报表 queryFieldBySql sql注入漏洞

》》》产品描述《《《 积木报表,是一款免费的企业级Web报表工具,像搭建积木一样在线设计报表!功能涵盖,数据报表、打印设计、图表报表、大屏设计等! 》》》漏洞描述《《《 JeecgBoot 积木报表 queryFieldBySq| 接口存在一个 SQL 注入漏洞&…...

Qt6 中相对于 Qt5 的新增特性及亮点

Qt 是一个领先的跨平台应用开发框架,涵盖了桌面、移动、嵌入式等多个平台。随着 Qt6 的发布,Qt 框架经历了重大升级和变革,带来了大量新特性和架构上的改进,使开发者可以更高效地开发现代化应用程序。本文将重点讨论 Qt6 相对于 Q…...

超轻巧modbus调试助手使用说明

一、使用说明 1.1 数据格式 和其他的modbus采集工具一样,本组件也支持各种数据格式,其实就是高字节低字节的顺序。一般是2字节表示一个数据,后面又有4字节表示一个数据,目前好像还有8字节表示一个数据的设备。不同厂家的设备对应…...

Percona Monitoring and Management

Percona Monitoring and Management (PMM)是一款开源的专用于管理和监控MySQL、MongoDB、PostgreSQL...

WarehouseController

目录 1、 WarehouseController 1.1、 //仓库信息设置 1.2、 /// 查询 1.3、 /// 删除 WarehouseController using QXQPS.Models; using QXQPS.Vo; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mv…...

基于 STM32 单片机的温室物理无害生长系统

摘要 : 本系统主要由六大部分组成,分别为 STM32单片机控制模块、温湿度检测模块、风扇、臭氧消毒、温室补光灯、水利灌溉通道等基本设施。单片机可以通过 MOS 管这类的电力电子器件来实现对某些大功率设施的控制如温室内风扇通风系统、温室内定时补光、根据土壤温湿检测来进行…...

新版pycharm如何导入自定义环境

我们新的版本的pycharm的ui更改了,但是我不会导入新的环境了 我们先点击右上角的add interpreter 然后点击添加本地编译器 先导入这个bat文件 再点击load 我们就可以选择我们需要的环境了...

一文彻底搞懂多模态 - 多模态理解+视觉大模型+多模态检索

文章目录 技术交流多模态理解一、图像描述1. 基于编码器-解码器的方法2. 基于注意力机制的方法3. 基于生成对抗网络的方法 二、视频描述三、视觉问答 视觉大模型一、通用图像理解模型二、通用图像生成模型 多模态检索一、单模态检索二、多模态检索三、跨模态检索 最近这一两周看…...

提升效率的编程世界探索与体验

---  在如今这个信息爆炸、竞争激烈的时代,工作效率对于程序员来说显得尤为重要。为了在日益繁忙的工作环境中脱颖而出,选择合适的编程工具成为了一个关键的决定。不同的工具各有其优势,有的擅长简化代码编写,有的则擅长自动化任…...

VMware tools菜单为灰色无法安装

这个工具之前为灰色,无法安装,导致无法实现跟主机的共享文件夹等操作。极为不便。 根据其他教程提示:看到软件是这个配置。 修改为自动检测,tools就可以安装了。之前没注意到。 也有说dvd光盘也要设置。但是经过我测试。只设置软…...

不相同的二叉搜索树

给你一个整数 n ,求恰由 n 个节点组成且节点值从 1 到 n 互不相同的 二叉搜索树 有多少种?返回满足题意的二叉搜索树的种数。 示例 1: 输入:n 3 输出:5示例 2: 输入:n 1 输出:1提…...

毕业论文设计javaweb+VUE高校教师信息管理系统

目录 一、系统概述 二、功能详解 1. 教师管理 2. 部门管理 3. 奖惩管理 4. 业绩管理 5. 培训管理 6. 报表查询 三、总结 四、示例代码 1 前端VUE 2 后端SpringBootjava 3 数据库表 随着教育信息化的发展,传统的手工管理方式已经不能满足现代学校对教师…...

L0-Python-关卡材料提交

Python wordcount 函数的调试笔记 输入文本中的多行字符串处理 确保 text 使用了正确的三引号 “”",以便读取完整的多行字符串,而不是单行。字符串分割:split() 使用 split() 默认按空格分割单词,确保分割后每个元素都是字…...

【unity进阶知识6】Resources的使用,如何封装一个Resources资源管理器

文章目录 一、Unity资源加载的几种方式1、Inspector窗口拖拽2、Resources3、AssetBundle4、Addressables(可寻址资源系统)5、AssetDatabase 二、准备三、同步加载Resources资源1、Resources.Load同步加载单个资源1.1、基本加载1.2、加载指定类型的资源1.…...

ThreadLocal内存泄漏分析

一、ThreadLocal内存泄漏分析 1.1 ThreadLocal实现原理 1.1.1、set(T value)方法 查看ThreadLocal源码的 set(T value)方法,可以发现数据是存在了ThreadLocalMap的静态内部类Entry里面 其中key为使用弱引用的ThreadLocal实例,value为set传入的值。核…...

第 30 章 XML

第 30 章 XML 1.IE 中的 XML 2.DOM2 中的 XML 3.跨浏览器处理 XML 随着互联网的发展,Web 应用程序的丰富,开发人员越来越希望能够使用客户端来操作 XML 技术。而 XML 技术一度成为存储和传输结构化数据的标准。所以,本章就详细探讨一下 Ja…...

VMware下的ubuntu显示文字太小的自适应显示调整

我的情况 我使用的是4K的32寸显示器,分辨率为 3840 x 2160,ubuntu版本为18.04,默认的情况下系统分辨率为 3466 x 1842。 ​ 此时,显示的文字很小,虽然可以看清,但也比较吃力,在VMware窗口…...

装饰模式(Decorator Pattern)重构java邮件发奖系统实战

前言 现在我们有个如下的需求,设计一个邮件发奖的小系统, 需求 1.数据验证 → 2. 敏感信息加密 → 3. 日志记录 → 4. 实际发送邮件 装饰器模式(Decorator Pattern)允许向一个现有的对象添加新的功能,同时又不改变其…...

React Native 开发环境搭建(全平台详解)

React Native 开发环境搭建(全平台详解) 在开始使用 React Native 开发移动应用之前,正确设置开发环境是至关重要的一步。本文将为你提供一份全面的指南,涵盖 macOS 和 Windows 平台的配置步骤,如何在 Android 和 iOS…...

React第五十七节 Router中RouterProvider使用详解及注意事项

前言 在 React Router v6.4 中&#xff0c;RouterProvider 是一个核心组件&#xff0c;用于提供基于数据路由&#xff08;data routers&#xff09;的新型路由方案。 它替代了传统的 <BrowserRouter>&#xff0c;支持更强大的数据加载和操作功能&#xff08;如 loader 和…...

【机器视觉】单目测距——运动结构恢复

ps&#xff1a;图是随便找的&#xff0c;为了凑个封面 前言 在前面对光流法进行进一步改进&#xff0c;希望将2D光流推广至3D场景流时&#xff0c;发现2D转3D过程中存在尺度歧义问题&#xff0c;需要补全摄像头拍摄图像中缺失的深度信息&#xff0c;否则解空间不收敛&#xf…...

全球首个30米分辨率湿地数据集(2000—2022)

数据简介 今天我们分享的数据是全球30米分辨率湿地数据集&#xff0c;包含8种湿地亚类&#xff0c;该数据以0.5X0.5的瓦片存储&#xff0c;我们整理了所有属于中国的瓦片名称与其对应省份&#xff0c;方便大家研究使用。 该数据集作为全球首个30米分辨率、覆盖2000–2022年时间…...

【项目实战】通过多模态+LangGraph实现PPT生成助手

PPT自动生成系统 基于LangGraph的PPT自动生成系统&#xff0c;可以将Markdown文档自动转换为PPT演示文稿。 功能特点 Markdown解析&#xff1a;自动解析Markdown文档结构PPT模板分析&#xff1a;分析PPT模板的布局和风格智能布局决策&#xff1a;匹配内容与合适的PPT布局自动…...

如何为服务器生成TLS证书

TLS&#xff08;Transport Layer Security&#xff09;证书是确保网络通信安全的重要手段&#xff0c;它通过加密技术保护传输的数据不被窃听和篡改。在服务器上配置TLS证书&#xff0c;可以使用户通过HTTPS协议安全地访问您的网站。本文将详细介绍如何在服务器上生成一个TLS证…...

04-初识css

一、css样式引入 1.1.内部样式 <div style"width: 100px;"></div>1.2.外部样式 1.2.1.外部样式1 <style>.aa {width: 100px;} </style> <div class"aa"></div>1.2.2.外部样式2 <!-- rel内表面引入的是style样…...

什么?连接服务器也能可视化显示界面?:基于X11 Forwarding + CentOS + MobaXterm实战指南

文章目录 什么是X11?环境准备实战步骤1️⃣ 服务器端配置(CentOS)2️⃣ 客户端配置(MobaXterm)3️⃣ 验证X11 Forwarding4️⃣ 运行自定义GUI程序(Python示例)5️⃣ 成功效果![在这里插入图片描述](https://i-blog.csdnimg.cn/direct/55aefaea8a9f477e86d065227851fe3d.pn…...

Device Mapper 机制

Device Mapper 机制详解 Device Mapper&#xff08;简称 DM&#xff09;是 Linux 内核中的一套通用块设备映射框架&#xff0c;为 LVM、加密磁盘、RAID 等提供底层支持。本文将详细介绍 Device Mapper 的原理、实现、内核配置、常用工具、操作测试流程&#xff0c;并配以详细的…...