From 59b3be2df73ab00b2827547c25a9db1fa073853a Mon Sep 17 00:00:00 2001 From: zhaoxingyu1 Date: Wed, 4 Jun 2025 14:53:31 +0800 Subject: [PATCH 1/2] mtd/nvs: modify config name to MTD_CONFIG_NVS part1 Because the MTD_CONFIG configuration item in drivers/mtd/Kconfig has changed Signed-off-by: zhaoxingyu1 --- system/cfgdata/Kconfig | 2 +- testing/fs/mtd_config_fs/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system/cfgdata/Kconfig b/system/cfgdata/Kconfig index 23eb9ebced4..64f51d40e8f 100644 --- a/system/cfgdata/Kconfig +++ b/system/cfgdata/Kconfig @@ -6,7 +6,7 @@ config SYSTEM_CFGDATA tristate "Cfgdata Command" default n - depends on MTD_CONFIG + depends on !MTD_CONFIG_NONE ---help--- Enable support for the CFGDATA tool. diff --git a/testing/fs/mtd_config_fs/Kconfig b/testing/fs/mtd_config_fs/Kconfig index 02f8b752a86..d2c9c2e8c33 100644 --- a/testing/fs/mtd_config_fs/Kconfig +++ b/testing/fs/mtd_config_fs/Kconfig @@ -6,7 +6,7 @@ config TESTING_MTD_CONFIG_FAIL_SAFE tristate "MTD Config fail-safe storage test" default n - depends on MTD_CONFIG_FAIL_SAFE + depends on MTD_CONFIG_NVS select MTD_CONFIG_NAMED ---help--- Enable the fail-safe storage test From 52a914f080c345e4c42ca68f97270fa7bb348a1a Mon Sep 17 00:00:00 2001 From: zhaoxingyu1 Date: Tue, 3 Jun 2025 17:33:16 +0800 Subject: [PATCH 2/2] mtdconfig: lomtdconfig device change to depends on !MTD_CONFIG_NONE Because MTD_CONFIG configuration item in drivers/mtd/Kconfig has changed. Signed-off-by: zhaoxingyu1 --- nshlib/nsh_command.c | 2 +- nshlib/nsh_fscmds.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nshlib/nsh_command.c b/nshlib/nsh_command.c index cace8eeac7f..ec3f8a385f2 100644 --- a/nshlib/nsh_command.c +++ b/nshlib/nsh_command.c @@ -322,7 +322,7 @@ static const struct cmdmap_s g_cmdmap[] = #ifndef CONFIG_DISABLE_MOUNTPOINT # if defined(CONFIG_MTD_LOOP) && !defined(CONFIG_NSH_DISABLE_LOMTD) -# ifdef CONFIG_MTD_CONFIG +# ifndef CONFIG_MTD_CONFIG_NONE CMD_MAP("lomtd", cmd_lomtd, 3, 10, "[-d ] | [[-o ] [-e ] " "[-b ] [-c ] ]]"), diff --git a/nshlib/nsh_fscmds.c b/nshlib/nsh_fscmds.c index 447d45e7222..13f26f6947e 100644 --- a/nshlib/nsh_fscmds.c +++ b/nshlib/nsh_fscmds.c @@ -1308,7 +1308,7 @@ int cmd_lomtd(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv) int sectsize = -1; off_t offset = 0; bool badarg = false; -# ifdef CONFIG_MTD_CONFIG +# ifndef CONFIG_MTD_CONFIG_NONE int configdata = 0; # endif int ret = ERROR; @@ -1324,7 +1324,7 @@ int cmd_lomtd(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv) * NOTE that the -o and -r options are accepted with the -d option, but * will be ignored. */ -# ifdef CONFIG_MTD_CONFIG +# ifndef CONFIG_MTD_CONFIG_NONE while ((option = getopt(argc, argv, "d:o:e:b:c:")) != ERROR) # else while ((option = getopt(argc, argv, "d:o:e:b:")) != ERROR) @@ -1349,7 +1349,7 @@ int cmd_lomtd(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv) sectsize = atoi(optarg); break; -# ifdef CONFIG_MTD_CONFIG +# ifndef CONFIG_MTD_CONFIG_NONE case 'c': configdata = atoi(optarg); break; @@ -1435,7 +1435,7 @@ int cmd_lomtd(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv) setup.sectsize = sectsize; /* The sector size to use with the block device */ setup.erasesize = erasesize; /* The sector size to use with the block device */ setup.offset = offset; /* An offset that may be applied to the device */ -# ifdef CONFIG_MTD_CONFIG +# ifndef CONFIG_MTD_CONFIG_NONE setup.configdata = configdata; /* Is a loop mtdconfig device */ # endif