scripts: edtlib: relax vendor check for root node

There are way too many one-off vendor prefixes set up for individual
boards to bother tracking them in vendor-prefixes.txt. As a practical
matter, the compatible for the root node doesn't matter anyway. So
just relax our check for that node.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
Martí Bolívar 2021-08-03 14:59:52 -07:00 committed by Christopher Friedt
commit e9229f1f2b

View file

@ -518,7 +518,10 @@ class EDT:
if ',' in compat and self._vendor_prefixes is not None:
vendor = compat.split(',', 1)[0]
if vendor not in self._vendor_prefixes and \
# As an exception, the root node can have whatever
# compatibles it wants. Other nodes get checked.
if node.path != '/' and \
vendor not in self._vendor_prefixes and \
vendor not in _VENDOR_PREFIX_ALLOWED:
if self._werror:
log_fn = _LOG.error