-
Notifications
You must be signed in to change notification settings - Fork 681
Modify the Kconfig name of the mtdconfig module 2 #3371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Because the MTD_CONFIG configuration item in drivers/mtd/Kconfig has changed Signed-off-by: zhaoxingyu1 <zhaoxingyu1@xiaomi.com>
Because MTD_CONFIG configuration item in drivers/mtd/Kconfig has changed. Signed-off-by: zhaoxingyu1 <zhaoxingyu1@xiaomi.com>
Configuration/Tool: esp32c3-legacy-devkit/nvcfgdata
|
|
@zhaoxingyu12 please include some testing results. Did you test CFGDATA too? Maybe we need to add CFGDATA to "SIM" or "QEMU" to make the test easy to do. Currently only two boards are using it |
|
@zhaoxingyu12 I'm not sure that changing MTD_CONFIG to MTD_CONFIG_NONE is a good name change. I noticed your idea was to rename MTD_CONFIG_FAIL_SAFE to MTD_CONFIG_NVS, but it will be strange see CFGDATA depending on MTD_CONFIG_NONE. Could you please add more details in the git commit message about this change? It seems very strange |
now, CFGDATA depending on !MTD_CONFIG_NONE. (If either MTD_CONFIG or MTD_CONFIG_NVS is enabled, CFGDATA will be enabled.) Currently, the mtd_config implementations use a choice structure, where all implementations (such as MTD_CONFIG, MTD_CONFIG_NVS (Original name: MTD_CONFIG_FAIL_SAFE), and any future submodules) are defined as mutually exclusive options—only one can be selected at a time. By introducing MTD_CONFIG_NONE as a "no implementation" option, other submodules only need to depend on MTD_CONFIG_NONE=n, ensuring that their features are enabled only when a specific implementation is chosen. This approach not only avoids multiple dependencies and configuration conflicts, but also provides a clearer and more unified way to integrate additional mtd_config submodules in the future. it relates to this pr apache/nuttx#18120 choice config MTD_CONFIG config MTD_CONFIG_NVS config MTD_CONFIG_NONE endchoice |
I have conducted tests on QEMU, and the test results are in line with expectations.
|
Note: Please adhere to Contributing Guidelines.
Summary
Modify the Kconfig name of the mtdconfig module 2
This pull request makes two main adjustments to align with recent changes in the NuttX mtd_config module Kconfig.
Impact
These changes ensure compatibility with the updated mtd_config Kconfig structure in NuttX. By standardizing the naming and clarifying dependency logic, the configuration becomes more robust and easier to maintain, reducing the risk of conflicts and making it simpler to integrate or extend mtd_config submodules in the future
Testing
test it by CICT together with apache/nuttx#18120
I have conducted tests with CFGDATA on QEMU, and the test results are in line with expectations.
enabled these configurations.
CONFIG_MTD_CONFIG_NVS=y
CONFIG_SYSTEM_CFGDATA=y
CONFIG_MTD_CONFIG_NAMED=y
register lomtdconfig
dd if=/dev/zero of=/data/nvs.img bs=8192 count=10
lomtd -c 2 /dev/config /data/nvs.img
test pass
goldfish-armv7a-ap> cfgdata print mykey
Error reading config entry 'mykey'
goldfish-armv7a-ap> cfgdata set mykey "myvalue"
goldfish-armv7a-ap>
goldfish-armv7a-ap> cfgdata print mykey
myvalue
goldfish-armv7a-ap> cfgdata all
Name Len Data
mykey 8 myvalue