Yocto 从 fido 升级到 Morty rootfs 是只读错误

Ou *_*sei 2 yocto

因此,我的任务是将我们基于 yocto 的系统从 fido 升级到 morty。我对 yocto 的经验很少,我一直在努力解决它并试图理解它近一个星期。我已经设法解决了一些问题,但现在我在尝试构建图像时遇到了一个问题:

ERROR: basic-image-1.0-r0 do_rootfs: The following packages could not be configured offline and rootfs is read-only: ['component']
ERROR: basic-image-1.0-r0 do_rootfs: Function failed: do_rootfs
Run Code Online (Sandbox Code Playgroud)

如果我禁用组件,则基本图像构建得很好,并且它们都可以自己构建,即 bb 组件

I don't even know where to start looking for a solution. So if you have any idea what might be causing this or where to start looking for a solution, it would be greatly appreciated. Ofcourse I have been browsing the yocto manuals, but there is so much stuff that I'm just overwhelmed by all of it.

And*_*ers 5

好吧,“问题”源于您的图像中有以下内容:

IMAGE_FEATURES += "read-only-rootfs"
Run Code Online (Sandbox Code Playgroud)

这意味着在运行时没有任何东西可以修改 rootfs,一切都必须离线完成,即在构建有问题的 rootfs 时。

您的软件包componentadcl以及cfgmgr您的原始问题)都有一个安装后脚本,包括以下代码段:

pkg_postinst_${PN} () {
  if test "x$D" != "x" then
     # Need to run on first boot
     exit 1
  fi
}
Run Code Online (Sandbox Code Playgroud)

(至少类似的东西,which exit 1)。

我的示例中的条件检查pkg_postinst脚本是否在 rootfs 创建期间运行,如果是,它以1退出状态退出。这意味着pkg_postinst必须在目标系统上实时运行。但是,由于目标系统是read-only,这将是不可能的,并且构建失败。

您必须检查pkg_postinst脚本并重写它们,以便它们能够在 rootfs 创建期间运行。