mirror of
https://github.com/commaai/agnos-builder.git
synced 2026-07-23 15:52:08 +08:00
package_ota: fix path for raw image (#292)
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user