Registered User mNo edit summary |
Registered User No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{ApplicableFor | |||
|MPUs list=STM32MP13x, STM32MP15x | |MPUs list=STM32MP13x, STM32MP15x, STM32MP21x, STM32MP23x, STM32MP25x | ||
|MPUs checklist=STM32MP13x,STM32MP15x | |MPUs checklist=STM32MP13x, STM32MP15x, STM32MP21x, STM32MP23x, STM32MP25x | ||
}}</noinclude> | }} | ||
<noinclude></noinclude> | |||
== Introduction == | == Introduction == | ||
'''Configfs'''<ref name=configfsdoc>{{CodeSource | Linux kernel | Documentation/filesystems/configfs.rst}}</ref> is a RAM-based filesystem that provides the converse of sysfs functionality. | '''Configfs'''<ref name=configfsdoc>{{CodeSource | Linux kernel | Documentation/filesystems/configfs.rst}}</ref> is a RAM-based filesystem that provides the converse of sysfs functionality. | ||
Line 21: | Line 22: | ||
=== How to mount configfs === | === How to mount configfs === | ||
Use the following command to mount '''Configfs''' at ''/sys/kernel/config'': | Use the following command to mount '''Configfs''' at ''/sys/kernel/config'': | ||
{{Board$}} mount -t configfs none /sys/kernel/config | {{Board$}}mount -t configfs none /sys/kernel/config | ||
=== How to set and manage configfs from Linux kernel drivers and user space === | === How to set and manage configfs from Linux kernel drivers and user space === |
Latest revision as of 15:47, 4 November 2024
1. Introduction[edit | edit source]
Configfs[1] is a RAM-based filesystem that provides the converse of sysfs functionality.
While sysfs provides a filesystem-based view of kernel objects, configfs is a filesystem-based manager of kernel objects or config_items (every object in configfs is a config_item). This means that kernel objects can be created, managed and destroyed from the user space.
2. Installing configs on your target board[edit | edit source]
Configfs can be enabled and ready to be used in all STM32MPU Embedded Software distribution, via the Linux® kernel configuration CONFIG_CONFIGFS_FS (set to yes by default):
FS Location: File systems ---> Pseudo filesystems --> -*- Userspace-driven configuration filesystemSymbol: CONFIGFS_
Please refer to Menuconfig or how to configure kernel article for instructions for modifying the configuration and recompiling the Linux kernel image in the Distribution Package context.
3. Getting started[edit | edit source]
3.1. How to mount configfs[edit | edit source]
Use the following command to mount Configfs at /sys/kernel/config:
configfs none /sys/kernel/configmount -t
3.2. How to set and manage configfs from Linux kernel drivers and user space[edit | edit source]
Refer to the Linux documentation[1] for detailed information.
Configfs is used by the USB framwework. Refer to USB API description for an example.
4. References[edit | edit source]