Skip to content
Snippets Groups Projects
Verified Commit 8c2b0f4d authored by Andrei Gherzan's avatar Andrei Gherzan :penguin:
Browse files

x-wic.inc: Use a copy of the rootfs in ROOTB

The root b partition was initially set up using the assumption that a
wic part configuration without fstype would leave the partition empty
(no filesystem). Checking a bit deeper the wic implementation, that
never worked as expected as the tool defaults to a vfat partition[1] (when
no fstype is provided). Also, squashfs doesn't support an empty
filesystem.

Given the above, we switch the second rootfs (B) to using the same
content as the default one (A). This has an added advantage that we can
test switching the root filesystem A-B without any additional
operations.

[1] https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/scripts/lib/wic/ksparser.py?h=dunfell#n158



Signed-off-by: Andrei Gherzan's avatarAndrei Gherzan <andrei.gherzan@huawei.com>
parent 90dde49e
No related branches found
No related tags found
No related merge requests found
...@@ -32,7 +32,9 @@ WIC_ROOTA_PARTITION ?= "part / --source rootfs --use-uuid --fstype=${ROOT_FSTYPE ...@@ -32,7 +32,9 @@ WIC_ROOTA_PARTITION ?= "part / --source rootfs --use-uuid --fstype=${ROOT_FSTYPE
${@bb.utils.contains('ROOT_FSTYPE', 'ext4', '--mkfs-extraopts \'-T default\'', '', d)} \ ${@bb.utils.contains('ROOT_FSTYPE', 'ext4', '--mkfs-extraopts \'-T default\'', '', d)} \
--align 4096 --fixed-size ${ROOTA_PARTITION_SIZE} \ --align 4096 --fixed-size ${ROOTA_PARTITION_SIZE} \
${WIC_ROOTA_PARTITION_EXTRA_ARGS}" ${WIC_ROOTA_PARTITION_EXTRA_ARGS}"
WIC_ROOTB_PARTITION ?= "part --align 4096 --fixed-size ${ROOTB_PARTITION_SIZE} \ WIC_ROOTB_PARTITION ?= "part / --source rootfs --use-uuid --fstype=${ROOT_FSTYPE} \
${@bb.utils.contains('ROOT_FSTYPE', 'ext4', '--mkfs-extraopts \'-T default\'', '', d)} \
--align 4096 --fixed-size ${ROOTB_PARTITION_SIZE} \
${WIC_ROOTB_PARTITION_EXTRA_ARGS}" ${WIC_ROOTB_PARTITION_EXTRA_ARGS}"
WIC_DEVDATA_PARTITION ?= "part --fstype=ext4 --label x-dev-data --mkfs-extraopts '-T default' --align 4096 --fixed-size ${DEVDATA_PARTITION_SIZE} ${WIC_DEVDATA_PARTITION_EXTRA_ARGS}" WIC_DEVDATA_PARTITION ?= "part --fstype=ext4 --label x-dev-data --mkfs-extraopts '-T default' --align 4096 --fixed-size ${DEVDATA_PARTITION_SIZE} ${WIC_DEVDATA_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_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}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment