aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/image.mk1
-rwxr-xr-xscripts/json_add_image_info.py1
-rwxr-xr-xscripts/json_overview_image_info.py20
3 files changed, 20 insertions, 2 deletions
diff --git a/include/image.mk b/include/image.mk
index 984b64fb9c..300f7a6619 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -592,6 +592,7 @@ define Device/Build/image
DEVICE_ALT2_MODEL="$(DEVICE_ALT2_MODEL)" \
DEVICE_ALT2_VARIANT="$(DEVICE_ALT2_VARIANT)" \
DEVICE_TITLE="$(DEVICE_TITLE)" \
+ DEVICE_PACKAGES="$(DEVICE_PACKAGES)" \
TARGET="$(BOARD)" \
SUBTARGET="$(if $(SUBTARGET),$(SUBTARGET),generic)" \
VERSION_NUMBER="$(VERSION_NUMBER)" \
diff --git a/scripts/json_add_image_info.py b/scripts/json_add_image_info.py
index b6628113ac..768bb10254 100755
--- a/scripts/json_add_image_info.py
+++ b/scripts/json_add_image_info.py
@@ -54,6 +54,7 @@ image_info = {
"sha256": image_hash,
}
],
+ "device_packages": getenv("DEVICE_PACKAGES").split(),
"supported_devices": getenv("SUPPORTED_DEVICES").split(),
"titles": get_titles(),
}
diff --git a/scripts/json_overview_image_info.py b/scripts/json_overview_image_info.py
index a1418e366d..59d69df314 100755
--- a/scripts/json_overview_image_info.py
+++ b/scripts/json_overview_image_info.py
@@ -1,9 +1,10 @@
#!/usr/bin/env python3
-import json
+from os import getenv, environ
from pathlib import Path
-from os import getenv
+from subprocess import run
from sys import argv
+import json
if len(argv) != 2:
print("JSON info files script requires ouput file as argument")
@@ -31,6 +32,21 @@ for json_file in work_dir.glob("*.json"):
image_info["profiles"][device_id]["images"][0]
)
+
+output["default_packages"] = run(
+ [
+ "make",
+ "--no-print-directory",
+ "-C",
+ f"target/linux/{output['target'].split('/')[0]}",
+ "val.DEFAULT_PACKAGES",
+ ],
+ capture_output=True,
+ check=True,
+ env=environ.copy().update({"TOPDIR": Path().cwd()}),
+ text=True,
+).stdout.split()
+
if output:
output_path.write_text(json.dumps(output, sort_keys=True, separators=(",", ":")))
else: