From f87a7f718c4c751f707071b6c9786706b6d550b1 Mon Sep 17 00:00:00 2001 From: Andrei Gherzan <andrei.gherzan@huawei.com> Date: Wed, 9 Jun 2021 12:11:10 +0100 Subject: [PATCH] x-wic.inc: Avoid Y2038 problem At filesystem creation, mke2fs uses the filesystem size to calculate the inodes size. Some of our partitions are empty and they will end up small inode size. The tool will even throw a clear warning: The ext4 filesystem labeled 'x-dev-data' has no Y2038 support. Inodes (of size 128) are too small. As the warning reads, this value is affacted by the Y2038 problem. By using `--mkfs-extraopts "-T default"` we make sure that mke2fs doesn't autodetect inode size but instead it uses default values for tuning parameters - inode size is included. Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com> --- meta-ohos-core/conf/distro/include/x-wic.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meta-ohos-core/conf/distro/include/x-wic.inc b/meta-ohos-core/conf/distro/include/x-wic.inc index e29ef3da..81a46b01 100644 --- a/meta-ohos-core/conf/distro/include/x-wic.inc +++ b/meta-ohos-core/conf/distro/include/x-wic.inc @@ -16,8 +16,8 @@ DEVICEDATA_PARTITION_SIZE ?= "8M" SYSDATA_PARTITION_SIZE ?= "512M" APPDATA_PARTITION_SIZE ?= "1G" -WIC_ROOTA_PARTITION ?= "part / --source rootfs --use-uuid --fstype=ext4 --label x-sys-a --align 4096 --fixed-size ${ROOTA_PARTITION_SIZE} ${WIC_ROOTA_PARTITION_EXTRA_ARGS}" -WIC_ROOTB_PARTITION ?= "part --fstype=ext4 --label x-sys-b --align 4096 --fixed-size ${ROOTB_PARTITION_SIZE} ${WIC_ROOTB_PARTITION_EXTRA_ARGS}" -WIC_DEVICEDATA_PARTITION ?= "part --fstype=ext4 --label x-dev-data --align 4096 --fixed-size ${DEVICEDATA_PARTITION_SIZE} ${WIC_DEVICEDATA_PARTITION_EXTRA_ARGS}" -WIC_SYSDATA_PARTITION ?= "part --fstype=ext4 --label x-sys-data --align 4096 --fixed-size ${SYSDATA_PARTITION_SIZE} ${WIC_SYSDATA_PARTITION_EXTRA_ARGS}" -WIC_APPDATA_PARTITION ?= "part --fstype=ext4 --label x-app-data --align 4096 --fixed-size ${APPDATA_PARTITION_SIZE} ${WIC_APPDATA_PARTITION_EXTRA_ARGS}" +WIC_ROOTA_PARTITION ?= "part / --source rootfs --use-uuid --fstype=ext4 --label x-sys-a --mkfs-extraopts '-T default' --align 4096 --fixed-size ${ROOTA_PARTITION_SIZE} ${WIC_ROOTA_PARTITION_EXTRA_ARGS}" +WIC_ROOTB_PARTITION ?= "part --fstype=ext4 --label x-sys-b --mkfs-extraopts '-T default' --align 4096 --fixed-size ${ROOTB_PARTITION_SIZE} ${WIC_ROOTB_PARTITION_EXTRA_ARGS}" +WIC_DEVICEDATA_PARTITION ?= "part --fstype=ext4 --label x-dev-data --mkfs-extraopts '-T default' --align 4096 --fixed-size ${DEVICEDATA_PARTITION_SIZE} ${WIC_DEVICEDATA_PARTITION_EXTRA_ARGS}" +WIC_SYSDATA_PARTITION ?= "part --fstype=ext4 --label x-sys-data --mkfs-extraopts '-T default' --align 4096 --fixed-size ${SYSDATA_PARTITION_SIZE} ${WIC_SYSDATA_PARTITION_EXTRA_ARGS}" +WIC_APPDATA_PARTITION ?= "part --fstype=ext4 --label x-app-data --mkfs-extraopts '-T default' --align 4096 --fixed-size ${APPDATA_PARTITION_SIZE} ${WIC_APPDATA_PARTITION_EXTRA_ARGS}" -- GitLab