[英]configure default mount options in yocto
I have a yocto meta layer which build a complete Linux distribution for an embedded system.我有一个 yocto 元层,它为嵌入式系统构建了一个完整的 Linux 分布。 It is based on 'dunfell' (3.1.11) branch of yocto and using the linux mainline kernel 5.10.57.
它基于 yocto 的 'dunfell' (3.1.11) 分支并使用 linux 主线 kernel 5.10.57。
The file system which I use is ext4 and the /etc/fstab file contains the following lines (snipped):我使用的文件系统是 ext4,/etc/fstab 文件包含以下几行(已截取):
/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
):挂载的默认选项导致以下挂载配置 (
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
.我会将默认挂载选项更改为
rw,sync,noatime,nodelalloc,barrier=1,commit=1,data=journal
。
I'm able to manipulate the /etc/fstab file manually.我能够手动操作 /etc/fstab 文件。 But how could I change the defaults options in my yocto recipe?
但是我怎样才能更改我的 yocto 配方中的默认选项呢? I have no idea where to find the default mount options definition in the recipe.
我不知道在哪里可以找到配方中的默认安装选项定义。
Thanks for any Hint感谢您的任何提示
Edit: Clarify the question:编辑:澄清问题:
fstab
file is handled by base-files
recipe located in: fstab
文件由位于以下位置的base-files
配方处理:
poky/meta/recipes-core/base-files
To implement your own fstab
file:要实现您自己的
fstab
文件:
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI_append = " file://myfstab"
do_install_append(){
install -m 0644 ${WORKDIR}/myfstab ${D}${sysconfdir}/fstab
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.