You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ut...@apache.org on 2021/05/05 19:21:41 UTC
[mynewt-core] branch master updated: fs: littlefs: add
migrate/readonly build options
This is an automated email from the ASF dual-hosted git repository.
utzig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
The following commit(s) were added to refs/heads/master by this push:
new 406e623 fs: littlefs: add migrate/readonly build options
new 1d72ee5 Merge pull request #2587 from utzig/littlefs-options
406e623 is described below
commit 406e623689bf51d79a56138327f7782f35c068a7
Author: Fabio Utzig <ut...@apache.org>
AuthorDate: Wed May 5 12:20:21 2021 -0300
fs: littlefs: add migrate/readonly build options
Add syscfg options that enable building the v1 metadata format migration
to v2, and read-only support (for smaller build sizes).
Signed-off-by: Fabio Utzig <ut...@apache.org>
---
fs/littlefs/pkg.yml | 6 ++++++
fs/littlefs/syscfg.yml | 10 ++++++++++
2 files changed, 16 insertions(+)
diff --git a/fs/littlefs/pkg.yml b/fs/littlefs/pkg.yml
index 2c14a32..8c3471b 100644
--- a/fs/littlefs/pkg.yml
+++ b/fs/littlefs/pkg.yml
@@ -33,5 +33,11 @@ pkg.deps:
- "@apache-mynewt-core/kernel/os"
- "@apache-mynewt-core/sys/flash_map"
+pkg.cflags.LITTLEFS_MIGRATE_V1:
+ - -DLFS_MIGRATE
+
+pkg.cflags.LITTLEFS_READONLY:
+ - -DLFS_READONLY
+
pkg.init:
littlefs_pkg_init: 'MYNEWT_VAL(LITTLEFS_SYSINIT_STAGE)'
diff --git a/fs/littlefs/syscfg.yml b/fs/littlefs/syscfg.yml
index a45fd39..4dbbad0 100644
--- a/fs/littlefs/syscfg.yml
+++ b/fs/littlefs/syscfg.yml
@@ -36,6 +36,16 @@ syscfg.defs:
must have the same size.
value: -1
+ LITTLEFS_MIGRATE_V1:
+ description: >
+ Enable support for migrating LFSv1 filesystems to v2.
+ value: 0
+
+ LITTLEFS_READONLY:
+ description: >
+ Build LittleFS without write support.
+ value: 0
+
LITTLEFS_BLOCK_COUNT:
description: >
Number of blocks/sectors use by this partition.