cli: dt_makefile_patcher: Allow numbers in `configopt` regex

This fixes detection of the config option for SpacemiT K1 which is `CONFIG_SOC_SPACEMIT_K1X`.
Otherwise it would not find it because it includes a '1'.
This commit is contained in:
ColorfulRhino 2024-06-30 20:54:11 +02:00 committed by Igor
parent e8db1ce6d1
commit 308eba5d31
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ def auto_patch_dt_makefile(git_work_dir: str, dt_rel_dir: str, config_var: str,
makefile_lines = makefile_contents.splitlines()
log.info(f"Read {len(makefile_lines)} lines from {makefile_path}")
regex_dtb = r"(.*)\s(([a-zA-Z0-9-_]+)\.dtb)(.*)"
regex_configopt = r"^dtb-\$\(([a-zA-Z_]+)\)\s+"
regex_configopt = r"^dtb-\$\(([a-zA-Z0-9_]+)\)\s+"
# For each line, check if it matches the regex_dtb, extract the groups
line_counter = 0