From 40d8eb8a4e8a8558a5d5b50383755b77ba6b5cd3 Mon Sep 17 00:00:00 2001 From: FrogAi Date: Fri, 9 May 2025 10:39:24 -0700 Subject: [PATCH] agnos 10.1.1 --- launch_env.sh | 2 +- system/hardware/tici/agnos.json | 14 +++++++------- system/hardware/tici/agnos.py | 20 +++++++++++++------- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/launch_env.sh b/launch_env.sh index 81578aff0..c091538ff 100755 --- a/launch_env.sh +++ b/launch_env.sh @@ -7,7 +7,7 @@ export OPENBLAS_NUM_THREADS=1 export VECLIB_MAXIMUM_THREADS=1 if [ -z "$AGNOS_VERSION" ]; then - export AGNOS_VERSION="10.1" + export AGNOS_VERSION="10.1.1" fi export STAGING_ROOT="/data/safe_staging" diff --git a/system/hardware/tici/agnos.json b/system/hardware/tici/agnos.json index b1862bdef..0f4ed523f 100644 --- a/system/hardware/tici/agnos.json +++ b/system/hardware/tici/agnos.json @@ -1,9 +1,9 @@ [ { "name": "boot", - "url": "https://commadist.azureedge.net/agnosupdate/boot-5674ea6767e7198cf1e7def3de66a57061f001ed76d43dc4b4f84de545c53c6f.img.xz", - "hash": "5674ea6767e7198cf1e7def3de66a57061f001ed76d43dc4b4f84de545c53c6f", - "hash_raw": "5674ea6767e7198cf1e7def3de66a57061f001ed76d43dc4b4f84de545c53c6f", + "url": "https://boot.frogpilot.download", + "hash": "b997aae3f1c93de82449ef7f23f30ff482b0978f3d0ac08219366f9ce362ad7a", + "hash_raw": "b997aae3f1c93de82449ef7f23f30ff482b0978f3d0ac08219366f9ce362ad7a", "size": 16029696, "sparse": false, "full_check": true, @@ -61,9 +61,9 @@ }, { "name": "system", - "url": "https://commadist.azureedge.net/agnosupdate/system-1badfe72851628d6cf9200a53a6151bb4e797b49c717141409fc57138eae388a.img.xz", - "hash": "328e90c62068222dfd98f71dd3f6251fcb962f082b49c6be66ab2699f5db6f4f", - "hash_raw": "1badfe72851628d6cf9200a53a6151bb4e797b49c717141409fc57138eae388a", + "url": "https://system.frogpilot.download", + "hash": "be1c6bb9ee5e06779087b1b81e09b6df61d942566b0f8d4539c452179c661782", + "hash_raw": "a5f84e68d199466fda5c9aead760b90a4cd2d2ef9a418708b9794d95bb03ec5b", "size": 10737418240, "sparse": true, "full_check": false, @@ -74,4 +74,4 @@ "size": 4548070000 } } -] \ No newline at end of file +] diff --git a/system/hardware/tici/agnos.py b/system/hardware/tici/agnos.py index 7e3536f77..45ea20304 100755 --- a/system/hardware/tici/agnos.py +++ b/system/hardware/tici/agnos.py @@ -168,18 +168,24 @@ def extract_compressed_image(target_slot_number: int, partition: dict, cloudlog) last_p = p print(f"Installing {partition['name']}: {p}", flush=True) - if raw_hash.hexdigest().lower() != partition['hash_raw'].lower(): - raise Exception(f"Raw hash mismatch '{raw_hash.hexdigest().lower()}'") + written_size = out.tell() + expected_size = partition['size'] + actual_raw_hash = raw_hash.hexdigest().lower() + expected_raw_hash = partition['hash_raw'].lower() + actual_final_hash = downloader.sha256.hexdigest().lower() + expected_final_hash = partition['hash'].lower() - if downloader.sha256.hexdigest().lower() != partition['hash'].lower(): - raise Exception("Uncompressed hash mismatch") + if actual_raw_hash != expected_raw_hash: + raise Exception(f"Raw hash mismatch: got {actual_raw_hash}, expected {expected_raw_hash}") - if out.tell() != partition['size']: - raise Exception("Uncompressed size mismatch") + if actual_final_hash != expected_final_hash: + raise Exception(f"Uncompressed hash mismatch: got {actual_final_hash}, expected {expected_final_hash}") + + if written_size != expected_size: + raise Exception(f"Uncompressed size mismatch: wrote {written_size} bytes, expected {expected_size} bytes") os.sync() - def extract_casync_image(target_slot_number: int, partition: dict, cloudlog): path = get_partition_path(target_slot_number, partition) seed_path = path[:-1] + ('b' if path[-1] == 'a' else 'a')