DEFAULT_MODULEs declared in defaultmodules_regular.inc.mk MAY only be
disabled at APPLICATION level or in BOARD/CPU Makefile.default. These
modules MAY have complex dependencies themselfs.
DEFAULT_MODULEs declared in defaultmodules_no_recursive_deps.inc.mk MAY be disabled
during dependency resolution. The MUST only have dependencies against
modules with no dependencies themselfs, and these dependencies must
be defined in makefiles/defaultmodules._deps.inc.mk
For RISC-V and Cortex-M-not-3, triples are known and have worked in some
configuration, but do not work at the moment and stay disabled until the
reference platforms (native, M3) have been established well.
If we
-include Makefile.ci
and `Makefile.ci` does not exist, but we provide `make` with a way
on how to do so, it will try to create `Makefile.ci`.
This is not what we want, but I don't know how to disable this automagic.
So rename the target to `create-Makefile.ci` to avoid the conflict.
This removes a preliminar dependency resolution that is performed
without including features, to skip a full dependency resolution when
boards can be proven to be unsupported on an earlier stage.
This was introducing issues on some boards since the blacklisting of
some features depends on board information which is not available at the
time of performing this resolution.
When using eval the function board_unsatisfied_features is evaluated
twice, in the first evaluation this will lead to the previous value
for `BOARDS` to be expanded, so escape all occurrences.
- 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
Add a 'dependency-debug' and a 'DEPENDENCY_DEBUG=1' option for
'info-boards-supported' to save some variables used when resolving
dependencies.
Print some some 'sorted' variables to simplify comparing the actual value
when the parsing order changed.
This should help tracking changes introduced when refactoring the
dependency parsing.
The value must be saved from the original value to allow restoring it.
This has currently no impact on 'info-boards-supported' as it is
currently ignored.
The value must be saved from the original value to allow restoring it.
This has currently no impact as 'makefiles/defaultmodules.inc.mk'
and 'DISABLE_MODULE' are ignored in this parsing.
Update the FEATURES_OPTIONAL meaning to be more in line since
FEATURES_USED is defined. Handle FEATURES_OPTIONAL as a configuration from
the BSP/build that should not be changed anymore after.
`FEATURES_OPTIONAL` are by definition optional so are not supposed to
cause a build to fail.
Only the 'REQUIRED' ones that are not 'PROVIDED' are 'MISSING'.
* Do not change FEATURES_OPTIONAL to remove REQUIRED features
* Prepare for having a different variable for the previous value
* Update dependency resolution/info-build as FEATURES_OPTIONAL cannot be missing
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.