sima-cli 0.0.20__py3-none-any.whl → 0.0.22__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sima_cli/__version__.py +1 -1
- sima_cli/cli.py +109 -15
- sima_cli/download/downloader.py +7 -3
- sima_cli/install/metadata_info.py +57 -0
- sima_cli/install/metadata_installer.py +447 -0
- sima_cli/install/metadata_validator.py +138 -0
- sima_cli/network/network.py +208 -0
- sima_cli/nvme/nvme.py +123 -0
- sima_cli/update/bootimg.py +5 -4
- sima_cli/update/local.py +10 -8
- sima_cli/update/netboot.py +4 -3
- sima_cli/update/query.py +7 -5
- sima_cli/update/remote.py +46 -25
- sima_cli/update/updater.py +71 -40
- sima_cli/utils/disk.py +15 -0
- sima_cli/utils/env.py +46 -0
- {sima_cli-0.0.20.dist-info → sima_cli-0.0.22.dist-info}/METADATA +2 -1
- {sima_cli-0.0.20.dist-info → sima_cli-0.0.22.dist-info}/RECORD +22 -16
- {sima_cli-0.0.20.dist-info → sima_cli-0.0.22.dist-info}/WHEEL +0 -0
- {sima_cli-0.0.20.dist-info → sima_cli-0.0.22.dist-info}/entry_points.txt +0 -0
- {sima_cli-0.0.20.dist-info → sima_cli-0.0.22.dist-info}/licenses/LICENSE +0 -0
- {sima_cli-0.0.20.dist-info → sima_cli-0.0.22.dist-info}/top_level.txt +0 -0
sima_cli/update/updater.py
CHANGED
@@ -26,7 +26,10 @@ else:
|
|
26
26
|
push_and_update_local_board = None
|
27
27
|
|
28
28
|
|
29
|
-
def
|
29
|
+
def convert_flavor(flavor: str = 'headless'):
|
30
|
+
return 'palette' if flavor == 'headless' else 'graphics'
|
31
|
+
|
32
|
+
def _resolve_firmware_url(version_or_url: str, board: str, internal: bool = False, flavor: str = 'headless') -> str:
|
30
33
|
"""
|
31
34
|
Resolve the final firmware download URL based on board, version, and environment.
|
32
35
|
|
@@ -34,6 +37,7 @@ def _resolve_firmware_url(version_or_url: str, board: str, internal: bool = Fals
|
|
34
37
|
version_or_url (str): Either a version string (e.g. 1.6.0_master_B1611) or a full URL.
|
35
38
|
board (str): Board type ('davinci' or 'modalix').
|
36
39
|
internal (bool): Whether to use internal config for URL construction.
|
40
|
+
flavor (str): firmware image flavor, can be headless or full.
|
37
41
|
|
38
42
|
Returns:
|
39
43
|
str: Full download URL.
|
@@ -53,11 +57,15 @@ def _resolve_firmware_url(version_or_url: str, board: str, internal: bool = Fals
|
|
53
57
|
if not url:
|
54
58
|
raise RuntimeError("⚠️ 'url' is not defined in resource config.")
|
55
59
|
|
56
|
-
#
|
57
|
-
|
60
|
+
# Davinci only supports headless images
|
61
|
+
if board == 'davinci':
|
62
|
+
flavor = 'headless'
|
63
|
+
|
64
|
+
image_file = 'release.tar.gz' if flavor == 'headless' else 'graphics.tar.gz'
|
65
|
+
download_url = url.rstrip("/") + f"/soc-images/{board}/{version_or_url}/artifacts/{image_file}"
|
58
66
|
return download_url
|
59
67
|
|
60
|
-
def _pick_from_available_versions(board: str, version_or_url: str, internal: bool) -> str:
|
68
|
+
def _pick_from_available_versions(board: str, version_or_url: str, internal: bool, flavor: str) -> str:
|
61
69
|
"""
|
62
70
|
Presents an interactive menu (with search) for selecting a firmware version.
|
63
71
|
"""
|
@@ -65,7 +73,7 @@ def _pick_from_available_versions(board: str, version_or_url: str, internal: boo
|
|
65
73
|
if "http" in version_or_url:
|
66
74
|
return version_or_url
|
67
75
|
|
68
|
-
available_versions = list_available_firmware_versions(board, version_or_url, internal)
|
76
|
+
available_versions = list_available_firmware_versions(board, version_or_url, internal, flavor)
|
69
77
|
|
70
78
|
try:
|
71
79
|
if len(available_versions) > 1:
|
@@ -113,7 +121,7 @@ def _sanitize_url_to_filename(url: str) -> str:
|
|
113
121
|
return safe_name
|
114
122
|
|
115
123
|
|
116
|
-
def _extract_required_files(tar_path: str, board: str, update_type: str = 'standard') -> list:
|
124
|
+
def _extract_required_files(tar_path: str, board: str, update_type: str = 'standard', flavor: str = 'headless') -> list:
|
117
125
|
"""
|
118
126
|
Extract required files from a .tar.gz or .tar archive into the same folder
|
119
127
|
and return the full paths to the extracted files (with subfolder if present).
|
@@ -124,15 +132,17 @@ def _extract_required_files(tar_path: str, board: str, update_type: str = 'stand
|
|
124
132
|
tar_path (str): Path to the downloaded or provided firmware archive.
|
125
133
|
board (str): Board type ('davinci' or 'modalix').
|
126
134
|
update_type (str): Update type ('standard' or 'bootimg').
|
135
|
+
flavor (str): flavor of the firmware ('full' or 'headless').
|
127
136
|
|
128
137
|
Returns:
|
129
138
|
list: List of full paths to extracted files.
|
130
139
|
"""
|
131
140
|
extract_dir = os.path.dirname(tar_path)
|
141
|
+
_flavor = convert_flavor(flavor)
|
132
142
|
|
133
143
|
target_filenames = {
|
134
144
|
"troot-upgrade-simaai-ev.swu",
|
135
|
-
f"simaai-image-
|
145
|
+
f"simaai-image-{_flavor}-upgrade-{board}.swu"
|
136
146
|
}
|
137
147
|
|
138
148
|
env_type, _os = get_environment_type()
|
@@ -141,8 +151,8 @@ def _extract_required_files(tar_path: str, board: str, update_type: str = 'stand
|
|
141
151
|
|
142
152
|
if update_type == 'bootimg':
|
143
153
|
target_filenames = {
|
144
|
-
f"simaai-image-
|
145
|
-
f"simaai-image-
|
154
|
+
f"simaai-image-{_flavor}-{board}.wic.gz",
|
155
|
+
f"simaai-image-{_flavor}-{board}.wic.bmap"
|
146
156
|
}
|
147
157
|
elif update_type == 'netboot':
|
148
158
|
target_filenames = {
|
@@ -152,9 +162,9 @@ def _extract_required_files(tar_path: str, board: str, update_type: str = 'stand
|
|
152
162
|
f"{board}-som.dtb",
|
153
163
|
f"{board}-dvt.dtb",
|
154
164
|
f"{board}-hhhl_x16.dtb",
|
155
|
-
f"simaai-image-
|
156
|
-
f"simaai-image-
|
157
|
-
f"simaai-image-
|
165
|
+
f"simaai-image-{_flavor}-{board}.wic.gz",
|
166
|
+
f"simaai-image-{_flavor}-{board}.wic.bmap",
|
167
|
+
f"simaai-image-{_flavor}-{board}.cpio.gz"
|
158
168
|
}
|
159
169
|
extracted_paths = []
|
160
170
|
|
@@ -207,7 +217,7 @@ def _extract_required_files(tar_path: str, board: str, update_type: str = 'stand
|
|
207
217
|
return []
|
208
218
|
|
209
219
|
|
210
|
-
def _download_image(version_or_url: str, board: str, internal: bool = False, update_type: str = 'standard'):
|
220
|
+
def _download_image(version_or_url: str, board: str, internal: bool = False, update_type: str = 'standard', flavor: str = 'headless'):
|
211
221
|
"""
|
212
222
|
Download or use a firmware image for the specified board and version or file path.
|
213
223
|
|
@@ -215,6 +225,7 @@ def _download_image(version_or_url: str, board: str, internal: bool = False, upd
|
|
215
225
|
version_or_url (str): Version string, HTTP(S) URL, or local file path.
|
216
226
|
board (str): Target board type ('davinci' or 'modalix').
|
217
227
|
internal (bool): Whether to use internal Artifactory resources.
|
228
|
+
flavor (str): Flavor of the image, can be headless or full, supported for Modalix only.
|
218
229
|
|
219
230
|
Notes:
|
220
231
|
- If a local file is provided, it skips downloading.
|
@@ -225,14 +236,14 @@ def _download_image(version_or_url: str, board: str, internal: bool = False, upd
|
|
225
236
|
# Case 1: Local file provided
|
226
237
|
if os.path.exists(version_or_url) and os.path.isfile(version_or_url):
|
227
238
|
click.echo(f"📁 Using local firmware file: {version_or_url}")
|
228
|
-
return _extract_required_files(version_or_url, board, update_type)
|
239
|
+
return _extract_required_files(version_or_url, board, update_type, flavor)
|
229
240
|
|
230
241
|
# Case 2: Treat as custom full URL
|
231
242
|
if version_or_url.startswith("http://") or version_or_url.startswith("https://"):
|
232
243
|
image_url = version_or_url
|
233
244
|
else:
|
234
245
|
# Case 3: Resolve standard version string (Artifactory/AWS)
|
235
|
-
image_url = _resolve_firmware_url(version_or_url, board, internal)
|
246
|
+
image_url = _resolve_firmware_url(version_or_url, board, internal, flavor=flavor)
|
236
247
|
|
237
248
|
# Determine platform-safe temp directory
|
238
249
|
temp_dir = tempfile.gettempdir()
|
@@ -247,7 +258,7 @@ def _download_image(version_or_url: str, board: str, internal: bool = False, upd
|
|
247
258
|
firmware_path = download_file_from_url(image_url, dest_path, internal=internal)
|
248
259
|
|
249
260
|
click.echo(f"📦 Firmware downloaded to: {firmware_path}")
|
250
|
-
return _extract_required_files(firmware_path, board, update_type)
|
261
|
+
return _extract_required_files(firmware_path, board, update_type, flavor)
|
251
262
|
|
252
263
|
except Exception as e:
|
253
264
|
click.echo(f"❌ Host update failed: {e}")
|
@@ -309,21 +320,26 @@ def _update_sdk(version_or_url: str, board: str):
|
|
309
320
|
click.echo(f"⚙️ Simulated SDK firmware update logic for board '{board}' (not implemented).")
|
310
321
|
# TODO: Implement update via SDK-based communication or tools
|
311
322
|
|
312
|
-
def _update_board(extracted_paths: List[str], board: str, passwd: str):
|
323
|
+
def _update_board(extracted_paths: List[str], board: str, passwd: str, flavor: str):
|
313
324
|
"""
|
314
325
|
Perform local firmware update using extracted files.
|
315
326
|
|
316
327
|
Args:
|
317
328
|
extracted_paths (List[str]): Paths to the extracted .swu files.
|
318
329
|
board (str): Board type expected (e.g. 'davinci', 'modalix').
|
330
|
+
flavor (str): headless or full.
|
319
331
|
"""
|
320
332
|
click.echo(f"⚙️ Starting local firmware update for board '{board}'...")
|
321
333
|
|
322
334
|
# Locate the needed files
|
335
|
+
_flavor = 'palette' if flavor == 'headless' else 'graphics'
|
323
336
|
troot_path = next((p for p in extracted_paths if "troot-upgrade" in os.path.basename(p)), None)
|
324
|
-
palette_path = next((p for p in extracted_paths if f"
|
337
|
+
palette_path = next((p for p in extracted_paths if f"{_flavor}-upgrade-{board}" in os.path.basename(p)), None)
|
325
338
|
|
326
|
-
if not troot_path
|
339
|
+
if not troot_path:
|
340
|
+
click.echo("⚠️ tRoot update skipped because the requested image doesn't contain troot image.")
|
341
|
+
|
342
|
+
if not palette_path:
|
327
343
|
click.echo("❌ Required firmware files not found in extracted paths.")
|
328
344
|
return
|
329
345
|
|
@@ -334,9 +350,9 @@ def _update_board(extracted_paths: List[str], board: str, passwd: str):
|
|
334
350
|
return
|
335
351
|
|
336
352
|
click.echo("✅ Board verified. Starting update...")
|
337
|
-
push_and_update_local_board(troot_path, palette_path, passwd)
|
353
|
+
push_and_update_local_board(troot_path, palette_path, passwd, flavor)
|
338
354
|
|
339
|
-
def _update_remote(extracted_paths: List[str], ip: str, board: str, passwd: str, reboot_and_wait: bool = True):
|
355
|
+
def _update_remote(extracted_paths: List[str], ip: str, board: str, passwd: str, reboot_and_wait: bool = True, flavor: str = 'headless'):
|
340
356
|
"""
|
341
357
|
Perform remote firmware update to the specified board via SSH.
|
342
358
|
|
@@ -345,21 +361,25 @@ def _update_remote(extracted_paths: List[str], ip: str, board: str, passwd: str,
|
|
345
361
|
ip (str): IP of the remote board.
|
346
362
|
board (str): Expected board type ('davinci' or 'modalix').
|
347
363
|
passwd (str): password to access the board, if it's not default
|
364
|
+
flavor (str): flavor of the firmware - headless or full
|
348
365
|
"""
|
349
366
|
click.echo(f"⚙️ Starting remote update on '{ip}' for board type '{board}'...")
|
350
367
|
|
351
368
|
# Locate files
|
369
|
+
_flavor = convert_flavor(flavor)
|
352
370
|
troot_path = next((p for p in extracted_paths if "troot-upgrade" in os.path.basename(p)), None)
|
353
|
-
palette_path = next((p for p in extracted_paths if f"
|
371
|
+
palette_path = next((p for p in extracted_paths if f"{_flavor}-upgrade-{board}" in os.path.basename(p)), None)
|
354
372
|
script_path = next((p for p in extracted_paths if p.endswith("sima_pcie_host_pkg.sh")), None)
|
355
373
|
|
356
|
-
if not troot_path
|
357
|
-
click.echo("
|
374
|
+
if not troot_path:
|
375
|
+
click.echo("⚠️ Required troot firmware files not found in extracted paths, skipping tRoot update...")
|
376
|
+
if not palette_path:
|
377
|
+
click.echo("❌ Required o/s files not found in extracted paths.")
|
358
378
|
return
|
359
379
|
|
360
380
|
# Get remote board info
|
361
381
|
click.echo("🔍 Checking remote board type and version...")
|
362
|
-
remote_board, remote_version = get_remote_board_info(ip, passwd)
|
382
|
+
remote_board, remote_version, fdt_name = get_remote_board_info(ip, passwd)
|
363
383
|
|
364
384
|
if not remote_board:
|
365
385
|
click.echo("❌ Could not determine remote board type.")
|
@@ -372,12 +392,12 @@ def _update_remote(extracted_paths: List[str], ip: str, board: str, passwd: str,
|
|
372
392
|
return
|
373
393
|
|
374
394
|
# Proceed with update
|
375
|
-
click.echo("✅ Board type verified. Proceeding with firmware update...")
|
376
|
-
push_and_update_remote_board(ip, troot_path, palette_path, passwd=passwd, reboot_and_wait=reboot_and_wait)
|
395
|
+
click.echo(f"✅ Board type verified. Proceeding with firmware update: troot : {troot_path}, os: {palette_path}...")
|
396
|
+
push_and_update_remote_board(ip, troot_path, palette_path, passwd=passwd, reboot_and_wait=reboot_and_wait, flavor=flavor)
|
377
397
|
|
378
398
|
return script_path
|
379
399
|
|
380
|
-
def download_image(version_or_url: str, board: str, swtype: str, internal: bool = False, update_type: str = 'standard'):
|
400
|
+
def download_image(version_or_url: str, board: str, swtype: str, internal: bool = False, update_type: str = 'standard', flavor: str = 'headless'):
|
381
401
|
"""
|
382
402
|
Download and extract a firmware image for a specified board.
|
383
403
|
|
@@ -387,18 +407,19 @@ def download_image(version_or_url: str, board: str, swtype: str, internal: bool
|
|
387
407
|
swtype (str): The software type (default to 'davinci', possible values: `davinci`, `modalix`): not supported for now
|
388
408
|
internal (bool): Whether to use internal download paths (e.g., Artifactory).
|
389
409
|
update_type (str): Whether this is standard update or writing boot image.
|
410
|
+
flavor (str): Flavor of the image, can be headless or full.
|
390
411
|
|
391
412
|
Returns:
|
392
413
|
List[str]: Paths to the extracted image files.
|
393
414
|
"""
|
394
415
|
|
395
416
|
if 'http' not in version_or_url and not os.path.exists(version_or_url):
|
396
|
-
version_or_url = _pick_from_available_versions(board, version_or_url, internal)
|
417
|
+
version_or_url = _pick_from_available_versions(board, version_or_url, internal, flavor)
|
397
418
|
|
398
|
-
extracted_paths = _download_image(version_or_url, board, internal, update_type)
|
419
|
+
extracted_paths = _download_image(version_or_url, board, internal, update_type, flavor=flavor)
|
399
420
|
return extracted_paths
|
400
421
|
|
401
|
-
def perform_update(version_or_url: str, ip: str = None, internal: bool = False, passwd: str = "edgeai", auto_confirm: bool = False):
|
422
|
+
def perform_update(version_or_url: str, ip: str = None, internal: bool = False, passwd: str = "edgeai", auto_confirm: bool = False, flavor: str = 'headless'):
|
402
423
|
r"""
|
403
424
|
Update the system based on environment and input.
|
404
425
|
|
@@ -413,25 +434,35 @@ def perform_update(version_or_url: str, ip: str = None, internal: bool = False,
|
|
413
434
|
internal (bool): If True, enable internal-only behaviors (e.g., Artifactory access).
|
414
435
|
passwd (str): Password for the board user (default: "edgeai").
|
415
436
|
auto_confirm (bool): If True, auto-confirm firmware update without prompting.
|
437
|
+
flavor (str): headless or full
|
416
438
|
"""
|
417
439
|
try:
|
418
440
|
board = ''
|
419
441
|
env_type, env_subtype = get_environment_type()
|
420
442
|
click.echo(f"🔄 Running update for environment: {env_type} ({env_subtype})")
|
421
|
-
click.echo(f"🔧 Requested version or URL: {version_or_url}")
|
443
|
+
click.echo(f"🔧 Requested version or URL: {version_or_url}, with flavor {flavor}")
|
422
444
|
|
423
445
|
if env_type == 'board':
|
424
446
|
board, version = get_local_board_info()
|
425
447
|
else:
|
426
|
-
board, version = get_remote_board_info(ip, passwd)
|
448
|
+
board, version, fdt_name = get_remote_board_info(ip, passwd)
|
427
449
|
|
428
450
|
if board in ['davinci', 'modalix']:
|
429
|
-
click.echo(f"🔧 Target board: {board}, board currently running: {version}")
|
430
|
-
|
451
|
+
click.echo(f"🔧 Target board: {board} {fdt_name}, board currently running: {version}")
|
452
|
+
|
453
|
+
if flavor == 'full' and fdt_name != 'modalix-som.dtb':
|
454
|
+
click.echo(f"❌ You've requested updating {fdt_name} to full image, this is only supported for the Modalix DevKit")
|
455
|
+
return
|
456
|
+
|
457
|
+
# Davinci only supports headless build, so ignore the full flavor
|
458
|
+
if board == 'davinci' and flavor != 'headless':
|
459
|
+
click.echo(f"MLSoC only supports headless image, ignoring {flavor} setting")
|
460
|
+
flavor = 'headless'
|
461
|
+
|
431
462
|
if 'http' not in version_or_url and not os.path.exists(version_or_url):
|
432
|
-
version_or_url = _pick_from_available_versions(board, version_or_url, internal)
|
463
|
+
version_or_url = _pick_from_available_versions(board, version_or_url, internal, flavor=flavor)
|
433
464
|
|
434
|
-
extracted_paths = _download_image(version_or_url, board, internal)
|
465
|
+
extracted_paths = _download_image(version_or_url, board, internal, flavor=flavor)
|
435
466
|
|
436
467
|
if not auto_confirm:
|
437
468
|
click.confirm(
|
@@ -446,15 +477,15 @@ def perform_update(version_or_url: str, ip: str = None, internal: bool = False,
|
|
446
477
|
# Always update the remote device first then update the host driver, otherwise the host would
|
447
478
|
# not be able to connect to the board
|
448
479
|
click.echo("👉 Updating PCIe host driver and downloading firmware...")
|
449
|
-
script_path = _update_remote(extracted_paths, ip, board, passwd, reboot_and_wait=False)
|
480
|
+
script_path = _update_remote(extracted_paths, ip, board, passwd, reboot_and_wait=False, flavor=flavor)
|
450
481
|
_update_host(script_path, board, ip, passwd)
|
451
482
|
elif env_type == "board":
|
452
|
-
_update_board(extracted_paths, board, passwd)
|
483
|
+
_update_board(extracted_paths, board, passwd, flavor=flavor)
|
453
484
|
elif env_type == "sdk":
|
454
485
|
click.echo("👉 Updating firmware from within the Palette SDK...: Not implemented yet")
|
455
486
|
elif ip:
|
456
487
|
click.echo(f"👉 Updating firmware on remote board at {ip}...")
|
457
|
-
_update_remote(extracted_paths, ip, board, passwd, reboot_and_wait=True)
|
488
|
+
_update_remote(extracted_paths, ip, board, passwd, reboot_and_wait=True, flavor=flavor)
|
458
489
|
else:
|
459
490
|
click.echo("❌ Unknown environment. Use --ip to specify target device.")
|
460
491
|
else:
|
sima_cli/utils/disk.py
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
import shutil
|
2
|
+
|
3
|
+
def check_disk_space(required_bytes: int, folder: str = ".") -> bool:
|
4
|
+
"""
|
5
|
+
Check if the given folder has enough free disk space.
|
6
|
+
|
7
|
+
Args:
|
8
|
+
required_bytes (int): Space required in bytes
|
9
|
+
folder (str): Path to check (default: current dir)
|
10
|
+
|
11
|
+
Returns:
|
12
|
+
bool: True if enough space is available, False otherwise
|
13
|
+
"""
|
14
|
+
total, used, free = shutil.disk_usage(folder)
|
15
|
+
return free >= required_bytes
|
sima_cli/utils/env.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import os
|
2
2
|
import subprocess
|
3
3
|
import platform
|
4
|
+
import shutil
|
4
5
|
from typing import Tuple
|
5
6
|
|
6
7
|
# Utility functions to determine the environment:
|
@@ -70,6 +71,51 @@ def get_sima_board_type() -> str:
|
|
70
71
|
|
71
72
|
return ""
|
72
73
|
|
74
|
+
def is_modalix_devkit() -> bool:
|
75
|
+
"""
|
76
|
+
Determines whether the current system is a Modalix DevKit (SOM)
|
77
|
+
by checking if 'fdt_name=modalix-som.dtb' is present in fw_printenv output.
|
78
|
+
|
79
|
+
Returns:
|
80
|
+
bool: True if running on a Modalix DevKit, False otherwise.
|
81
|
+
"""
|
82
|
+
if not shutil.which("fw_printenv"):
|
83
|
+
return False
|
84
|
+
|
85
|
+
try:
|
86
|
+
output = subprocess.check_output(["fw_printenv"], text=True)
|
87
|
+
for line in output.splitlines():
|
88
|
+
if line.strip().startswith("fdt_name="):
|
89
|
+
return "modalix-som.dtb" in line
|
90
|
+
except subprocess.CalledProcessError:
|
91
|
+
return False
|
92
|
+
|
93
|
+
return False
|
94
|
+
|
95
|
+
def get_exact_devkit_type() -> str:
|
96
|
+
"""
|
97
|
+
Extracts the exact devkit type from 'fdt_name' in fw_printenv output.
|
98
|
+
|
99
|
+
Returns:
|
100
|
+
str: The value of fdt_name (e.g., "modalix-som"), or an empty string if not found or unavailable.
|
101
|
+
"""
|
102
|
+
if not shutil.which("fw_printenv"):
|
103
|
+
return ""
|
104
|
+
|
105
|
+
try:
|
106
|
+
output = subprocess.check_output(["fw_printenv"], text=True)
|
107
|
+
for line in output.splitlines():
|
108
|
+
line = line.strip()
|
109
|
+
if line.startswith("fdt_name="):
|
110
|
+
_, value = line.split("=", 1)
|
111
|
+
return value.strip().replace('.dtb','')
|
112
|
+
except subprocess.CalledProcessError:
|
113
|
+
return ""
|
114
|
+
except Exception:
|
115
|
+
return ""
|
116
|
+
|
117
|
+
return ""
|
118
|
+
|
73
119
|
def is_palette_sdk() -> bool:
|
74
120
|
"""
|
75
121
|
Check if the environment is running inside the Palette SDK container.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: sima-cli
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.22
|
4
4
|
Summary: CLI tool for SiMa Developer Portal to download models, firmware, and apps.
|
5
5
|
Home-page: https://developer.sima.ai/
|
6
6
|
Author: SiMa.ai
|
@@ -26,6 +26,7 @@ Requires-Dist: rich
|
|
26
26
|
Requires-Dist: InquirerPy
|
27
27
|
Requires-Dist: tftpy
|
28
28
|
Requires-Dist: psutil
|
29
|
+
Requires-Dist: huggingface_hub
|
29
30
|
Dynamic: author
|
30
31
|
Dynamic: license-file
|
31
32
|
Dynamic: requires-python
|
@@ -1,7 +1,7 @@
|
|
1
1
|
sima_cli/__init__.py,sha256=Nb2jSg9-CX1XvSc1c21U9qQ3atINxphuNkNfmR-9P3o,332
|
2
2
|
sima_cli/__main__.py,sha256=ehzD6AZ7zGytC2gLSvaJatxeD0jJdaEvNJvwYeGsWOg,69
|
3
|
-
sima_cli/__version__.py,sha256=
|
4
|
-
sima_cli/cli.py,sha256=
|
3
|
+
sima_cli/__version__.py,sha256=lZAZ5KAyL1sCs70SHAhw90CQC4944919Ga30NNcR4_g,49
|
4
|
+
sima_cli/cli.py,sha256=dO6MG8sBX7LKJ-FhPQf7bw8oqSlosDXKcBaVbCIDZWQ,16056
|
5
5
|
sima_cli/app_zoo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
6
|
sima_cli/app_zoo/app.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
7
|
sima_cli/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -10,34 +10,40 @@ sima_cli/auth/login.py,sha256=yCYXWgrfbP4jSTZ3hITfxlgHkdVQVzsd8hQKpqaqCKs,3780
|
|
10
10
|
sima_cli/data/resources_internal.yaml,sha256=zlQD4cSnZK86bLtTWuvEudZTARKiuIKmB--Jv4ajL8o,200
|
11
11
|
sima_cli/data/resources_public.yaml,sha256=U7hmUomGeQ2ULdo1BU2OQHr0PyKBamIdK9qrutDlX8o,201
|
12
12
|
sima_cli/download/__init__.py,sha256=6y4O2FOCYFR2jdnQoVi3hRtEoZ0Gw6rydlTy1SGJ5FE,218
|
13
|
-
sima_cli/download/downloader.py,sha256=
|
13
|
+
sima_cli/download/downloader.py,sha256=nCBrr_0WdnKTIyecwKpg1sCdfm_4PSQTRPwEbiezy8M,5339
|
14
14
|
sima_cli/install/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
15
15
|
sima_cli/install/hostdriver.py,sha256=kAWDLebs60mbWIyTbUxmNrChcKW1uD5r7FtWNSUVUE4,5852
|
16
|
+
sima_cli/install/metadata_info.py,sha256=wmMqwzGfXbuilkqaxRVrFOzOtTOiONkmPCyA2oDAQpA,2168
|
17
|
+
sima_cli/install/metadata_installer.py,sha256=mtwtBEMmLh6-Hqtv6CTTAQa76sRJXZCqE9ORPQutfcc,16547
|
18
|
+
sima_cli/install/metadata_validator.py,sha256=7954rp9vFRNnqmIMvCVTjq40kUIEbGXzfc8HmQmChe0,5221
|
16
19
|
sima_cli/install/optiview.py,sha256=i5eWVor-9MScEfrQm3Ty9OP4VpSsCgWvNh7AvYdZu7s,3365
|
17
20
|
sima_cli/install/palette.py,sha256=uRznoHa4Mv9ZXHp6AoqknfC3RxpYNKi9Ins756Cyifk,3930
|
18
21
|
sima_cli/mla/meminfo.py,sha256=ndc8kQJmWGEIdvNh6iIhATGdrkqM2pbddr_eHxaPNfg,1466
|
19
22
|
sima_cli/model_zoo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
20
23
|
sima_cli/model_zoo/model.py,sha256=q91Nrg62j1TqwPO8HiX4nlEFCCmzNEFcyFTBVMbJm8w,9836
|
24
|
+
sima_cli/network/network.py,sha256=ToDCQBfX0bUFEWWtfS8srImK5T11MX6R4MBQFM80faY,7617
|
25
|
+
sima_cli/nvme/nvme.py,sha256=ECdd25fvFbs5T5_PlIwnxm3NiPNmqnFGXrgLZhLENRY,4129
|
21
26
|
sima_cli/sdk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
22
27
|
sima_cli/sdk/syscheck.py,sha256=h9zCULW67y4i2hqiGc-hc1ucBDShA5FAe9NxwBGq-fM,4575
|
23
28
|
sima_cli/serial/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
24
29
|
sima_cli/serial/serial.py,sha256=6xRta_PzE_DmmooYq35lbK76TYpAny5SEJAdYC_3fH0,4141
|
25
30
|
sima_cli/update/__init__.py,sha256=0P-z-rSaev40IhfJXytK3AFWv2_sdQU4Ry6ei2sEus0,66
|
26
31
|
sima_cli/update/bmaptool.py,sha256=KrhUGShBwY4Wzz50QiuMYAxxPgEy1nz5C68G-0a4qF4,4988
|
27
|
-
sima_cli/update/bootimg.py,sha256=
|
28
|
-
sima_cli/update/local.py,sha256=
|
29
|
-
sima_cli/update/netboot.py,sha256=
|
30
|
-
sima_cli/update/query.py,sha256=
|
31
|
-
sima_cli/update/remote.py,sha256=
|
32
|
-
sima_cli/update/updater.py,sha256=
|
32
|
+
sima_cli/update/bootimg.py,sha256=jsxMv7OlrDP_fjzfTMn5UoiSOv7afB2LSM0pR50b4uE,13541
|
33
|
+
sima_cli/update/local.py,sha256=Blje7O2pcBopBLXwuVI826lnjPMTJ3lPU85dTUWUV48,3445
|
34
|
+
sima_cli/update/netboot.py,sha256=RqFgBhixcjPEwdVGvKhR0TeztoFnmGigmXlA71WVksA,18647
|
35
|
+
sima_cli/update/query.py,sha256=9yCW1ZQl42DAWV_7sbNsqEKeS9FzHdvgXpY5eS2GpDs,3540
|
36
|
+
sima_cli/update/remote.py,sha256=uv0cezLeG4tsJvalgm_VDOo3EUCU7LB3nXl8mNFFtds,10934
|
37
|
+
sima_cli/update/updater.py,sha256=vBdT0Im0a0iKwB-LzVDZasnXk2Rq-kNlBGr7bTG0-14,20879
|
33
38
|
sima_cli/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
34
39
|
sima_cli/utils/artifactory.py,sha256=6YyVpzVm8ATy7NEwT9nkWx-wptkXrvG7Wl_zDT6jmLs,2390
|
35
40
|
sima_cli/utils/config.py,sha256=wE-cPQqY_gOqaP8t01xsRHD9tBUGk9MgBUm2GYYxI3E,1616
|
36
41
|
sima_cli/utils/config_loader.py,sha256=7I5we1yiCai18j9R9jvhfUzAmT3OjAqVK35XSLuUw8c,2005
|
37
|
-
sima_cli/utils/
|
42
|
+
sima_cli/utils/disk.py,sha256=66Kr631yhc_ny19up2aijfycWfD35AeLQOJgUsuH2hY,446
|
43
|
+
sima_cli/utils/env.py,sha256=bNushG2BD243fNlqCpuUJxLF76inRxTFeSDkl_KCHy0,7130
|
38
44
|
sima_cli/utils/net.py,sha256=WVntA4CqipkNrrkA4tBVRadJft_pMcGYh4Re5xk3rqo,971
|
39
45
|
sima_cli/utils/network.py,sha256=UvqxbqbWUczGFyO-t1SybG7Q-x9kjUVRNIn_D6APzy8,1252
|
40
|
-
sima_cli-0.0.
|
46
|
+
sima_cli-0.0.22.dist-info/licenses/LICENSE,sha256=a260OFuV4SsMZ6sQCkoYbtws_4o2deFtbnT9kg7Rfd4,1082
|
41
47
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
42
48
|
tests/test_app_zoo.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
43
49
|
tests/test_auth.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -46,8 +52,8 @@ tests/test_download.py,sha256=t87DwxlHs26_ws9rpcHGwr_OrcRPd3hz6Zmm0vRee2U,4465
|
|
46
52
|
tests/test_firmware.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
47
53
|
tests/test_model_zoo.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
48
54
|
tests/test_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
49
|
-
sima_cli-0.0.
|
50
|
-
sima_cli-0.0.
|
51
|
-
sima_cli-0.0.
|
52
|
-
sima_cli-0.0.
|
53
|
-
sima_cli-0.0.
|
55
|
+
sima_cli-0.0.22.dist-info/METADATA,sha256=3LetoBbyq_AopItmkPCqz3BBWL2_osKmaPHd_Vh8038,3705
|
56
|
+
sima_cli-0.0.22.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
57
|
+
sima_cli-0.0.22.dist-info/entry_points.txt,sha256=xRYrDq1nCs6R8wEdB3c1kKuimxEjWJkHuCzArQPT0Xk,47
|
58
|
+
sima_cli-0.0.22.dist-info/top_level.txt,sha256=FtrbAUdHNohtEPteOblArxQNwoX9_t8qJQd59fagDlc,15
|
59
|
+
sima_cli-0.0.22.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|