在 yocto 中配置默认挂载选项
我有一个 yocto 元层,它为嵌入式系统构建完整的 Linux 发行版。 它基于 yocto 的 'dunfell' (3.1.11) 分支并使用 linux 主线内核 5.10.57。
我使用的文件系统是 ext4,/etc/fstab 文件包含以下几行(已删减):
/dev/root / auto defaults 1 1
/dev/mmcblk0p4 /data ext4 defaults,x-systemd.before=network-pre 0 1
用于安装的 defaults 选项会产生以下安装配置 (cat /proc/mounts
):
/dev/root / ext4 rw,relatime 0 0
/dev/mmcblk0p4 /data ext4 rw,relatime 0 0
我会将默认安装选项更改为 rw,sync,noatime,nodelalloc,barrier=1,commit=1,data=journal
。
我可以手动操作 /etc/fstab 文件。但是我如何更改 yocto 食谱中的默认选项呢?我不知道在哪里可以找到配方中的默认安装选项定义。
感谢您的任何提示
编辑: 澄清问题:
- 在 fstab 中配置默认值时使用的挂载选项在哪里定义?
- 这个选项可以在 yocto 配方中的哪里配置?
- 如何更改 yocto 配方中的文件系统日志(启用/禁用 ext4 文件系统的日志)?我认为它必须在创建SD卡映像时在WIC步骤中完成?
I have a yocto meta layer which build a complete Linux distribution for an embedded system.
It is based on 'dunfell' (3.1.11) branch of yocto and using the linux mainline kernel 5.10.57.
The file system which I use is ext4 and the /etc/fstab file contains the following lines (snipped):
/dev/root / auto defaults 1 1
/dev/mmcblk0p4 /data ext4 defaults,x-systemd.before=network-pre 0 1
The defaults option for mounting results in the following mount configuration (cat /proc/mounts
):
/dev/root / ext4 rw,relatime 0 0
/dev/mmcblk0p4 /data ext4 rw,relatime 0 0
I will change the default mounting option to rw,sync,noatime,nodelalloc,barrier=1,commit=1,data=journal
.
I'm able to manipulate the /etc/fstab file manually. But how could I change the defaults options in my yocto recipe? I have no idea where to find the default mount options definition in the recipe.
Thanks for any Hint
Edit:
Clarify the question:
- Where are the mount options defined which are used when defaults is configured in the fstab?
- Where could this options configured in a yocto recipe?
- How to change the filesystem journaling (enable/disable journal of ext4 filesystem) in the yocto recipe? I think it must be done in the WIC step when the SD Card image is created?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
fstab
文件由位于以下位置的base-files
配方处理:要实现您自己的
fstab
文件:fstab
file is handled bybase-files
recipe located in:To implement your own
fstab
file: