专属
文档
插件
助手
邀请
顶部
快速返回页面顶部
收起
收起工具栏
轩辕镜像 官方专业版
轩辕镜像
专业版
轩辕镜像 官方专业版
轩辕镜像
专业版
首页个人中心搜索镜像

交易
充值流量我的订单
工具
提交工单页面收录一键安装
Npm 源Pip 源Homebrew 源
帮助
常见问题轩辕镜像免费版
其他
关于我们网站地图
热门搜索:
build-yocto

gmacario/build-yocto

自动构建
gmacario

这是easy-build的子项目,提供使用Yocto Project工具创建嵌入式Linux发行版的快速简便环境,包含预配置的Yocto构建工具链,支持主机与容器目录共享,便于嵌入式开发人员快速搭建和使用Yocto开发环境。

25 次收藏下载次数: 0状态:自动构建维护者:gmacario仓库类型:镜像最近更新:4 年前
让 AI 帮你使用轩辕镜像? · 展开查看说明

如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。

只需在 AI 对话中先发送下面这句话即可:

请先完整阅读并严格遵守以下文档中的全部规则与要求:

https://xuanyuan.cloud/agents.md

在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。

查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。

轩辕镜像,加速的不只是镜像。点击查看
中文简介
标签下载
镜像标签列表与下载命令
轩辕镜像,加速的不只是镜像。点击查看

build-yocto

镜像概述和主要用途

build-yocto是https://github.com/gmacario/easy-build%E7%9A%84%E5%AD%90%E9%A1%B9%E7%9B%AE%EF%BC%8C%E6%8F%90%E4%BE%9B%E4%BA%86%E4%B8%80%E7%A7%8D%E5%BF%AB%E9%80%9F%E7%AE%80%E4%BE%BF%E7%9A%84%E6%96%B9%E5%BC%8F%EF%BC%8C%E7%94%A8%E4%BA%8E%E4%BD%BF%E7%94%A8Yocto Project工具创建嵌入式Linux发行版。该镜像预配置了Yocto Project所需的构建环境和工具链,使开发人员能够快速搭建干净的Yocto开发环境,无需手动配置依赖。

核心功能和特性

  • 预配置环境:包含Yocto Project构建所需的完整工具链和依赖
  • 目录共享:支持通过Docker卷(volume)实现主机与容器间的目录共享,方便代码和构建结果的传输
  • 完整构建流程:提供从克隆Yocto元数据、更新、创建构建环境到构建最小系统镜像的完整示例
  • wic工具支持:集成Yocto Project 1.5及以上版本的wic工具,用于构建系统镜像

使用场景和适用范围

适用于嵌入式Linux开发人员,尤其是需要使用Yocto Project构建定制化嵌入式Linux发行版的场景。无论是学习Yocto Project、开发嵌入式系统,还是构建特定硬件平台的Linux镜像,都可以通过该镜像快速启动开发流程。

详细使用方法和配置说明

构建Docker镜像

从easy-build项目构建镜像:

bash
$ cd .../easy-build
$ docker build -t gmacario/build-yocto build-yocto/

运行Docker镜像

基本运行

执行以下命令启动一个干净的Yocto Project开发环境:

bash
$ docker run -ti gmacario/build-yocto

带目录共享运行

可使用--volume=[host-src:]container-dest选项在主机和容器间共享目录,示例:

bash
$ docker run -ti --volume=${PWD}/shared:/home/build/shared gmacario/build-yocto

详细说明请参考Docker卷文档。

启动后,即可使用Yocto Project工具创建自定义嵌入式Linux发行版。

使用Yocto

以下命令用于验证Yocto构建环境是否正确安装。详细信息请参考Yocto Project文档。

克隆Yocto元数据

克隆poky仓库(示例中为Yocto Project 2.0,代号"jethro"):

bash
$ mkdir -p ~/shared && sudo chown build.build ~/shared
$ cd ~/shared
$ git clone -b jethro git://git.yoctoproject.org/poky

更新Yocto元数据

获取poky仓库的最新更新:

bash
$ cd ~/shared/poky && git pull --all --prune

创建构建环境

bash
$ cd ~/shared
$ source ~/shared/poky/oe-init-build-env ~/shared/build-test01

可检查并根据需要修改conf/目录下的配置文件。

构建最小Yocto镜像

执行oe-init-build-env后,即可开始构建:

bash
$ bitbake -k core-image-minimal

构建结果示例:

build@afaf6ac0c0e4:~/shared/build-test01$ bitbake -k core-image-minimal
Parsing recipes: 100% |############################################################################################| Time: 00:00:25
Parsing of 899 .bb files complete (0 cached, 899 parsed). 1329 targets, 38 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.28.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-14.04"
TARGET_SYS        = "i586-poky-linux"
MACHINE           = "qemux86"
DISTRO            = "poky"
DISTRO_VERSION    = "2.0.1"
TUNE_FEATURES     = "m32 i586"
TARGET_FPU        = ""
meta
meta-yocto
meta-yocto-bsp    = "jethro:7fe17a2942ff03e2ec47d566fd5393f52b2eb736"

NOTE: Preparing RunQueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: Failed to fetch URL ftp://invisible-island.net/ncurses/current/ncurses-5.9-20150329.tgz, attempting MIRRORS if available
WARNING: Failed to fetch URL http://www.openssl.org/source/openssl-1.0.2d.tar.gz, attempting MIRRORS if available
WARNING: QA Issue: python-pygobject: /python-pygobject/usr/lib/python2.7/site-packages/pygtk.pth is owned by uid 30000, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]
NOTE: Tasks Summary: Attempted 2005 tasks of which 9 didn't need to be rerun and all succeeded.

Summary: There were 3 WARNING messages shown.
build@afaf6ac0c0e4:~/shared/build-test01$

构建结果存储在tmp/deploy/images/${MACHINE}目录下:

build@afaf6ac0c0e4:~/shared/build-test01$ ls -la tmp/deploy/images/qemux86/
total 97344
drwxr-xr-x 2 build build     4096 Feb 22 15:04 .
drwxr-xr-x 3 build build     4096 Feb 22 14:46 ..
-rw-r--r-- 2 build build      294 Feb 22 15:04 README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
lrwxrwxrwx 1 build build       72 Feb 22 14:46 bzImage -> bzImage--4.1.17+git0+46bb64d605_2e0ac7b6c4-r0-qemux86-20160222140016.bin
-rw-r--r-- 2 build build  6978640 Feb 22 14:45 bzImage--4.1.17+git0+46bb64d605_2e0ac7b6c4-r0-qemux86-20160222140016.bin
lrwxrwxrwx 1 build build       72 Feb 22 14:46 bzImage-qemux86.bin -> bzImage--4.1.17+git0+46bb64d605_2e0ac7b6c4-r0-qemux86-20160222140016.bin
-rw-r--r-- 1 build build  9138176 Feb 22 15:04 core-image-minimal-qemux86-20160222140016.rootfs.ext4
-rw-r--r-- 1 build build      721 Feb 22 15:04 core-image-minimal-qemux86-20160222140016.rootfs.manifest
-rw-r--r-- 1 build build  2399203 Feb 22 15:04 core-image-minimal-qemux86-20160222140016.rootfs.tar.bz2
lrwxrwxrwx 1 build build       53 Feb 22 15:04 core-image-minimal-qemux86.ext4 -> core-image-minimal-qemux86-20160222140016.rootfs.ext4
lrwxrwxrwx 1 build build       57 Feb 22 15:04 core-image-minimal-qemux86.manifest -> core-image-minimal-qemux86-20160222140016.rootfs.manifest
lrwxrwxrwx 1 build build       56 Feb 22 15:04 core-image-minimal-qemux86.tar.bz2 -> core-image-minimal-qemux86-20160222140016.rootfs.tar.bz2
-rw-r--r-- 2 build build 83265178 Feb 22 14:46 modules--4.1.17+git0+46bb64d605_2e0ac7b6c4-r0-qemux86-20160222140016.tgz
lrwxrwxrwx 1 build build       72 Feb 22 14:46 modules-qemux86.tgz -> modules--4.1.17+git0+46bb64d605_2e0ac7b6c4-r0-qemux86-20160222140016.tgz
build@afaf6ac0c0e4:~/shared/build-test01$

使用"wic"工具

从Yocto Project 1.5版本开始,wic工具可用于构建系统镜像。

显示程序版本

bash
$ wic --version

Yocto 2.0(jethro)的wic版本为0.2.0:

build@afaf6ac0c0e4:~/shared/build-test01$ wic --version
wic version 0.2.0
build@afaf6ac0c0e4:~/shared/build-test01$

显示程序帮助

bash
$ wic --help

结果:

build@afaf6ac0c0e4:~/shared/build-test01$ wic --help
Usage:

 Create a customized OpenEmbedded image

 usage: wic [--version] | [--help] | [COMMAND [ARGS]]

 Current 'wic' commands are:
    help              Show help for command or one of the topics (see below)
    create            Create a new OpenEmbedded image
    list              List available canned images and source plugins

 Help topics:
    overview          wic overview - General overview of wic
    plugins           wic plugins - Overview and API
    kickstart         wic kickstart - wic kickstart reference


