summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergio Prado <sergio.prado@e-labworks.com>2024-06-11 10:25:37 -0300
committerHiago De Franco <hiago.franco@toradex.com>2024-06-12 09:05:40 -0300
commitbbb39c255936a130c18d4eb9410b9558fe5a137b (patch)
treec378276bc351e9c3fd62bdebd145796b6cb96743
parentcc1fdcaf6fe8a657c3706b66faa827994ede416f (diff)
image_type_tezi.bbclass: support the creation of a data partitionkirkstone-6.x.y
If 'TEZI_DATA_ENABLED' is set to '1', then a data partition is created. Adittional variables can be used to configure the data partition: - TEZI_DATA_PART_SIZE: minimal size of the data partition - TEZI_DATA_PART_TYPE: type of the data partition - TEZI_DATA_LABEL: laber of the data partition - TEZI_DATA_FSTYPE: filesystem type to format the data partition - TEZI_DATA_FSOPTS: additional parameters to pass to the mkfs utility when formatting the data partition. Signed-off-by: Sergio Prado <sergio.prado@e-labworks.com>
-rw-r--r--classes/image_type_tezi.bbclass21
1 files changed, 21 insertions, 0 deletions
diff --git a/classes/image_type_tezi.bbclass b/classes/image_type_tezi.bbclass
index 1eacbf8..fd53b3e 100644
--- a/classes/image_type_tezi.bbclass
+++ b/classes/image_type_tezi.bbclass
@@ -33,6 +33,13 @@ TEZI_ROOT_SUFFIX ??= "tar.xz"
TEZI_ROOT_PART_TYPE ??= "83"
TEZI_ROOT_PART_SIZE ??= "512"
TEZI_ROOT_FILELIST ??= ""
+TEZI_DATA_ENABLED ??= "0"
+TEZI_DATA_PART_SIZE ??= "512"
+TEZI_DATA_PART_TYPE ??= "83"
+TEZI_DATA_LABEL ??= "DATA"
+TEZI_DATA_FSTYPE ??= "ext4"
+TEZI_DATA_FSOPTS ?= "-E nodiscard"
+TEZI_DATA_FILES ?= ""
TEZI_USE_BOOTFILES ??= "true"
TEZI_AUTO_INSTALL ??= "false"
TEZI_BOOT_SUFFIX ??= "${@'bootfs.tar.xz' if oe.types.boolean('${TEZI_USE_BOOTFILES}') else ''}"
@@ -275,6 +282,20 @@ def rootfs_tezi_emmc(d, use_bootfiles):
filesystem_partitions.append(rootfs)
+ if d.getVar('TEZI_DATA_ENABLED') == "1":
+ data = {
+ "partition_size_nominal": d.getVar('TEZI_DATA_PART_SIZE'),
+ "partition_type": d.getVar('TEZI_DATA_PART_TYPE'),
+ "want_maximised": True,
+ "content": {
+ "label": d.getVar('TEZI_DATA_LABEL'),
+ "filesystem_type": d.getVar('TEZI_DATA_FSTYPE'),
+ "mkfs_options": d.getVar('TEZI_DATA_FSOPTS'),
+ "filename": d.getVar('TEZI_DATA_FILES')
+ }
+ }
+ filesystem_partitions.append(data)
+
return [
OrderedDict({
"name": emmcdev,