You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

Yocto中rootfs目录位置咨询(原使用Buildroot)

Yocto Root Filesystem Location (vs Buildroot's target Directory)

Hey there! It’s totally normal to hunt for that familiar rootfs directory when switching from Buildroot to Yocto—let’s break this down clearly so you can find what you need.

First off: You’re correct that the rootfs lives under build/tmp, and you’re also right that it’s not the sysroots directory. Nice call on that distinction!

Key RootFS Locations in Yocto

1. Unpacked, Raw RootFS (Buildroot target Equivalent)

This is the uncompressed, fully populated root filesystem with all the standard directories (bin, etc, usr, lib, etc.)—exactly like Buildroot’s target folder. You’ll find it at this path:

build/tmp/work/<your-machine-name>/<your-image-name>/<image-version>/rootfs

Let’s break down the placeholders:

  • <your-machine-name>: The machine you set in local.conf (e.g., raspberrypi4-64, qemuarm64)
  • <your-image-name>: The image recipe you built (e.g., core-image-minimal, core-image-sato)
  • <image-version>: The version tag of the image recipe (usually something like 1.0-r0)

2. Packaged RootFS Images (Ready for Deployment)

Yocto builds multiple packaged versions of the rootfs that are ready to flash to your device. These live in:

build/tmp/deploy/images/<your-machine-name>/

Here you’ll find common formats like:

  • .tar.gz: Compressed archive (easy to extract to an SD card partition)
  • .ext4: Disk image file (can be directly flashed to storage)
  • .cpio: Initramfs-style archive (often used for early boot setups)
    You’ll also find related files here, like the kernel image and device tree blobs.

3. Quick Note on sysroots

As you guessed, build/tmp/sysroots/<your-machine-name> isn’t the final rootfs for your hardware. This directory is part of Yocto’s cross-compilation toolchain: it holds the target architecture’s libraries, headers, and utilities that are used to compile software (custom apps, kernel modules, etc.) for your device. It’s a build-time dependency, not something you’d deploy.

Hope this clears up the directory confusion as you settle into Yocto. Feel free to ask if you need more details!


内容的提问来源于stack exchange,提问作者md.jamal

火山引擎 最新活动