Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mongoose-os-libs/fstab
Storage device and filesystem init table
https://github.com/mongoose-os-libs/fstab
Last synced: 3 months ago
JSON representation
Storage device and filesystem init table
- Host: GitHub
- URL: https://github.com/mongoose-os-libs/fstab
- Owner: mongoose-os-libs
- License: other
- Created: 2018-07-08T17:49:19.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-12-15T00:17:13.000Z (about 3 years ago)
- Last Synced: 2024-07-31T21:51:56.555Z (6 months ago)
- Language: C
- Size: 6.84 KB
- Stars: 2
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-mongoose-os - fstab - Storage device and filesystem init table (Awesome Mongoose OS [![Awesome](https://awesome.re/badge.svg)](https://awesome.re) / Official Libraries)
README
# Storage device and filesystem init table
## Overview
Configures storage devices, creates and/or mounts filesystems according to configuration.
## Configuration
This library defines two configurtion sections: `devtab` (5 entries) and `fstab` (3 entries).
Devtab defines VFS devices to be created, fstab defines filesystems to create and/or mount.
Devtab is processed first, then fstab.
See `config_schema` section of the [manifest](mos.yml) for detailed description of settings.
## Examples
* External SPI flash formatted as LFS and mounted on `/data`. Size is auto-detected.
```yaml
libs:
- origin: https://github.com/mongoose-os-libs/fstab
- origin: https://github.com/mongoose-os-libs/vfs-dev-spi-flash
- origin: https://github.com/mongoose-os-libs/vfs-fs-lfsconfig_schema:
- ["spi.enable", true]
# Other SPI interface options go here.
- ["devtab.dev0.name", "spif0"]
- ["devtab.dev0.type", "spi_flash"]
- ["devtab.dev0.opts", '{"cs": 0, "freq": 10000000}']
- ["fstab.fs0.dev", "spif0"]
- ["fstab.fs0.type", "LFS"]
- ["fstab.fs0.opts", '{"bs": 4096}']
- ["fstab.fs0.path", "/data"]
- ["fstab.fs0.create", true]
```* (ESP32) Additional partition on the ESP32 system flash, formatted as LFS and mounted on `/data`.
_Note:_ All the data ESP32 partitions are automatically registered so there are no explicit devtab entries.
```yaml
libs:
- origin: https://github.com/mongoose-os-libs/fstab
- origin: https://github.com/mongoose-os-libs/vfs-fs-lfsbuild_vars:
ESP_IDF_EXTRA_PARTITION: data,data,spiffs,,256Kconfig_schema:
- ["fstab.fs0.dev", "data"]
- ["fstab.fs0.type", "LFS"]
- ["fstab.fs0.opts", '{"bs": 4096}']
- ["fstab.fs0.path", "/data"]
- ["fstab.fs0.create", true]
```* External SPI flash split into two parts
First formatted for SPIFFS, the rest is not used.
```yaml
libs:
- origin: https://github.com/mongoose-os-libs/fstab
- origin: https://github.com/mongoose-os-libs/vfs-dev-part
- origin: https://github.com/mongoose-os-libs/vfs-dev-spi-flash
- origin: https://github.com/mongoose-os-libs/vfs-fs-spiffsconfig_schema:
- ["spi.enable", true]
# Other SPI interface options go here.
- ["devtab.dev0.name", "spif0"]
- ["devtab.dev0.type", "spi_flash"]
- ["devtab.dev0.opts", '{"cs": 0, "freq": 10000000}']
- ["devtab.dev1.name", "spif0p1"]
- ["devtab.dev1.type", "part"]
- ["devtab.dev1.opts", '{"dev": "spif0", "offset": 0, "size": 131072}']
- ["devtab.dev2.name", "spif0p2"]
- ["devtab.dev2.type", "part"]
- ["devtab.dev2.opts", '{"dev": "spif0", "offset": 131072}']
- ["fstab.fs0.dev", "spif0p1"]
- ["fstab.fs0.type", "SPIFFS"]
- ["fstab.fs0.opts", '{"bs": 4096, "ps": 128, "es": 4096}']
- ["fstab.fs0.path", "/data"]
- ["fstab.fs0.create", true]
```