With this commit the `profiles.json` contain both the target specific
`default_packages` as well as the device specific `device_packages` as a
array of strings.
This information is required for downstream projects like the various
web-based interactive firmware generators.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Paul Spooren <mail@aparcar.org>
DEVICE_ALT2_MODEL="$(DEVICE_ALT2_MODEL)" \
DEVICE_ALT2_VARIANT="$(DEVICE_ALT2_VARIANT)" \
DEVICE_TITLE="$(DEVICE_TITLE)" \
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)" \
TARGET="$(BOARD)" \
SUBTARGET="$(if $(SUBTARGET),$(SUBTARGET),generic)" \
VERSION_NUMBER="$(VERSION_NUMBER)" \
"sha256": image_hash,
}
],
"sha256": image_hash,
}
],
+ "device_packages": getenv("DEVICE_PACKAGES").split(),
"supported_devices": getenv("SUPPORTED_DEVICES").split(),
"titles": get_titles(),
}
"supported_devices": getenv("SUPPORTED_DEVICES").split(),
"titles": get_titles(),
}
+from os import getenv, environ
+from subprocess import run
if len(argv) != 2:
print("JSON info files script requires ouput file as argument")
if len(argv) != 2:
print("JSON info files script requires ouput file as argument")
image_info["profiles"][device_id]["images"][0]
)
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:
if output:
output_path.write_text(json.dumps(output, sort_keys=True, separators=(",", ":")))
else: