From: Troy Kisky <troy.kisky@boundarydevices.com>
To: sjg@chromium.org, trini@konsulko.com
Cc: fabio.estevam@nxp.com, u-boot@lists.denx.de,
Troy Kisky <troy.kisky@boundarydevices.com>
Subject: [PATCH v1 4/5] genboardcfg: allow defconfigs in board directory
Date: Fri, 17 Dec 2021 15:01:30 -0800 [thread overview]
Message-ID: <20211217230131.2715940-5-troy.kisky@boundarydevices.com> (raw)
In-Reply-To: <20211217230131.2715940-1-troy.kisky@boundarydevices.com>
The adds boards whose defconfigs are in the board's directory.
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
---
tools/genboardscfg.py | 37 ++++++++++++++++++++++++++++++++++++-
1 file changed, 36 insertions(+), 1 deletion(-)
diff --git a/tools/genboardscfg.py b/tools/genboardscfg.py
index 4ee7aa1f891..60e2fe5cf3e 100755
--- a/tools/genboardscfg.py
+++ b/tools/genboardscfg.py
@@ -37,6 +37,13 @@ COMMENT_BLOCK = '''#
''' % __file__
### helper functions ###
+def find_defconfig_in_board_subdir(f):
+ for (dirpath, dirnames, filenames) in os.walk('board'):
+ for filename in filenames:
+ if filename == f:
+ return True
+ return False
+
def try_remove(f):
"""Remove a file ignoring 'No such file or directory' error."""
try:
@@ -76,6 +83,14 @@ def output_is_new(output):
if ctime < os.path.getctime(filepath):
return False
+ for (dirpath, dirnames, filenames) in os.walk('board'):
+ for filename in fnmatch.filter(filenames, '*'):
+ if fnmatch.fnmatch(filename, '.*'):
+ continue
+ filepath = os.path.join(dirpath, filename)
+ if ctime < os.path.getctime(filepath):
+ return False
+
for (dirpath, dirnames, filenames) in os.walk('.'):
for filename in filenames:
if (fnmatch.fnmatch(filename, '*~') or
@@ -94,7 +109,8 @@ def output_is_new(output):
continue
defconfig = line.split()[6] + '_defconfig'
if not os.path.exists(os.path.join(CONFIG_DIR, defconfig)):
- return False
+ if not find_defconfig_in_board_subdir(defconfig):
+ return False
return True
@@ -231,6 +247,12 @@ def scan_defconfigs(jobs=1):
continue
all_defconfigs.append(os.path.join(dirpath, filename))
+ for (dirpath, dirnames, filenames) in os.walk('board'):
+ for filename in fnmatch.filter(filenames, '*_defconfig'):
+ if fnmatch.fnmatch(filename, '.*'):
+ continue
+ all_defconfigs.append(os.path.join(dirpath, filename))
+
total_boards = len(all_defconfigs)
processes = []
queues = []
@@ -346,6 +368,19 @@ class MaintainersDatabase:
targets = []
maintainers = []
status = '-'
+
+ front, match, rear = file.partition('board/')
+ if match:
+ front, match, rear = file.partition('/MAINTAINERS')
+ if front:
+ for (dirpath, dirnames, filenames) in os.walk(front):
+ for filename in fnmatch.filter(filenames, '*_defconfig'):
+ if fnmatch.fnmatch(filename, '.*'):
+ continue
+ front, match, rear = filename.rpartition('_defconfig')
+ if match and not rear:
+ targets.append(front)
+
if targets:
for target in targets:
self.database[target] = (status, maintainers)
--
2.32.0
next prev parent reply other threads:[~2021-12-17 23:02 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-17 23:01 [PATCH v1 0/5] Move board specific files to board directory Troy Kisky
2021-12-17 23:01 ` [PATCH v1 1/5] kconfig: allow defconfigs to live in " Troy Kisky
2021-12-28 8:33 ` Simon Glass
2022-01-06 21:00 ` Troy Kisky
2021-12-17 23:01 ` [PATCH v1 2/5] dts: allow dts files " Troy Kisky
2021-12-28 8:33 ` Simon Glass
2022-01-06 21:01 ` Troy Kisky
2021-12-17 23:01 ` [PATCH v1 3/5] scripts: Makefile.autoconf: allow CONFIG_SYS_CONFIG_NAME file to live " Troy Kisky
2021-12-28 8:33 ` Simon Glass
2022-01-06 21:09 ` Troy Kisky
2022-01-30 23:14 ` Simon Glass
2021-12-17 23:01 ` Troy Kisky [this message]
2021-12-28 8:33 ` [PATCH v1 4/5] genboardcfg: allow defconfigs " Simon Glass
2021-12-17 23:01 ` [PATCH v1 5/5] nitrogen6x: move board specific files to nitrogen6x directory Troy Kisky
2021-12-28 8:33 ` Simon Glass
2021-12-28 8:33 ` [PATCH v1 0/5] Move board specific files to board directory Simon Glass
2021-12-28 13:11 ` Tom Rini
2022-01-06 21:14 ` Troy Kisky
2022-01-07 15:12 ` Tom Rini
2022-01-07 18:33 ` Troy Kisky
2022-01-30 23:14 ` Simon Glass
2022-02-08 14:30 ` Tom Rini
2022-03-15 19:08 ` Troy Kisky
2022-03-15 20:01 ` Tom Rini
2022-03-15 20:23 ` Troy Kisky
2022-03-16 14:48 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211217230131.2715940-5-troy.kisky@boundarydevices.com \
--to=troy.kisky@boundarydevices.com \
--cc=fabio.estevam@nxp.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.