Reputation: 518
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:
Upvotes: 3
Views: 2540
Reputation: 4294
fstab
file is handled by base-files
recipe located in:
poky/meta/recipes-core/base-files
To implement your own fstab
file:
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI_append = " file://myfstab"
do_install_append(){
install -m 0644 ${WORKDIR}/myfstab ${D}${sysconfdir}/fstab
}
Upvotes: 2