We created a partition on the eMMC and verified its operation.
We created a new partition on eMMC using the DATA partition function defined below, and set up encryption.
- layers/meta-toradex-bsp-common/classes/image_type_tezi.bbclass
The DATA partition function was not working in “1. Investigation of the environment,” but now that we checked again with 6.7.0, it is working.
To enable the DATA partition function, the following settings were made in local.conf.
- Allocated a 512MB partition.
- Mounted to /data (actually, it will be an encrypted partition, so it will not be used)
INHERIT += “tdx-tezi-data-partition”
TDX_TEZI_DATA_PARTITION_MOUNTPOINT = “/data”
tezi_data_enabled = “1”
tezi_data_partition_size = “512”
In fact, the DATA partition and rootfs partition are set to be the same size in image_type_tezi.bbclass, so the following modification is made.
$ cd layers/meta-torizon-bsp-common
$ git diff classes/image_type_tezi.bbclass
diff --git a/classes/image_type_tezi.bbclass b/classes/image_type_tezi.bbclass
index fd53b3e..8f5f60b 100644
--- a/classes/image_type_tezi.bbclass
+++ b/classes/image_type_tezi.bbclass
@@ -286,7 +286,8 @@ def rootfs_tezi_emmc(d, use_bootfiles):
data = {
"partition_size_nominal": d.getVar('TEZI_DATA_PART_SIZE'),
"partition_type": d.getVar('TEZI_DATA_PART_TYPE'),
- "want_maximised": True,
+##### "want_maximised": True,
+ "want_maximised": False,
"content": {
"label": d.getVar('TEZI_DATA_LABEL'),
Since the DATA partition is created as /dev/mmcblk0p2, this partition was set to be the encrypted partition.
The following settings were made in local.conf.
- Set mmcblk0p2 as an encrypted partition
INHERIT += "tdx-encrypted"
TDX_ENC_STORAGE_LOCATION = "/dev/mmcblk0p2"
TDX_ENC_PRESERVE_DATA = "1"
The following situation was observed.
- The existing data is saved normally by specifying TDX_ENC_PRESERVE_DATA.
- When power is turned off, if shutdown is performed, the data corruption symptom does not occur.
If the power is suddenly turned off, all data will be erased with a high probability.
As a result, it is more stable than USB memory, but if the power is suddenly turned off, all data will be erased at a high frequency, just like USB memory.
Is there any other countermeasure against power off in a case where shutdown process cannot be executed, except for securing shutdown time with a capacitor, etc.?