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

Francisco notifications at github.com
Tue Jan 26 15:39:35 CET 2021


@fjmolinas 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

True, but now that you mention this I'm a bit concerned about a case where to pkg's might select different `random_seed` modules, I guess that would mean that some pkg's would not be compatible or one of them would have to declare its module as `DEFAULT` so it can potentially be disabled.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15836#discussion_r564560626
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210126/8c7808a6/attachment.htm>


More information about the notifications mailing list