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窗口…...
docker详细操作--未完待续
docker介绍 docker官网: Docker:加速容器应用程序开发 harbor官网:Harbor - Harbor 中文 使用docker加速器: Docker镜像极速下载服务 - 毫秒镜像 是什么 Docker 是一种开源的容器化平台,用于将应用程序及其依赖项(如库、运行时环…...
通过Wrangler CLI在worker中创建数据库和表
官方使用文档:Getting started Cloudflare D1 docs 创建数据库 在命令行中执行完成之后,会在本地和远程创建数据库: npx wranglerlatest d1 create prod-d1-tutorial 在cf中就可以看到数据库: 现在,您的Cloudfla…...
【JVM】- 内存结构
引言 JVM:Java Virtual Machine 定义:Java虚拟机,Java二进制字节码的运行环境好处: 一次编写,到处运行自动内存管理,垃圾回收的功能数组下标越界检查(会抛异常,不会覆盖到其他代码…...
unix/linux,sudo,其发展历程详细时间线、由来、历史背景
sudo 的诞生和演化,本身就是一部 Unix/Linux 系统管理哲学变迁的微缩史。来,让我们拨开时间的迷雾,一同探寻 sudo 那波澜壮阔(也颇为实用主义)的发展历程。 历史背景:su的时代与困境 ( 20 世纪 70 年代 - 80 年代初) 在 sudo 出现之前,Unix 系统管理员和需要特权操作的…...
WEB3全栈开发——面试专业技能点P2智能合约开发(Solidity)
一、Solidity合约开发 下面是 Solidity 合约开发 的概念、代码示例及讲解,适合用作学习或写简历项目背景说明。 🧠 一、概念简介:Solidity 合约开发 Solidity 是一种专门为 以太坊(Ethereum)平台编写智能合约的高级编…...
EtherNet/IP转DeviceNet协议网关详解
一,设备主要功能 疆鸿智能JH-DVN-EIP本产品是自主研发的一款EtherNet/IP从站功能的通讯网关。该产品主要功能是连接DeviceNet总线和EtherNet/IP网络,本网关连接到EtherNet/IP总线中做为从站使用,连接到DeviceNet总线中做为从站使用。 在自动…...
工业自动化时代的精准装配革新:迁移科技3D视觉系统如何重塑机器人定位装配
AI3D视觉的工业赋能者 迁移科技成立于2017年,作为行业领先的3D工业相机及视觉系统供应商,累计完成数亿元融资。其核心技术覆盖硬件设计、算法优化及软件集成,通过稳定、易用、高回报的AI3D视觉系统,为汽车、新能源、金属制造等行…...
【开发技术】.Net使用FFmpeg视频特定帧上绘制内容
目录 一、目的 二、解决方案 2.1 什么是FFmpeg 2.2 FFmpeg主要功能 2.3 使用Xabe.FFmpeg调用FFmpeg功能 2.4 使用 FFmpeg 的 drawbox 滤镜来绘制 ROI 三、总结 一、目的 当前市场上有很多目标检测智能识别的相关算法,当前调用一个医疗行业的AI识别算法后返回…...
docker 部署发现spring.profiles.active 问题
报错: org.springframework.boot.context.config.InvalidConfigDataPropertyException: Property spring.profiles.active imported from location class path resource [application-test.yml] is invalid in a profile specific resource [origin: class path re…...
JavaScript基础-API 和 Web API
在学习JavaScript的过程中,理解API(应用程序接口)和Web API的概念及其应用是非常重要的。这些工具极大地扩展了JavaScript的功能,使得开发者能够创建出功能丰富、交互性强的Web应用程序。本文将深入探讨JavaScript中的API与Web AP…...
