Skip to content
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

ELCE: DT, Kconfig, EDTS path forward #10821

Closed
carlescufi opened this issue Oct 24, 2018 · 6 comments
Closed

ELCE: DT, Kconfig, EDTS path forward #10821

carlescufi opened this issue Oct 24, 2018 · 6 comments
Assignees
Labels
Enhancement Changes/Updates/Additions to existing features

Comments

@carlescufi
Copy link
Member

carlescufi commented Oct 24, 2018

Meeting at ELCE 2018.10.24
@nashif @galak @erwango @mbolivar @carlescufi

@galak
Copy link
Collaborator

galak commented Oct 24, 2018

Here are the defines we need to remove board/*/*.dts and dts/

CONFIG_BOARD_EM_STARTERKIT_R23
CONFIG_BOOTLOADER_MCUBOOT
CONFIG_BT
CONFIG_CODE_HYPERFLASH
CONFIG_CODE_ITCM
CONFIG_CODE_QSPI
CONFIG_FS_FLASH_MAP_STORAGE
CONFIG_FS_FLASH_STORAGE_PARTITION
CONFIG_MCUMGR_SMP_UART
CONFIG_MODEM_WNCM14A2A
CONFIG_SOC_EMSK_EM11D
CONFIG_SOC_EMSK_EM7D
CONFIG_SOC_EMSK_EM9D
CONFIG_UART_1_NRF_UARTE
CONFIG_UART_MCUX_2
CONFIG_USB_UART_CONSOLE
CONFIG_XIP

@SebastianBoe
Copy link
Collaborator

SebastianBoe commented Oct 25, 2018

I believe that this is what will require the most work and break compatibility the hardest:

Remove #if CONFIG_ from all board/ and dts/ files

the rest looks fairly straightforward.

I would like to discuss our strategies for getting these Kconfig symbols out of DT. For instance CONFIG_BOOTLOADER_MCUBOOT. I agree with the assessment of @mbolivar , who has worked on the MCUboot integration, that taking the MCUBoot partitions out of the scope of DT is the best approach here[0].

I am aware that communicating flash partitioning layout information between the bootloader and the kernel is one of the responsibilities of DT. But I believe that although this has worked well for other DT users, it does not work well for us.

[0] #9925 (comment)

Can we agree on this, or are there any viable alternatives?

@nashif nashif added the Enhancement Changes/Updates/Additions to existing features label Nov 2, 2018
@erwango
Copy link
Member

erwango commented Nov 8, 2018

@carlescufi :

Have DT generate Kconfig fragment enabling the compatibles: CONFIG_DT_COMPAT_STM32_SPI=y so that if the user enables CONFIG_SPI=y then the right driver is enabled.

About that point: you mentioned a reason why COMPAT flags should remain CONFIG_DT_XXX since having them in DT_ namespace would not work (possible but would not enable the expected usage). Can you state here the reason again?

@carlescufi
Copy link
Member Author

carlescufi commented Nov 8, 2018

@carlescufi :

Have DT generate Kconfig fragment enabling the compatibles: CONFIG_DT_COMPAT_STM32_SPI=y so that if the user enables CONFIG_SPI=y then the right driver is enabled.

About that point: you mentioned a reason why COMPAT flags should remain CONFIG_DT_XXX since having them in DT_ namespace would not work (possible but would not enable the expected usage). Can you state here the reason again?

@erwango I edited this now

There are 2 things here: one is that we generate compatible defines or flags, which are not used right now at all. Those can live in the DT_ namespace. The other is that in the future we want to base compilation of drivers on compatible-based Kconfig options. This is different and will come later, and will have to be defined at a later time.

@erwango
Copy link
Member

erwango commented Nov 8, 2018

@carlescufi ,

EDITED: ok so kept in #11180 then

pabigot added a commit to pabigot/zephyr that referenced this issue Dec 9, 2018
The rationale for encoding compatible identifier in the alias prefix was
in support of a feature (Kconfig-based identification of compatible
drivers) that has not yet been designed/implemented.

Since it's causing trouble now, add a more generic alias.  Leave the
compat-annotated one in place with the expectation of removing it before
1.14.

See: zephyrproject-rtos#10821 (comment)
See: zephyrproject-rtos#11180 (comment)
See: zephyrproject-rtos#11180 (comment)
See: zephyrproject-rtos#11737
Signed-off-by: Peter A. Bigot <[email protected]>
@carlescufi
Copy link
Member Author

This is not really relevant anymore, and the missing bits are covered by #8499

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Changes/Updates/Additions to existing features
Projects
None yet
Development

No branches or pull requests

5 participants