If there is an Ethernet peripheral (periph_eth feature provided), we
can conclude that an Ethernet network interface can be provided.
Co-authored-by: mguetschow <mikolai.guetschow@tu-dresden.de>
- Add the new EXTERNAL_BOARD_DIRS variable that can contain a space separated
list of folders containing external boards
- Introduce $(BOARDDIR) as shortcut for $(BOARDSDIR)/$(BOARD)
- Map the existing BOARDSDIR to the new approach
- If BOARDSDIR is provided by the user, it will be added to
EXTERNAL_BOARD_DIRS for backward compatibility. (And a warning is issued
to encourage users migrating to EXTRA_BOARDS.)
- BOARDSDIR is updated after the board is found to "$(BOARDDIR)/..".
- Useful for `include $(BOARDSDIR)/common/external_common/Makefile.dep`
- Provides backward compatibility
Goals:
- Untangle dependency resolution and feature checking for better maintainability
- Improve performance of "make info-boards-supported"
Changes:
- Makefile.dep
- Dropped handling of default modules and recursion
- Now only dependencies of the current set of used modules and pkgs are
added
==> External recursion is needed to catch transient dependencies
- Changed Makefile.features:
- Dropped checking of provided features
- Dropped populating FEATURES_USED with provided features that are required
or optional
- Dropped populating FEATURES_MISSING with required but not provided
features
- Dropped adding modules implementing used features to USE_MODULE
==> This now only populates FEATURES_PROVIDED, nothing more
- Added makefiles/features_check.inc.mk:
- This performs the population of FEATURES_USED and FEATURES_MISSING now
- Added makefiles/features_modules.inc.mk:
- This performs now the addition of modules implementing used features
- Added makefiles/dependency_resolution.inc.mk:
- This now performs the recursion required to catch transient dependencies
- Also the feature check is performed recursively to handle also required
and optional features of the transient dependencies
- DEFAULT_MODULES are added repeatedly to allow it to be extended based on
used features and modules
==> This allows modules to have optional dependencies, as these
dependencies can be blacklisted
- Use simply expanded variables instead of recursively expended variables
(`foo := $(bar)` instead `foo = $(bar)`) for internal variables during feature
resolution. This improves performance significantly for
`make info-boards-supported`.
- Reduce dependency resolution steps in `make info-boards-supported`
- Globally resolve dependencies without any features (including arch)
provided
==> This results in the common subset of feature requirements and modules
used
- But for individual boards additional modules might be used on top due
to architecture specific dependencies or optional features
- Boards not supporting this subset of commonly required features are not
supported, so no additional dependency resolution is needed for them
- For each board supporting the common set of requirements a complete
dependency resolution is still needed to also catch architecture specific
hacks
- But this resolution is seeded with the common set of dependencies to
speed this up
An application/test/module that requires one feature out of a set of
alternatives (let's say either periph_uart, periph_spi, or periph_i2c) can
request this now using:
FEATURES_REQUIRED_ANY += periph_uart|periph_spi|periph_i2c
CPU must now be defined by `$(RIOTBOARD)/$(BOARD)/Makefile.features` or
one of its common included Makefile.features file.
The cpu `Makefile.dep` file can now automatically be included when it exists.
CPU must be defined by `$(RIOTBOARD)/$(BOARD)/Makefile.features` or
one of its common included Makefile.features file.
This currently only adds a warning but not prevents building for the
moment.
Prepare for when boards define `CPU` in `BOARD/Makefile.features`.
Include '$(RIOTCPU)/$(CPU)/Makefile.features' directly when it is
defined. This will allow removing the file inclusion from the
`BOARD/Makefile.features`. The board must then not include it directly.
Transitional change to allow migrating part by parts.
Part of moving CPU/CPU_MODEL definition to Makefile.features to have it
available before Makefile.include.
Put the definition of `FEATURES_USED` in common and use the variable
instead of duplicating code.
This required defining 'FEATURES_OPTIONAL_ONLY|USED' to not overwrite
the value of 'FEATURES_OPTIONAL' as was done before.
Also add 'FEATURES_OPTIONAL_MISSING' to list optional features that were
not included as not provided.
This removes the need to print FEATURES_MISSING with the optional
features too.
This will allow sharing it between Makefile.include and
makefiles/info-global.inc.mk.
Also some common variables definition can also be moved to here.
Part of moving CPU/CPU_MODEL definition to Makefile.features to have it
available before Makefile.include.