Remove firwmare.json (#432)

* Remove firwmare.json

* match order
This commit is contained in:
Adeeb Shihadeh
2025-01-22 16:50:37 -08:00
committed by GitHub
parent 9573332851
commit 4f3cbd21b8
4 changed files with 13 additions and 34 deletions
+1 -1
View File
@@ -82,5 +82,5 @@ Some concrete things on the roadmap:
- [x] update to Ubuntu 24.04 https://github.com/commaai/openpilot/issues/32386
- [ ] mainline Linux kernel https://github.com/commaai/openpilot/issues/32386
- [ ] fully open source
- [ ] anything from [firmware.json](firmware.json): XBL, ABL, etc.
- [ ] anything from `firmware/`: XBL, ABL, etc.
- [ ] Weston https://github.com/commaai/agnos-builder/issues/16
+3 -5
View File
@@ -4,11 +4,9 @@ set -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
cd $DIR
DOWNLOADED="aop abl xbl xbl_config devcfg"
scripts/download-from-manifest.py --manifest firmware.json
for part in $DOWNLOADED; do
tools/edl w ${part}_a $DIR/output/$part.img
tools/edl w ${part}_b $DIR/output/$part.img
for part in aop abl xbl xbl_config devcfg; do
tools/edl w ${part}_a $DIR/firmware/$part.bin
tools/edl w ${part}_b $DIR/firmware/$part.bin
done
./flash_kernel.sh
+1 -5
View File
@@ -49,11 +49,7 @@ DATA_SAS_TOKEN=$(az storage container generate-sas --as-user --auth-mode login -
# Liftoff!
for name in $(cat $OTA_JSON | jq -r ".[] .name"); do
if grep -q "name.*${name}" $DIR/../firmware.json; then
echo "Skipping $name, found in firmware.json"
else
process_file $name
fi
process_file $name
done
echo "Done!"
+8 -23
View File
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
import sys
import json
import os
import hashlib
@@ -9,6 +8,7 @@ from pathlib import Path
ROOT = Path(__file__).parent.parent
OUTPUT_DIR = ROOT / "output"
FIRMWARE_DIR = ROOT / "firmware"
OTA_OUTPUT_DIR = OUTPUT_DIR / "ota"
BUILD_DIR = ROOT / "build"
@@ -53,28 +53,13 @@ def process_file(fn, name, full_check=True, has_ab=True):
if __name__ == "__main__":
OTA_OUTPUT_DIR.mkdir(parents=True, exist_ok=True)
if len(sys.argv[1:]):
files = [process_file(Path(fn), Path(fn).stem) for fn in sys.argv[1:]]
else:
files = [
process_file(OUTPUT_DIR / "boot.img", "boot"),
process_file(OUTPUT_DIR / "system.img", "system", full_check=False),
]
# pull in firmware not built in this repo
with open(ROOT/"firmware.json") as f:
fws = json.loads(f.read())
for fw in fws:
files.append({
"name": fw["name"],
"url": fw["url"],
"hash": fw["hash"],
"hash_raw": fw["hash"],
"size": fw["size"],
"sparse": False,
"full_check": True,
"has_ab": True,
})
files = [
process_file(OUTPUT_DIR / "boot.img", "boot"),
process_file(OUTPUT_DIR / "system.img", "system", full_check=False),
]
for fw in ("xbl", "abl", "xbl_config", "devcfg", "aop"):
# firmware not built in this repo
files.append(process_file(FIRMWARE_DIR / f"{fw}.bin", fw))
configs = [
(AGNOS_UPDATE_URL, "ota.json"),