[riot-notifications] [RIOT-OS/RIOT] random: add hwrng and puf_sram as FEATURES_OPTIONAL (#12166)

Gaëtan Harter notifications at github.com
Wed Sep 18 13:59:28 CEST 2019

What I understand:

The current handling is that, `puf_sram` is only included when requested explicitly. There may be a good reason that @PeterKietzmann would know.

What you want, is use `puf_sram` by default if possible.
Now using `hwrng` is done if possible, if `puf_sram` was not included.

Which makes you want to implement I guess, for `random`, "use puf_sram in priority", "otherwise hwrng", and otherwise the backup. Am I right?

The current implementation has the limitation that this choice will be done by the C code, and if both are available, both `puf_sram` and `hwrng_init` would be called and so compiled and linked.
It is a consequence of the decision that "init" is done in `auto_init` and not in the module including it.
It could be acceptable if documented properly.

Doing the dependency resolution you want with the current dependency system is not standard. It could be done by looking into `FEATURES_PROVIDED`, if done with a function would keep limited mis-uses.
`FEATURES_OPTIONAL += $(call find_me_the_first_of_these_provided_features, puf_sram periph_hwrng)`

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190918/aa5941ad/attachment.htm>

More information about the notifications mailing list