Options:
  --version   show program's version number and exit
  -h, --help  show this help message and exit
build@afaf6ac0c0e4:~/shared/build-test01$

列出可用的OpenEmbedded镜像属性

bash
$ wic list images

结果:

build@afaf6ac0c0e4:~/shared/build-test01$ wic list images
  mkhybridiso                                   Create a hybrid ISO image
  directdisk-multi-rootfs                       Create multi rootfs image using rootfs plugin
  qemux86-directdisk                            Create a qemu machine 'pcbios' direct disk image
  directdisk-gpt                                Create a 'pcbios' direct disk image
  mkgummidisk                                   Create an EFI disk image
  directdisk                                    Create a 'pcbios' direct disk image
  sdimage-bootpart                              Create SD card image with a boot partition
  mkefidisk                                     Create an EFI disk image
build@afaf6ac0c0e4:~/shared/build-test01$

获取"wic create"帮助

bash
$ wic help create

结果:

NAME
    wic create - Create a new OpenEmbedded image

SYNOPSIS
    wic create <wks file or image name> [-o <DIRNAME> | --outdir <DIRNAME>]
        [-e | --image-name] [-s, --skip-build-check] [-D, --debug]
        [-r, --rootfs-dir] [-b, --bootimg-dir]
        [-k, --kernel-dir] [-n, --native-sysroot] [-f, --build-rootfs]
        [-c, --compress-with]

DESCRIPTION
    This command creates an OpenEmbedded image based on the 'OE
    kickstart commands' found in the <wks file>.

    In order to do this, wic needs to know the locations of the
    various build artifacts required to build the image.

    Users can explicitly specify the build artifact locations using
    the -r, -b, -k, and -n options.  See below for details on where
    the corresponding artifacts are typically found in a normal
    OpenEmbedded build.

    Alternatively, users can use the -e option to have 'wic' determine
    those locations for a given image.  If the -e option is used, the
    user needs to have set the appropriate MACHINE variable in
    local.conf, and have sourced the build environment.

    The -e option is used to specify the name of the image to use the
    artifacts from e.g. core-image-sato.

    The -r option is used to specify the path to the /rootfs dir to
    use as the .wks rootfs source.

    The -b option is used to specify the path to the dir containing
    the boot artifacts (e.g. /EFI or /syslinux dirs) to use as the
    .wks bootimg source.

    The -k option is used to specify the path to the dir containing
    the kernel to use in the .wks bootimg.

    The -n option is used to specify the path to the native sysroot
    containing the tools to use to build the image.

    The -f option is used to build rootfs by running "bitbake <image>"

    The -s option is used to skip the build check.  The build check is
    a simple sanity check used to determine whether the user has
    sourced the build environment so that the -e option can operate
    correctly.  If the user has specified the build artifact locations
    explicitly, 'wic' assumes the user knows what he or she is doing
    and skips the build check.

    The -D option is used to display debug information detailing
    exactly what happens behind the scenes when a create request is
    fulfilled (or not, as the case may be).  It enumerates and
    displays the command sequence used, and should be included in any
    bug report describing unexpected results.

    When 'wic -e' is used, the locations for the build artifacts
    values are determined by 'wic -e' from the output of the 'bitbake
    -e' command given an image name e.g. 'core-image-minimal' and a
    given machine set in local.conf.  In that case, the image is
    created as if the following 'bitbake -e' variables were used:

    -r:        IMAGE_ROOTFS
    -k:        STAGING_KERNEL_DIR
    -n:        STAGING_DIR_NATIVE
    -b:        empty (plugin-specific handlers must determine this)

    If 'wic -e' is not used, the user needs to select the appropriate
    value for -b (as well as -r, -k, and -n).

    If 'wic -e' is not used, the user needs to select the appropriate
    value for -b (as well as -r, -k, and -n).

    The -o option can be used to place the image in a directory with a
    different name and location.

    The -c option is used to specify compressor utility to compress
    an image. gzip, bzip2 and xz compressors are supported.

创建镜像

bash
$ bitbake dosfstools-native mtools-native parted-native syslinux
$ wic create directdisk -e core-image-minimal

结果:

build@afaf6ac0c0e4:~/shared/build-test01$ wic create directdisk -e core-image-minimal
Checking basic build environment...
Done.

Creating image(s)...

Info: The new image(s) can be found here:
  /var/tmp/wic/build/directdisk-201602221523-sda.direct

