optimize build script

This commit is contained in:
Neucrack
2025-07-03 17:25:45 +08:00
parent efb48d13e9
commit e7aad42cc8
2 changed files with 24 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
def add_requirements(platform : str, find_dirs : list):
if platform == "maixcam":
return [
"nn",
]
elif platform == "maixcam2":
return [
"nn",
"json"
]
else:
raise Exception("maixcam_lib component.py not add this platform support yet")

View File

@@ -144,6 +144,15 @@ def get_components_find_dirs(configs):
def get_all_components_dl_info(find_dirs, kconfigs):
components = get_components_dirs(find_dirs)
valid_components = find_valid_components(components, find_dirs, kconfigs["PLATFORM"])
print("\n-- Enabled components:")
msg = " "
for i, c in enumerate(valid_components):
msg += c
if (i+1) % 8 == 0:
msg += ",\n "
else:
msg += ", "
print(f"{msg[:-2]}\n\n")
files_info = get_components_files(components, valid_components, kconfigs)
return files_info