From 4ef95f0bd0f9ba2b80645f35f2e45fee925feae0 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Thu, 11 Oct 2018 12:52:26 +0200 Subject: image_type_tezi: allow custom rootfs image type and label Add variables to customize which rootfs image type we use in the Toradex Easy Installer image. Also allow custom root filesystem label. Signed-off-by: Stefan Agner --- classes/image_type_tezi.bbclass | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/classes/image_type_tezi.bbclass b/classes/image_type_tezi.bbclass index 455a1e4..68163c9 100644 --- a/classes/image_type_tezi.bbclass +++ b/classes/image_type_tezi.bbclass @@ -3,6 +3,8 @@ inherit image_types do_image_teziimg[depends] += "tezi-metadata:do_deploy virtual/bootloader:do_deploy" TEZI_ROOT_FSTYPE ??= "ext4" +TEZI_ROOT_LABEL ??= "RFS" +TEZI_ROOT_SUFFIX ??= "tar.xz" UBOOT_BINARY ??= "u-boot.${UBOOT_SUFFIX}" UBOOT_BINARY_TEZI = "${UBOOT_BINARY}" UBOOT_BINARY_TEZI_apalis-t30 = "apalis_t30.img" @@ -47,6 +49,7 @@ def rootfs_tezi_emmc(d): offset_spl = d.getVar('OFFSET_SPL_PAYLOAD', True) imagename = d.getVar('IMAGE_NAME', True) imagename_suffix = d.getVar('IMAGE_NAME_SUFFIX', True) + imagetype_suffix = d.getVar('TEZI_ROOT_SUFFIX', True) bootpart_rawfiles = [] @@ -82,10 +85,10 @@ def rootfs_tezi_emmc(d): "partition_size_nominal": 512, "want_maximised": True, "content": { - "label": "RFS", + "label": d.getVar('TEZI_ROOT_LABEL', True), "filesystem_type": d.getVar('TEZI_ROOT_FSTYPE', True), "mkfs_options": "-E nodiscard", - "filename": imagename + imagename_suffix + ".tar.xz", + "filename": imagename + imagename_suffix + "." + imagetype_suffix, "uncompressed_size": rootfs_get_size(d) / 1024 } } @@ -104,6 +107,7 @@ def rootfs_tezi_rawnand(d): from collections import OrderedDict imagename = d.getVar('IMAGE_NAME', True) imagename_suffix = d.getVar('IMAGE_NAME_SUFFIX', True) + imagetype_suffix = d.getVar('TEZI_ROOT_SUFFIX', True) # Use device tree mapping to create product id <-> device tree relationship dtmapping = d.getVarFlags('TORADEX_PRODUCT_IDS') @@ -161,7 +165,7 @@ def rootfs_tezi_rawnand(d): "name": "rootfs", "content": { "filesystem_type": "ubifs", - "filename": imagename + imagename_suffix + ".tar.xz", + "filename": imagename + imagename_suffix + "." + imagetype_suffix, "uncompressed_size": rootfs_get_size(d) / 1024 } } @@ -272,4 +276,4 @@ IMAGE_CMD_teziimg () { esac } -IMAGE_TYPEDEP_teziimg += "tar.xz" +IMAGE_TYPEDEP_teziimg += "${TEZI_ROOT_SUFFIX}" -- cgit v1.2.3