简体   繁体   English

Yocto 自定义层在 mkfs.ext4 之后在 do_rootfs 上运行 Tune2fs

[英]Yocto Custom Layer run Tune2fs on do_rootfs after mkfs.ext4

I'm using Yocto on Ubuntu 18.04 with the Warrior Branch of Meta-Tegra in order to try to integrate the RAUC Open Source project for Linux Firmware Updates.我在 Ubuntu 18.04 上使用 Yocto 和 Meta-Tegra 的 Warrior 分支,以尝试将 RAUC 开源项目集成到 Linux 固件更新中。

I've learned that U-Boot has issues writing to EXT4 partitions ( to update the U-Boot Env ) if the EXT4 filesystem it is writing to has the metadata_csum attribute.我了解到,如果 U-Boot 写入的 EXT4 文件系统具有 metadata_csum 属性,则 U-Boot 在写入 EXT4 分区(以更新 U-Boot Env)时会出现问题。 Linux cannot mount the Root Filesystem if that attribute is enabled and U-Boot writes at all to it.如果启用该属性并且 U-Boot 完全写入它,Linux 将无法挂载根文件系统。

Here are some posts on that:这里有一些关于这个的帖子:

I proved that this is the case by mounting the resulting SDCARD image from Yocto on Ubuntu and running the following command to disable metadata_csum:我通过在 Ubuntu 上从 Yocto 安装生成的 SDCARD 映像并运行以下命令来禁用 metadata_csum 来证明就是这种情况:

sudo tune2fs -O ^metadata_csum /dev/sdb1
tune2fs 1.44.1 (24-Mar-2018)
Disabling checksums could take some time.
Proceed anyway (or wait 5 seconds to proceed) ? (y,N) y

After running that command - U-Boot can read/write at will from U-Boot space and Linux can mount the Root File System.运行该命令后 - U-Boot 可以从 U-Boot 空间随意读/写,Linux 可以挂载根文件系统。

I am trying to figure out how to disable the checksums with Tune2fs on Ubuntu at image creation time with Yocto.我试图弄清楚如何在使用 Yocto 创建映像时在 Ubuntu 上使用 Tune2fs 禁用校验和。 Where/How can I add this so that the image has checksums disabled at image creation time from Yocto?我在哪里/如何添加它,以便在 Yocto 创建图像时禁用图像校验和? Thanks.谢谢。

I briefly looked over meta-tegra and I think it uses the ext4 root filesystem image created through image_class.bcclass.我简要地查看了 meta-tegra,我认为它使用了通过 image_class.bcclass 创建的 ext4 根文件系统映像。 You can add parameters to the mkfs.ext4 thorugh EXTRA_IMAGECMD.您可以通过 EXTRA_IMAGECMD 向 mkfs.ext4 添加参数。 It should be possible to just create the filesystem with metadata_csum disabled, instead of turning it off later.应该可以在禁用 metadata_csum 的情况下创建文件系统,而不是稍后将其关闭。

Try尝试

EXTRA_IMAGECMD_append = " -O ^metadata_csum"

in your local.conf在您的 local.conf 中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM