From 2ed57cb1542bfbccd27937fb736e08191ab488f1 Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Fri, 25 Apr 2025 07:50:56 +0200 Subject: [PATCH] build system: introduce `bug_%` feature category This introduces a new feature category to declare which bugs are present in a given build that we cannot fix in RIOT, but need to work around. These bugs may be silicon bugs, software bugs in ROM, software bugs in binary blobs needed for a platform, or bugs in the toolchain. These features behave the same way as `arch_%` features: Every provided bug is always used, so that we can inspect `FEATURES_USED` to check which bugs need to be worked around. Co-authored-by: crasbe --- Makefile.include | 2 ++ features.yaml | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/Makefile.include b/Makefile.include index 9e242cd6b9..1d7b1c9feb 100644 --- a/Makefile.include +++ b/Makefile.include @@ -423,6 +423,8 @@ include $(RIOTMAKE)/kconfig.mk FEATURES_REQUIRED += $(filter arch_%,$(FEATURES_PROVIDED)) # always select CPU core features FEATURES_REQUIRED += $(filter cpu_core_%,$(FEATURES_PROVIDED)) +# always "select" bug affecting the current build +FEATURES_REQUIRED += $(filter bug_%,$(FEATURES_PROVIDED)) # check if required features are provided and update $(FEATURES_USED) include $(RIOTMAKE)/features_check.inc.mk diff --git a/features.yaml b/features.yaml index 6174f93f4b..91594f52bb 100644 --- a/features.yaml +++ b/features.yaml @@ -922,3 +922,10 @@ groups: open and solder bridges SB4, SB5 and SB6 are closed instead, SPI2 is connected to the STMmod+/Pmod connector. Request this feature to use SPI2 with this board configuration. + +- title: Bugs in hardware, toolchain, or binary blobs + help: This allows modelling bugs found in boards, so that workarounds can + be enabled for affected builds by inspecting "FEATURES_USED". Any + feature prefixed with "bug_" provided in a build will always be used, + regardless of build configuration. + features: