[riot-notifications] [RIOT-OS/RIOT] sys/random: allow seed source selection (#15836)

Leandro Lanzieri notifications at github.com
Tue Jan 26 10:11:05 CET 2021

@leandrolanzieri commented on this pull request.

> +  # select a default seed source for auto initialization if none is selected
+  ifeq (,$(filter random_seed_%,$(USEMODULE)))
+    # by default we select the fixed, if another is possible we disable it
+    DEFAULT_MODULE += random_seed_fixed
+    ifneq (,$(filter puf_sram,$(USEMODULE)))
+      USEMODULE += random_seed_puf_sram
+      DISABLE_MODULE += random_seed_fixed
+    else ifneq (,$(filter periph_hwrng,$(FEATURES_USED)))
+      USEMODULE += random_seed_hwrng
+      DISABLE_MODULE += random_seed_fixed
+    else ifneq (,$(filter periph_cpuid,$(FEATURES_USED)))
+      USEMODULE += random_seed_luid
+      DISABLE_MODULE += random_seed_fixed
+    else
+      FEATURES_OPTIONAL += periph_hwrng
+      FEATURES_OPTIONAL += periph_cpuid
+    endif
+  endif

I could go in there. I put it here because the default selection of prng was also here, and though it could give other modules a change to select a seed if needed before this is parsed? But I can move it, it should work the same.

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/20210126/11c9dfdd/attachment-0001.htm>

More information about the notifications mailing list