lantiq: add basic support for AVM FRITZ!Box 3390
[openwrt/openwrt.git] / scripts / json_add_image_info.py
index 768bb102541ba3f4011c228c52b739709b950c11..38cd3c487d00a8809d0a7df4ecc4cbc12cfe52b8 100755 (executable)
@@ -12,7 +12,7 @@ if len(argv) != 2:
 
 json_path = Path(argv[1])
 bin_dir = Path(getenv("BIN_DIR"))
-image_file = bin_dir / getenv("IMAGE_NAME")
+image_file = bin_dir / getenv("DEVICE_IMG_NAME")
 
 if not image_file.is_file():
     print("Skip JSON creation for non existing image ", image_file)
@@ -44,13 +44,15 @@ image_info = {
     "target": "{}/{}".format(getenv("TARGET"), getenv("SUBTARGET")),
     "version_code": getenv("VERSION_CODE"),
     "version_number": getenv("VERSION_NUMBER"),
+    "source_date_epoch": getenv("SOURCE_DATE_EPOCH"),
     "profiles": {
         device_id: {
-            "image_prefix": getenv("IMAGE_PREFIX"),
+            "image_prefix": getenv("DEVICE_IMG_PREFIX"),
             "images": [
                 {
                     "type": getenv("IMAGE_TYPE"),
-                    "name": getenv("IMAGE_NAME"),
+                    "filesystem": getenv("IMAGE_FILESYSTEM"),
+                    "name": getenv("DEVICE_IMG_NAME"),
                     "sha256": image_hash,
                 }
             ],