package_ota: fix path for raw image (#292)

This commit is contained in:
Andrei Radulescu
2024-08-08 20:28:11 +03:00
committed by GitHub
parent 2c6b35d6e1
commit b33ebce21d
+5 -1
View File
@@ -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")