Configfs

Stable: 22.06.2022 - 08:37 / Revision: 07.06.2022 - 15:34

I am here to prevent the first-page-empty bug!

1 Introduction

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

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):

Symbol: CONFIGFS_FS
Location:
  File systems --->
    Pseudo filesystems -->
      -*- Userspace-driven configuration filesystem

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

3.1 How to mount configfs

Use the following command to mount Configfs at /sys/kernel/config:

 mount -t configfs none /sys/kernel/config

3.2 How to set and manage configfs from Linux kernel drivers and user space

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


IMPORTANT NOTICE – READ CAREFULLY
STMicroelectronics NV and its subsidiaries ("ST") reserve the right to make changes, corrections, enhancements, modifications, and improvements to ST products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on ST products before placing orders. ST products are sold pursuant to ST’s terms and conditions of sale in place at the time of order acknowledgment.

Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the design of purchasers’ products.

No license, express or implied, to any intellectual property right is granted by ST herein.

Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product.

ST and the ST logo are trademarks of ST. For additional information about ST trademarks, refer to www.st.com/trademarks. All other product or service names are the property of their respective owners.

Information in this document supersedes and replaces information previously supplied in any prior versions of this document.