From b33ebce21db8e7b07899cef32c54ece9a05fbd06 Mon Sep 17 00:00:00 2001 From: Andrei Radulescu Date: Thu, 8 Aug 2024 20:28:11 +0300 Subject: [PATCH] package_ota: fix path for raw image (#292) --- scripts/package_ota.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/package_ota.py b/scripts/package_ota.py index 8334bd7..d10a3d7 100755 --- a/scripts/package_ota.py +++ b/scripts/package_ota.py @@ -9,6 +9,7 @@ from pathlib import Path ROOT = Path(__file__).parent.parent OUTPUT_DIR = ROOT / "output" OTA_OUTPUT_DIR = OUTPUT_DIR / "ota" +BUILD_DIR = ROOT / "build" AGNOS_UPDATE_URL = os.getenv("AGNOS_UPDATE_URL", "https://commadist.azureedge.net/agnosupdate") AGNOS_STAGING_UPDATE_URL = os.getenv("AGNOS_STAGING_UPDATE_URL", "https://commadist.azureedge.net/agnosupdate-staging") @@ -31,11 +32,14 @@ def process_file(fn, name, sparse=False, full_check=True, has_ab=True, alt=None) print(f" {size} bytes, hash {hash}") if sparse: - raw_img = OUTPUT_DIR / "system.raw.img" + raw_img = BUILD_DIR / "system.img.raw" if raw_img.exists(): print(" using existing raw image") hash_raw = checksum(raw_img) size = raw_img.stat().st_size + else: + print("Error: existing raw image not found") + exit(1) print(f" {size} bytes, hash {hash_raw} (raw)") print(" compressing")