Skip to content

Commit

Permalink
chore(cmake): handle default vid/pid
Browse files Browse the repository at this point in the history
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
  • Loading branch information
fpistm committed Jul 18, 2024
1 parent 35252af commit 115d040
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cmake/scripts/update_boarddb.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ def platformtxt_filter(key):

if key[0] == "build" and key[1] != "info":
return False
if key[0] == "vid" or key[0] == "pid":
return False
return True


Expand Down Expand Up @@ -104,7 +106,12 @@ def regenerate_template(config, infile, outfile):
shargs = parser.parse_args()

platformtxt_cfg = parse_file(shargs.platform, reject=platformtxt_filter)
platformtxt_cfg = {"build": platformtxt_cfg["build"]} # whitelist what we need
# whitelist what we need
platformtxt_cfg = {
"build": platformtxt_cfg["build"],
"vid": platformtxt_cfg["vid"],
"pid": platformtxt_cfg["pid"],
}

boardstxt_cfg = parse_file(shargs.boards, reject=boardstxt_filter)
del boardstxt_cfg["menu"] # blacklist what we don't need
Expand Down

0 comments on commit 115d040

Please sign in to comment.