The following build artifacts were used to create the image(s):
  ROOTFS_DIR:                   /home/build/shared/build-test01/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs
  BOOTIMG_DIR:                  /home/build/shared/build-test01/tmp/sysroots/qemux86/usr/share
  KERNEL_DIR:                   /home/build/shared/build-test01/tmp/deploy/images/qemux86
  NATIVE_SYSROOT:               /home/build/shared/build-test01/tmp/sysroots/x86_64-linux


The image(s) were created using

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 build-yocto 镜像标签

docker pull docker.xuanyuan.run/gmacario/build-yocto:<标签>

使用方法:

  • 登录认证方式
  • 免认证方式

DockerHub 原生拉取命令

docker pull gmacario/build-yocto:<标签>

更多 build-yocto 镜像推荐

balena/yocto-build-env logo

balena/yocto-build-env

balena
暂无描述
3 次收藏1万+ 次下载
2 年前更新
paketobuildpacks/build logo

paketobuildpacks/build

paketobuildpacks
Paketo Buildpacks栈镜像,提供构建源代码及Base、Full、Tiny三种Stack的发布收据和版本说明,用于应用构建环境的配置与调试。
54 次收藏5000万+ 次下载
2 年前更新
paketobuildpacks/build-jammy-tiny logo

paketobuildpacks/build-jammy-tiny

paketobuildpacks
暂无描述
1000万+ 次下载
8 天前更新
buildbot/buildbot-master logo

buildbot/buildbot-master

buildbot
Buildbot master Docker镜像,用于部署持续集成/持续部署系统的控制节点,协调管理构建、测试及部署流程。
30 次收藏50万+ 次下载
2 个月前更新
paketobuildpacks/build-jammy-base logo

paketobuildpacks/build-jammy-base

paketobuildpacks
暂无描述
1000万+ 次下载
9 天前更新
paketobuildpacks/build-jammy-full logo

paketobuildpacks/build-jammy-full

paketobuildpacks
暂无描述
1000万+ 次下载
9 天前更新

查看更多 build-yocto 相关镜像

轩辕镜像配置手册

按平台快速找到配置文档

Docker

登录仓库拉取

登录认证 · 私有仓库

专属域名拉取

免登录 · 高速拉取

Linux

Docker 镜像配置

Windows / Mac

Docker Desktop 配置

MacOS OrbStack

OrbStack 容器

Docker Compose

Compose 项目配置

NAS

群晖

Synology 配置

飞牛

fnOS 镜像配置

绿联

绿联 NAS

威联通

QNAP 配置

极空间

极空间 NAS

企业仓库

其他仓库

ghcr · Quay · nvcr

Harbor 镜像源

Proxy Repository 对接

Portainer 镜像源

Registries 配置

Nexus 镜像源

Docker Proxy 缓存

开发工具

Dev Containers

VS Code 开发容器

Podman

Podman 配置指南

Singularity / Apptainer

HPC 科学计算容器

Kubernetes

K8s Containerd

Kubernetes · Containerd

K3s

轻量级集群

面板 / 网络

爱快路由

iKuai 镜像加速

宝塔面板

一键配置镜像源

AI

用 AI 使用轩辕镜像

agents.md · AI 对话 · 提示词

需要其他帮助?请查看我们的 常见问题 Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

功能

免费版与专业版区别

功能对比 · 版本选择

支持的镜像仓库

Docker Hub · GCR · GHCR

新手拉取配置

登录 · 专属域名 · 配置

docker search 限制

专属域名 · Hub 搜索

不支持 push

仅支持 pull · 不支持

拉取速度原因

带宽 · 缓存 · 冷热镜像

排错

402 与流量用尽

402 · 流量包 · 充值

401 认证失败

401 · docker login

manifest unknown

标签错误 · 镜像不存在

410 Gone 排查

410 · Docker 升级

429 限流

免费版 · 请求频率

DNS 超时

DNS 解析 · 网络超时

账号

失败是否计费

manifest · blob · 计费

申请开发票(企业 / 个人)

企业 · 个人 · 工单

修改登录密码

网站 · 仓库 · 重置

注销账户

工单 · 数据 · 注销

原理

mirrors 不生效

daemon.json · 重启

去掉域名前缀

docker tag · 重命名

指定架构拉取

ARM64 · AMD64 · 多架构

latest 与「最新」

digest · 版本号 · 标签

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
gmacario/build-yocto
博客Docker 镜像公告与技术博客
热门查看热门 Docker 镜像推荐
教程轩辕镜像功能与使用教程
安装一键安装 Docker 并配置镜像源
官方公众号:源码跳动|官方技术交流群:13763429
官方公众号:源码跳动|官方技术交流群:|问题咨询请:提交工单
商务合作:点击复制邮箱
©2024-2026 源码跳动
商务合作:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.