build/json: add filesystem information
authorPaul Spooren <mail@aparcar.org>
Mon, 14 Dec 2020 00:36:17 +0000 (14:36 -1000)
committerPaul Spooren <mail@aparcar.org>
Thu, 17 Dec 2020 21:16:36 +0000 (11:16 -1000)
Some images are created using different filesystems, most popular
squashfs and ext4. To allow downstream projects to distinguesh between
those, add the `filesystem` information to created json files.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit bc0ffff36a0bd8043e958913f574cb8d2a79e93d)

include/image.mk
scripts/json_add_image_info.py

index a13f37f8863d754da6b510265691cc433582615b..ee9885c8f74e0b1596bf020f224107260eff03c4 100644 (file)
@@ -534,6 +534,7 @@ define Device/Build/image
        BIN_DIR="$(BIN_DIR)" \
        IMAGE_NAME="$(IMAGE_NAME)" \
        IMAGE_TYPE=$(word 1,$(subst ., ,$(2))) \
+       IMAGE_FILESYSTEM="$(1)" \
        IMAGE_PREFIX="$(IMAGE_PREFIX)" \
        DEVICE_TITLE="$(DEVICE_TITLE)" \
        DEVICE_PACKAGES="$(DEVICE_PACKAGES)" \
index d1599b514ac67db68fdd510074c509d6d0848e45..9a640ad468e8998b1815a4317c27e07fb9af21d9 100755 (executable)
@@ -37,6 +37,7 @@ image_info = {
             "images": [
                 {
                     "type": getenv("IMAGE_TYPE"),
+                    "filesystem": getenv("IMAGE_FILESYSTEM"),
                     "name": getenv("IMAGE_NAME"),
                     "sha256": image_hash,
                 }