diff mbox series

[isar-cip-core,v1] wic: Set fixed partition UUID values

Message ID 20240122121502.2605116-1-Adithya.Balakumar@toshiba-tsip.com (mailing list archive)
State Superseded
Headers show
Series [isar-cip-core,v1] wic: Set fixed partition UUID values | expand

Commit Message

Adithya Balakumar Jan. 22, 2024, 12:15 p.m. UTC
From: Adithya Balakumar <adithya.balakumar@toshiba-tsip.com>

This commit sets fixed partition uuid for partitions. The --uuid option
in wic allows to set fixed uuid for a partition. This is required for
generating reproducible images.

Signed-off-by: Adithya Balakumar <adithya.balakumar@toshiba-tsip.com>
---
 wic/bbb-efibootguard.wks.in                   | 4 ++--
 wic/bbb.wks                                   | 2 +-
 wic/ebg-signed-sysparts.inc                   | 6 +++---
 wic/ebg-sysparts.inc                          | 6 +++---
 wic/hihope-rzg2m-efibootguard.wks.in          | 4 ++--
 wic/hihope-rzg2m.wks                          | 4 ++--
 wic/iwg20m.wks                                | 4 ++--
 wic/qemu-amd64-efibootguard-secureboot.wks.in | 4 ++--
 wic/qemu-arm64-efibootguard-secureboot.wks.in | 4 ++--
 wic/qemu-arm64-efibootguard.wks.in            | 4 ++--
 wic/qemu-riscv64-efibootguard.wks.in          | 4 ++--
 wic/x86-efibootguard.wks.in                   | 4 ++--
 wic/x86_64-generic.wks                        | 4 ++--
 13 files changed, 27 insertions(+), 27 deletions(-)

Comments

MOESSBAUER, Felix Jan. 23, 2024, 9:32 a.m. UTC | #1
On Mon, 2024-01-22 at 17:45 +0530, Adithya Balakumar wrote:
> From: Adithya Balakumar <adithya.balakumar@toshiba-tsip.com>
> 
> This commit sets fixed partition uuid for partitions. The --uuid
> option
> in wic allows to set fixed uuid for a partition. This is required for
> generating reproducible images.

Thanks for this patch. Just a minor note:

Can we please use unique UUIDs across all devices (not always the
same). Also it would be nice to add a note somewhere that these UUIDs
should be changed in case the user creates an image for flashing and
one for the target (which is quite common). Here, the UUIDs would
collide.

Felix

> 
> Signed-off-by: Adithya Balakumar <adithya.balakumar@toshiba-tsip.com>
> ---
>  wic/bbb-efibootguard.wks.in                   | 4 ++--
>  wic/bbb.wks                                   | 2 +-
>  wic/ebg-signed-sysparts.inc                   | 6 +++---
>  wic/ebg-sysparts.inc                          | 6 +++---
>  wic/hihope-rzg2m-efibootguard.wks.in          | 4 ++--
>  wic/hihope-rzg2m.wks                          | 4 ++--
>  wic/iwg20m.wks                                | 4 ++--
>  wic/qemu-amd64-efibootguard-secureboot.wks.in | 4 ++--
>  wic/qemu-arm64-efibootguard-secureboot.wks.in | 4 ++--
>  wic/qemu-arm64-efibootguard.wks.in            | 4 ++--
>  wic/qemu-riscv64-efibootguard.wks.in          | 4 ++--
>  wic/x86-efibootguard.wks.in                   | 4 ++--
>  wic/x86_64-generic.wks                        | 4 ++--
>  13 files changed, 27 insertions(+), 27 deletions(-)
> 
> diff --git a/wic/bbb-efibootguard.wks.in b/wic/bbb-
> efibootguard.wks.in
> index 48789c7..123f86b 100644
> --- a/wic/bbb-efibootguard.wks.in
> +++ b/wic/bbb-efibootguard.wks.in
> @@ -15,7 +15,7 @@ part --source rawcopy --sourceparams
> "file=${IMAGE_FULLNAME}.squashfs" --align 1
>  part --source empty --align 1024 --fixed-size 1G --uuid
> "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-
> 3D69D8477DE4
>  
>  # home and var are extra partitions
> -part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-
> 40d8-11ee-be56-0242ac120002
> -part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-
> 4258-11ee-be56-0242ac120002
> +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-
> 40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-
> 0242ac120002
> +part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-
> 4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-
> 0242ac120002
>  
>  bootloader --ptable gpt --append="rootwait console=ttyO0,115200
> omap_wdt.early_enable=1 omap_wdt.nowayout=1
> watchdog.handle_boot_enabled=0"
> diff --git a/wic/bbb.wks b/wic/bbb.wks
> index a797e95..03939b4 100644
> --- a/wic/bbb.wks
> +++ b/wic/bbb.wks
> @@ -9,6 +9,6 @@
>  part --source rawcopy --sourceparams "file=/usr/lib/u-boot/bbb/MLO"
> --no-table --align 128
>  part --source rawcopy --sourceparams "file=/usr/lib/u-boot/bbb/u-
> boot.img" --no-table --align 384
>  
> -part / --source rootfs-u-boot --ondisk mmcblk0 --fstype ext4 --mkfs-
> extraopts "-T default" --label platform --align 1024 --active --
> fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
> +part / --source rootfs-u-boot --ondisk mmcblk0 --fstype ext4 --mkfs-
> extraopts "-T default" --label platform --align 1024 --active --
> fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-
> 11ee-be56-0242ac120002
>  
>  bootloader --append "rootwait console=ttyO0,115200"
> diff --git a/wic/ebg-signed-sysparts.inc b/wic/ebg-signed-
> sysparts.inc
> index b2340e2..0c339fc 100644
> --- a/wic/ebg-signed-sysparts.inc
> +++ b/wic/ebg-signed-sysparts.inc
> @@ -1,8 +1,8 @@
>  # default partition layout EFI Boot Guard usage, signed version
>  
>  # EFI partition containing efibootguard bootloader binary
> -part --source efibootguard-efi  --size 16M --extra-space 0 --
> overhead-factor 1 --label efi   --align 1024 --part-type=EF00 --
> active --sourceparams "signwith=/usr/bin/sign_secure_image.sh" --
> fsuuid 0x4321dcba
> +part --source efibootguard-efi  --size 16M --extra-space 0 --
> overhead-factor 1 --label efi   --align 1024 --part-type=EF00 --
> active --sourceparams "signwith=/usr/bin/sign_secure_image.sh" --
> fsuuid 0x4321dcba --uuid 0x5678dcba
>  
>  # EFI Boot Guard environment/config partitions plus Kernel files
> -part --source efibootguard-boot --size 32M --extra-space 0 --
> overhead-factor 1 --label BOOT0 --align 1024 --part-type=0700 --
> sourceparams "revision=2,signwith=/usr/bin/sign_secure_image.sh" --
> fsuuid 0x4321dcbb
> -part --source efibootguard-boot --size 32M --extra-space 0 --
> overhead-factor 1 --label BOOT1 --align 1024 --part-type=0700 --
> sourceparams "revision=1,signwith=/usr/bin/sign_secure_image.sh" --
> fsuuid 0x4321dcbc
> +part --source efibootguard-boot --size 32M --extra-space 0 --
> overhead-factor 1 --label BOOT0 --align 1024 --part-type=0700 --
> sourceparams "revision=2,signwith=/usr/bin/sign_secure_image.sh" --
> fsuuid 0x4321dcbb --uuid 0x5678dcbb
> +part --source efibootguard-boot --size 32M --extra-space 0 --
> overhead-factor 1 --label BOOT1 --align 1024 --part-type=0700 --
> sourceparams "revision=1,signwith=/usr/bin/sign_secure_image.sh" --
> fsuuid 0x4321dcbc --uuid 0x5678dcbc
> diff --git a/wic/ebg-sysparts.inc b/wic/ebg-sysparts.inc
> index 300c36f..beb0903 100644
> --- a/wic/ebg-sysparts.inc
> +++ b/wic/ebg-sysparts.inc
> @@ -1,8 +1,8 @@
>  # default partition layout EFI Boot Guard usage
>  
>  # EFI partition containing efibootguard bootloader binary
> -part --source efibootguard-efi  --size 16M --extra-space 0 --
> overhead-factor 1 --label efi   --align 1024 --part-type=EF00 --
> active --fsuuid 0x4321dcba
> +part --source efibootguard-efi  --size 16M --extra-space 0 --
> overhead-factor 1 --label efi   --align 1024 --part-type=EF00 --
> active --fsuuid 0x4321dcba --uuid 0x5678dcba
>  
>  # EFI Boot Guard environment/config partitions plus Kernel files
> -part --source efibootguard-boot --size 32M --extra-space 0 --
> overhead-factor 1 --label BOOT0 --align 1024 --part-type=0700 --
> sourceparams "revision=2" --fsuuid 0x4321dcbb
> -part --source efibootguard-boot --size 32M --extra-space 0 --
> overhead-factor 1 --label BOOT1 --align 1024 --part-type=0700 --
> sourceparams "revision=1" --fsuuid 0x4321dcbc
> +part --source efibootguard-boot --size 32M --extra-space 0 --
> overhead-factor 1 --label BOOT0 --align 1024 --part-type=0700 --
> sourceparams "revision=2" --fsuuid 0x4321dcbb --uuid 0x5678dcbb
> +part --source efibootguard-boot --size 32M --extra-space 0 --
> overhead-factor 1 --label BOOT1 --align 1024 --part-type=0700 --
> sourceparams "revision=1" --fsuuid 0x4321dcbc --uuid 0x5678dcbc
> diff --git a/wic/hihope-rzg2m-efibootguard.wks.in b/wic/hihope-rzg2m-
> efibootguard.wks.in
> index 2ac8850..38581dd 100644
> --- a/wic/hihope-rzg2m-efibootguard.wks.in
> +++ b/wic/hihope-rzg2m-efibootguard.wks.in
> @@ -8,7 +8,7 @@ part --source empty --align 1024 --fixed-size 1G --
> uuid "${ABROOTFS_PART_UUID_B}
>  
>  # home and var are extra partitions
>  
> -part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> fstype=ext4 --label home --align 1024  --size 1G --extra-space=100M -
> -fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
> -part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> fstype=ext4 --label var --align 1024  --size 2G --extra-space=100M --
> fsuuid 96be3374-4258-11ee-be56-0242ac120002
> +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> fstype=ext4 --label home --align 1024  --size 1G --extra-space=100M -
> -fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-
> 11ee-be56-0242ac120002
> +part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> fstype=ext4 --label var --align 1024  --size 2G --extra-space=100M --
> fsuuid 96be3374-4258-11ee-be56-0242ac120002 --uuid 12343374-4258-
> 11ee-be56-0242ac120002
>  
>  bootloader --ptable gpt --append="console=tty0 console=ttySC0,115200
> rootwait earlyprintk"
> diff --git a/wic/hihope-rzg2m.wks b/wic/hihope-rzg2m.wks
> index fd3a338..1bb8ced 100644
> --- a/wic/hihope-rzg2m.wks
> +++ b/wic/hihope-rzg2m.wks
> @@ -9,7 +9,7 @@
>  # SPDX-License-Identifier: MIT
>  #
>  
> -part /boot --source bootimg-partition --ondisk mmcblk0 --fstype vfat
> --label boot --align 1 --size 32M --extra-space 0 --fsuuid 0x4321dcba
> +part /boot --source bootimg-partition --ondisk mmcblk0 --fstype vfat
> --label boot --align 1 --size 32M --extra-space 0 --fsuuid 0x4321dcba
> --uuid 0x5678dcba
>  
>  # Rootfs partition
> -part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label root -
> -align 1024 --size 2G --active --fsuuid 1f55d66a-40d8-11ee-be56-
> 0242ac120002
> +part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label root -
> -align 1024 --size 2G --active --fsuuid 1f55d66a-40d8-11ee-be56-
> 0242ac120002 --uuid abcdd66a-40d8-11ee-be56-0242ac120002
> diff --git a/wic/iwg20m.wks b/wic/iwg20m.wks
> index 85765f0..feea21e 100644
> --- a/wic/iwg20m.wks
> +++ b/wic/iwg20m.wks
> @@ -12,7 +12,7 @@
>  # [Note] u-boot runs from an SPI memory device
>  
>  # SDCard Boot partition (copies files in IMAGE_BOOT_FILES: zImage
> and device tree)
> -part /boot --source bootimg-partition --ondisk mmcblk0 --fstype vfat
> --label boot --align 1 --size 32M --extra-space 0 --fsuuid 0x4321dcba
> +part /boot --source bootimg-partition --ondisk mmcblk0 --fstype vfat
> --label boot --align 1 --size 32M --extra-space 0 --fsuuid 0x4321dcba
> --uuid 0x5678dcba
>  
>  # Rootfs partition
> -part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label root -
> -align 1024 --size 2G --active --fsuuid 1f55d66a-40d8-11ee-be56-
> 0242ac120002
> +part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label root -
> -align 1024 --size 2G --active --fsuuid 1f55d66a-40d8-11ee-be56-
> 0242ac120002 --uuid abcdd66a-40d8-11ee-be56-0242ac120002
> diff --git a/wic/qemu-amd64-efibootguard-secureboot.wks.in
> b/wic/qemu-amd64-efibootguard-secureboot.wks.in
> index 2e5cb39..03c715b 100644
> --- a/wic/qemu-amd64-efibootguard-secureboot.wks.in
> +++ b/wic/qemu-amd64-efibootguard-secureboot.wks.in
> @@ -4,7 +4,7 @@ part --source rawcopy --sourceparams
> "file=${IMAGE_FULLNAME}.verity" --align 102
>  part --source empty --align 1024 --fixed-size 1G --uuid
> "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-
> 3D69D8477DE4
>  
>  # home and var are extra partitions
> -part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> fstype=ext4 --label home --align 1024 --size 1G --fsuuid 1f55d66a-
> 40d8-11ee-be56-0242ac120002
> -part /var  --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var  --
> fstype=ext4 --label var  --align 1024 --size 2G --fsuuid 96be3374-
> 4258-11ee-be56-0242ac120002
> +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> fstype=ext4 --label home --align 1024 --size 1G --fsuuid 1f55d66a-
> 40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-
> 0242ac120002
> +part /var  --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var  --
> fstype=ext4 --label var  --align 1024 --size 2G --fsuuid 96be3374-
> 4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-
> 0242ac120002
>  
>  bootloader --ptable gpt --append="console=tty0 console=ttyS0,115200
> rootwait earlyprintk watchdog.handle_boot_enabled=0
> iTCO_wdt.nowayout=1 panic=5"
> diff --git a/wic/qemu-arm64-efibootguard-secureboot.wks.in
> b/wic/qemu-arm64-efibootguard-secureboot.wks.in
> index 2fc389c..ede1fd5 100644
> --- a/wic/qemu-arm64-efibootguard-secureboot.wks.in
> +++ b/wic/qemu-arm64-efibootguard-secureboot.wks.in
> @@ -4,7 +4,7 @@ part --source rawcopy --sourceparams
> "file=${IMAGE_FULLNAME}.verity" --align 102
>  part --source empty --align 1024 --fixed-size 1G --uuid
> "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-
> 3D69D8477DE4
>  
>  # home and var are extra partitions
> -part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> fstype=ext4 --label home --align 1024 --size 1G --fsuuid 1f55d66a-
> 40d8-11ee-be56-0242ac120002
> -part /var  --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var  --
> fstype=ext4 --label var  --align 1024 --size 2G --fsuuid 96be3374-
> 4258-11ee-be56-0242ac120002
> +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> fstype=ext4 --label home --align 1024 --size 1G --fsuuid 1f55d66a-
> 40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-
> 0242ac120002
> +part /var  --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var  --
> fstype=ext4 --label var  --align 1024 --size 2G --fsuuid 96be3374-
> 4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-
> 0242ac120002
>  
>  bootloader --ptable gpt --append="panic=5"
> diff --git a/wic/qemu-arm64-efibootguard.wks.in b/wic/qemu-arm64-
> efibootguard.wks.in
> index 1f50ba3..bf58e1c 100644
> --- a/wic/qemu-arm64-efibootguard.wks.in
> +++ b/wic/qemu-arm64-efibootguard.wks.in
> @@ -7,7 +7,7 @@ part --source rawcopy --sourceparams
> "file=${IMAGE_FULLNAME}.squashfs" --align 1
>  part --source empty --align 1024 --fixed-size 1G --uuid
> "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-
> 3D69D8477DE4
>  
>  # home and var are extra partitions
> -part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-
> 40d8-11ee-be56-0242ac120002
> -part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-
> 4258-11ee-be56-0242ac120002
> +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-
> 40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-
> 0242ac120002
> +part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-
> 4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-
> 0242ac120002
>  
>  bootloader --ptable gpt
> diff --git a/wic/qemu-riscv64-efibootguard.wks.in b/wic/qemu-riscv64-
> efibootguard.wks.in
> index 9158aa4..b37c971 100644
> --- a/wic/qemu-riscv64-efibootguard.wks.in
> +++ b/wic/qemu-riscv64-efibootguard.wks.in
> @@ -7,7 +7,7 @@ part --source rawcopy --sourceparams
> "file=${IMAGE_FULLNAME}.squashfs" --align 1
>  part --source empty --align 1024 --fixed-size 1G --uuid
> "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-
> 3D69D8477DE4
>  
>  # home and var are extra partitions
> -part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-
> 40d8-11ee-be56-0242ac120002
> -part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-
> 4258-11ee-be56-0242ac120002
> +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-
> 40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-
> 0242ac120002
> +part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-
> 4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-
> 0242ac120002
>  
>  bootloader --ptable gpt
> diff --git a/wic/x86-efibootguard.wks.in b/wic/x86-
> efibootguard.wks.in
> index 98e8da5..b002ea5 100644
> --- a/wic/x86-efibootguard.wks.in
> +++ b/wic/x86-efibootguard.wks.in
> @@ -8,7 +8,7 @@ part --source empty --align 1024 --fixed-size 1G --
> uuid "${ABROOTFS_PART_UUID_B}
>  
>  # home and var are extra partitions
>  
> -part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> fstype=ext4 --label home --align 1024  --size 1G --extra-space=100M -
> -fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
> -part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> fstype=ext4 --label var --align 1024  --size 2G --extra-space=100M --
> fsuuid 96be3374-4258-11ee-be56-0242ac120002
> +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> fstype=ext4 --label home --align 1024  --size 1G --extra-space=100M -
> -fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-
> 11ee-be56-0242ac120002
> +part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> fstype=ext4 --label var --align 1024  --size 2G --extra-space=100M --
> fsuuid 96be3374-4258-11ee-be56-0242ac120002 --uuid 12343374-4258-
> 11ee-be56-0242ac120002
>  
>  bootloader --ptable gpt --append="console=tty0 console=ttyS0,115200
> rootwait earlyprintk watchdog.handle_boot_enabled=0
> iTCO_wdt.nowayout=1 "
> diff --git a/wic/x86_64-generic.wks b/wic/x86_64-generic.wks
> index 1a44e26..a63f7f3 100644
> --- a/wic/x86_64-generic.wks
> +++ b/wic/x86_64-generic.wks
> @@ -6,8 +6,8 @@
>  # SPDX-License-Identifier: MIT
>  #
>  
> -part /boot --source bootimg-efi-isar --sourceparams "loader=grub-
> efi" --label efi --part-type EF00 --align 1024 --fsuuid 0x4321dcba
> +part /boot --source bootimg-efi-isar --sourceparams "loader=grub-
> efi" --label efi --part-type EF00 --align 1024 --fsuuid 0x4321dcba --
> uuid 0x5678dcba
>  
> -part / --source rootfs --fstype ext4 --mkfs-extraopts "-T default" -
> -label platform --align 1024 --fsuuid 1f55d66a-40d8-11ee-be56-
> 0242ac120002
> +part / --source rootfs --fstype ext4 --mkfs-extraopts "-T default" -
> -label platform --align 1024 --fsuuid 1f55d66a-40d8-11ee-be56-
> 0242ac120002 --uuid abcdd66a-40d8-11ee-be56-0242ac120002
>  
>  bootloader --ptable gpt --timeout 2 --append "console=ttyS0,115200"
Adithya Balakumar Jan. 24, 2024, 6:03 a.m. UTC | #2
Hi Felix,

Thanks for your comment. Will send out a v2 of the patch. I would like to ask a small clarification about your comments? 

As for the part "Can we please use unique UUIDs across all devices (not always the same).", I understand this. Will set unique UUIDs across all devices.

However, could you please elaborate on the second part of your comment: 
"Also it would be nice to add a note somewhere that these UUIDs should be changed in case the user creates an image for flashing and one for the target (which is quite common). Here, the UUIDs would collide."

Thanks and Regards,
Adithya Balakumar

-----Original Message-----
From: MOESSBAUER, Felix <felix.moessbauer@siemens.com> 
Sent: Tuesday, January 23, 2024 3:02 PM
To: cip-dev@lists.cip-project.org; balakumar adithya(TSIP TEUR) <Adithya.Balakumar@toshiba-tsip.com>; Kiszka, Jan <jan.kiszka@siemens.com>
Cc: kunijadar shivanand(TSIP TMIEC ODG Porting) <Shivanand.Kunijadar@toshiba-tsip.com>; ashrith sai(TSIP) <Sai.Sathujoda@toshiba-tsip.com>; dinesh kumar(TSIP TMIEC ODG Porting) <dinesh.kumar@toshiba-tsip.com>; hayashi kazuhiro(林 和宏 DME ○DIG□MPS○MP4) <kazuhiro3.hayashi@toshiba.co.jp>
Subject: Re: [isar-cip-core][PATCH v1] wic: Set fixed partition UUID values

On Mon, 2024-01-22 at 17:45 +0530, Adithya Balakumar wrote:
> From: Adithya Balakumar <adithya.balakumar@toshiba-tsip.com>
> 
> This commit sets fixed partition uuid for partitions. The --uuid 
> option in wic allows to set fixed uuid for a partition. This is 
> required for generating reproducible images.

Thanks for this patch. Just a minor note:

Can we please use unique UUIDs across all devices (not always the same). Also it would be nice to add a note somewhere that these UUIDs should be changed in case the user creates an image for flashing and one for the target (which is quite common). Here, the UUIDs would collide.

Felix

> 
> Signed-off-by: Adithya Balakumar <adithya.balakumar@toshiba-tsip.com>
> ---
>  wic/bbb-efibootguard.wks.in                   | 4 ++--
>  wic/bbb.wks                                   | 2 +-
>  wic/ebg-signed-sysparts.inc                   | 6 +++---
>  wic/ebg-sysparts.inc                          | 6 +++---
>  wic/hihope-rzg2m-efibootguard.wks.in          | 4 ++--
>  wic/hihope-rzg2m.wks                          | 4 ++--
>  wic/iwg20m.wks                                | 4 ++--
>  wic/qemu-amd64-efibootguard-secureboot.wks.in | 4 ++--
>  wic/qemu-arm64-efibootguard-secureboot.wks.in | 4 ++--
>  wic/qemu-arm64-efibootguard.wks.in            | 4 ++--
>  wic/qemu-riscv64-efibootguard.wks.in          | 4 ++--
>  wic/x86-efibootguard.wks.in                   | 4 ++--
>  wic/x86_64-generic.wks                        | 4 ++--
>  13 files changed, 27 insertions(+), 27 deletions(-)
> 
> diff --git a/wic/bbb-efibootguard.wks.in b/wic/bbb- 
> efibootguard.wks.in index 48789c7..123f86b 100644
> --- a/wic/bbb-efibootguard.wks.in
> +++ b/wic/bbb-efibootguard.wks.in
> @@ -15,7 +15,7 @@ part --source rawcopy --sourceparams 
> "file=${IMAGE_FULLNAME}.squashfs" --align 1
>  part --source empty --align 1024 --fixed-size 1G --uuid 
> "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-
> 3D69D8477DE4
>  
>  # home and var are extra partitions
> -part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-
> 40d8-11ee-be56-0242ac120002
> -part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-
> 4258-11ee-be56-0242ac120002
> +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-
> 40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-
> 0242ac120002
> +part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-
> 4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-
> 0242ac120002
>  
>  bootloader --ptable gpt --append="rootwait console=ttyO0,115200
> omap_wdt.early_enable=1 omap_wdt.nowayout=1 
> watchdog.handle_boot_enabled=0"
> diff --git a/wic/bbb.wks b/wic/bbb.wks index a797e95..03939b4 100644
> --- a/wic/bbb.wks
> +++ b/wic/bbb.wks
> @@ -9,6 +9,6 @@
>  part --source rawcopy --sourceparams "file=/usr/lib/u-boot/bbb/MLO"
> --no-table --align 128
>  part --source rawcopy --sourceparams "file=/usr/lib/u-boot/bbb/u- 
> boot.img" --no-table --align 384
>  
> -part / --source rootfs-u-boot --ondisk mmcblk0 --fstype ext4 --mkfs- 
> extraopts "-T default" --label platform --align 1024 --active -- 
> fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
> +part / --source rootfs-u-boot --ondisk mmcblk0 --fstype ext4 --mkfs-
> extraopts "-T default" --label platform --align 1024 --active -- 
> fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-
> 11ee-be56-0242ac120002
>  
>  bootloader --append "rootwait console=ttyO0,115200"
> diff --git a/wic/ebg-signed-sysparts.inc b/wic/ebg-signed- 
> sysparts.inc index b2340e2..0c339fc 100644
> --- a/wic/ebg-signed-sysparts.inc
> +++ b/wic/ebg-signed-sysparts.inc
> @@ -1,8 +1,8 @@
>  # default partition layout EFI Boot Guard usage, signed version
>  
>  # EFI partition containing efibootguard bootloader binary -part 
> --source efibootguard-efi  --size 16M --extra-space 0 -- 
> overhead-factor 1 --label efi   --align 1024 --part-type=EF00 -- 
> active --sourceparams "signwith=/usr/bin/sign_secure_image.sh" -- 
> fsuuid 0x4321dcba
> +part --source efibootguard-efi  --size 16M --extra-space 0 --
> overhead-factor 1 --label efi   --align 1024 --part-type=EF00 -- 
> active --sourceparams "signwith=/usr/bin/sign_secure_image.sh" -- 
> fsuuid 0x4321dcba --uuid 0x5678dcba
>  
>  # EFI Boot Guard environment/config partitions plus Kernel files 
> -part --source efibootguard-boot --size 32M --extra-space 0 -- 
> overhead-factor 1 --label BOOT0 --align 1024 --part-type=0700 -- 
> sourceparams "revision=2,signwith=/usr/bin/sign_secure_image.sh" -- 
> fsuuid 0x4321dcbb -part --source efibootguard-boot --size 32M 
> --extra-space 0 -- overhead-factor 1 --label BOOT1 --align 1024 
> --part-type=0700 -- sourceparams 
> "revision=1,signwith=/usr/bin/sign_secure_image.sh" -- fsuuid 
> 0x4321dcbc
> +part --source efibootguard-boot --size 32M --extra-space 0 --
> overhead-factor 1 --label BOOT0 --align 1024 --part-type=0700 -- 
> sourceparams "revision=2,signwith=/usr/bin/sign_secure_image.sh" -- 
> fsuuid 0x4321dcbb --uuid 0x5678dcbb
> +part --source efibootguard-boot --size 32M --extra-space 0 --
> overhead-factor 1 --label BOOT1 --align 1024 --part-type=0700 -- 
> sourceparams "revision=1,signwith=/usr/bin/sign_secure_image.sh" -- 
> fsuuid 0x4321dcbc --uuid 0x5678dcbc diff --git a/wic/ebg-sysparts.inc 
> b/wic/ebg-sysparts.inc index 300c36f..beb0903 100644
> --- a/wic/ebg-sysparts.inc
> +++ b/wic/ebg-sysparts.inc
> @@ -1,8 +1,8 @@
>  # default partition layout EFI Boot Guard usage
>  
>  # EFI partition containing efibootguard bootloader binary -part 
> --source efibootguard-efi  --size 16M --extra-space 0 -- 
> overhead-factor 1 --label efi   --align 1024 --part-type=EF00 -- 
> active --fsuuid 0x4321dcba
> +part --source efibootguard-efi  --size 16M --extra-space 0 --
> overhead-factor 1 --label efi   --align 1024 --part-type=EF00 -- 
> active --fsuuid 0x4321dcba --uuid 0x5678dcba
>  
>  # EFI Boot Guard environment/config partitions plus Kernel files 
> -part --source efibootguard-boot --size 32M --extra-space 0 -- 
> overhead-factor 1 --label BOOT0 --align 1024 --part-type=0700 -- 
> sourceparams "revision=2" --fsuuid 0x4321dcbb -part --source 
> efibootguard-boot --size 32M --extra-space 0 -- overhead-factor 1 
> --label BOOT1 --align 1024 --part-type=0700 -- sourceparams 
> "revision=1" --fsuuid 0x4321dcbc
> +part --source efibootguard-boot --size 32M --extra-space 0 --
> overhead-factor 1 --label BOOT0 --align 1024 --part-type=0700 -- 
> sourceparams "revision=2" --fsuuid 0x4321dcbb --uuid 0x5678dcbb
> +part --source efibootguard-boot --size 32M --extra-space 0 --
> overhead-factor 1 --label BOOT1 --align 1024 --part-type=0700 -- 
> sourceparams "revision=1" --fsuuid 0x4321dcbc --uuid 0x5678dcbc diff 
> --git a/wic/hihope-rzg2m-efibootguard.wks.in b/wic/hihope-rzg2m- 
> efibootguard.wks.in index 2ac8850..38581dd 100644
> --- a/wic/hihope-rzg2m-efibootguard.wks.in
> +++ b/wic/hihope-rzg2m-efibootguard.wks.in
> @@ -8,7 +8,7 @@ part --source empty --align 1024 --fixed-size 1G -- 
> uuid "${ABROOTFS_PART_UUID_B}
>  
>  # home and var are extra partitions
>  
> -part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> fstype=ext4 --label home --align 1024  --size 1G --extra-space=100M - 
> -fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
> -part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> fstype=ext4 --label var --align 1024  --size 2G --extra-space=100M -- 
> fsuuid 96be3374-4258-11ee-be56-0242ac120002
> +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> fstype=ext4 --label home --align 1024  --size 1G --extra-space=100M - 
> -fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-
> 11ee-be56-0242ac120002
> +part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> fstype=ext4 --label var --align 1024  --size 2G --extra-space=100M -- 
> fsuuid 96be3374-4258-11ee-be56-0242ac120002 --uuid 12343374-4258-
> 11ee-be56-0242ac120002
>  
>  bootloader --ptable gpt --append="console=tty0 console=ttySC0,115200 
> rootwait earlyprintk"
> diff --git a/wic/hihope-rzg2m.wks b/wic/hihope-rzg2m.wks index 
> fd3a338..1bb8ced 100644
> --- a/wic/hihope-rzg2m.wks
> +++ b/wic/hihope-rzg2m.wks
> @@ -9,7 +9,7 @@
>  # SPDX-License-Identifier: MIT
>  #
>  
> -part /boot --source bootimg-partition --ondisk mmcblk0 --fstype vfat 
> --label boot --align 1 --size 32M --extra-space 0 --fsuuid 0x4321dcba
> +part /boot --source bootimg-partition --ondisk mmcblk0 --fstype vfat
> --label boot --align 1 --size 32M --extra-space 0 --fsuuid 0x4321dcba 
> --uuid 0x5678dcba
>  
>  # Rootfs partition
> -part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label root - 
> -align 1024 --size 2G --active --fsuuid 1f55d66a-40d8-11ee-be56-
> 0242ac120002
> +part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label root -
> -align 1024 --size 2G --active --fsuuid 1f55d66a-40d8-11ee-be56-
> 0242ac120002 --uuid abcdd66a-40d8-11ee-be56-0242ac120002
> diff --git a/wic/iwg20m.wks b/wic/iwg20m.wks index 85765f0..feea21e 
> 100644
> --- a/wic/iwg20m.wks
> +++ b/wic/iwg20m.wks
> @@ -12,7 +12,7 @@
>  # [Note] u-boot runs from an SPI memory device
>  
>  # SDCard Boot partition (copies files in IMAGE_BOOT_FILES: zImage and 
> device tree) -part /boot --source bootimg-partition --ondisk mmcblk0 
> --fstype vfat --label boot --align 1 --size 32M --extra-space 0 
> --fsuuid 0x4321dcba
> +part /boot --source bootimg-partition --ondisk mmcblk0 --fstype vfat
> --label boot --align 1 --size 32M --extra-space 0 --fsuuid 0x4321dcba 
> --uuid 0x5678dcba
>  
>  # Rootfs partition
> -part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label root - 
> -align 1024 --size 2G --active --fsuuid 1f55d66a-40d8-11ee-be56-
> 0242ac120002
> +part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label root -
> -align 1024 --size 2G --active --fsuuid 1f55d66a-40d8-11ee-be56-
> 0242ac120002 --uuid abcdd66a-40d8-11ee-be56-0242ac120002
> diff --git a/wic/qemu-amd64-efibootguard-secureboot.wks.in
> b/wic/qemu-amd64-efibootguard-secureboot.wks.in
> index 2e5cb39..03c715b 100644
> --- a/wic/qemu-amd64-efibootguard-secureboot.wks.in
> +++ b/wic/qemu-amd64-efibootguard-secureboot.wks.in
> @@ -4,7 +4,7 @@ part --source rawcopy --sourceparams 
> "file=${IMAGE_FULLNAME}.verity" --align 102
>  part --source empty --align 1024 --fixed-size 1G --uuid 
> "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-
> 3D69D8477DE4
>  
>  # home and var are extra partitions
> -part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> fstype=ext4 --label home --align 1024 --size 1G --fsuuid 1f55d66a-
> 40d8-11ee-be56-0242ac120002
> -part /var  --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var  --
> fstype=ext4 --label var  --align 1024 --size 2G --fsuuid 96be3374-
> 4258-11ee-be56-0242ac120002
> +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> fstype=ext4 --label home --align 1024 --size 1G --fsuuid 1f55d66a-
> 40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-
> 0242ac120002
> +part /var  --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var  --
> fstype=ext4 --label var  --align 1024 --size 2G --fsuuid 96be3374-
> 4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-
> 0242ac120002
>  
>  bootloader --ptable gpt --append="console=tty0 console=ttyS0,115200 
> rootwait earlyprintk watchdog.handle_boot_enabled=0
> iTCO_wdt.nowayout=1 panic=5"
> diff --git a/wic/qemu-arm64-efibootguard-secureboot.wks.in
> b/wic/qemu-arm64-efibootguard-secureboot.wks.in
> index 2fc389c..ede1fd5 100644
> --- a/wic/qemu-arm64-efibootguard-secureboot.wks.in
> +++ b/wic/qemu-arm64-efibootguard-secureboot.wks.in
> @@ -4,7 +4,7 @@ part --source rawcopy --sourceparams 
> "file=${IMAGE_FULLNAME}.verity" --align 102
>  part --source empty --align 1024 --fixed-size 1G --uuid 
> "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-
> 3D69D8477DE4
>  
>  # home and var are extra partitions
> -part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> fstype=ext4 --label home --align 1024 --size 1G --fsuuid 1f55d66a-
> 40d8-11ee-be56-0242ac120002
> -part /var  --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var  --
> fstype=ext4 --label var  --align 1024 --size 2G --fsuuid 96be3374-
> 4258-11ee-be56-0242ac120002
> +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> fstype=ext4 --label home --align 1024 --size 1G --fsuuid 1f55d66a-
> 40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-
> 0242ac120002
> +part /var  --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var  --
> fstype=ext4 --label var  --align 1024 --size 2G --fsuuid 96be3374-
> 4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-
> 0242ac120002
>  
>  bootloader --ptable gpt --append="panic=5"
> diff --git a/wic/qemu-arm64-efibootguard.wks.in b/wic/qemu-arm64- 
> efibootguard.wks.in index 1f50ba3..bf58e1c 100644
> --- a/wic/qemu-arm64-efibootguard.wks.in
> +++ b/wic/qemu-arm64-efibootguard.wks.in
> @@ -7,7 +7,7 @@ part --source rawcopy --sourceparams 
> "file=${IMAGE_FULLNAME}.squashfs" --align 1
>  part --source empty --align 1024 --fixed-size 1G --uuid 
> "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-
> 3D69D8477DE4
>  
>  # home and var are extra partitions
> -part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-
> 40d8-11ee-be56-0242ac120002
> -part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-
> 4258-11ee-be56-0242ac120002
> +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-
> 40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-
> 0242ac120002
> +part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-
> 4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-
> 0242ac120002
>  
>  bootloader --ptable gpt
> diff --git a/wic/qemu-riscv64-efibootguard.wks.in b/wic/qemu-riscv64- 
> efibootguard.wks.in index 9158aa4..b37c971 100644
> --- a/wic/qemu-riscv64-efibootguard.wks.in
> +++ b/wic/qemu-riscv64-efibootguard.wks.in
> @@ -7,7 +7,7 @@ part --source rawcopy --sourceparams 
> "file=${IMAGE_FULLNAME}.squashfs" --align 1
>  part --source empty --align 1024 --fixed-size 1G --uuid 
> "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-
> 3D69D8477DE4
>  
>  # home and var are extra partitions
> -part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-
> 40d8-11ee-be56-0242ac120002
> -part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-
> 4258-11ee-be56-0242ac120002
> +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-
> 40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-
> 0242ac120002
> +part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-
> 4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-
> 0242ac120002
>  
>  bootloader --ptable gpt
> diff --git a/wic/x86-efibootguard.wks.in b/wic/x86- 
> efibootguard.wks.in index 98e8da5..b002ea5 100644
> --- a/wic/x86-efibootguard.wks.in
> +++ b/wic/x86-efibootguard.wks.in
> @@ -8,7 +8,7 @@ part --source empty --align 1024 --fixed-size 1G -- 
> uuid "${ABROOTFS_PART_UUID_B}
>  
>  # home and var are extra partitions
>  
> -part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> fstype=ext4 --label home --align 1024  --size 1G --extra-space=100M - 
> -fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
> -part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> fstype=ext4 --label var --align 1024  --size 2G --extra-space=100M -- 
> fsuuid 96be3374-4258-11ee-be56-0242ac120002
> +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> fstype=ext4 --label home --align 1024  --size 1G --extra-space=100M - 
> -fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-
> 11ee-be56-0242ac120002
> +part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> fstype=ext4 --label var --align 1024  --size 2G --extra-space=100M -- 
> fsuuid 96be3374-4258-11ee-be56-0242ac120002 --uuid 12343374-4258-
> 11ee-be56-0242ac120002
>  
>  bootloader --ptable gpt --append="console=tty0 console=ttyS0,115200 
> rootwait earlyprintk watchdog.handle_boot_enabled=0
> iTCO_wdt.nowayout=1 "
> diff --git a/wic/x86_64-generic.wks b/wic/x86_64-generic.wks index 
> 1a44e26..a63f7f3 100644
> --- a/wic/x86_64-generic.wks
> +++ b/wic/x86_64-generic.wks
> @@ -6,8 +6,8 @@
>  # SPDX-License-Identifier: MIT
>  #
>  
> -part /boot --source bootimg-efi-isar --sourceparams "loader=grub- 
> efi" --label efi --part-type EF00 --align 1024 --fsuuid 0x4321dcba
> +part /boot --source bootimg-efi-isar --sourceparams "loader=grub-
> efi" --label efi --part-type EF00 --align 1024 --fsuuid 0x4321dcba -- 
> uuid 0x5678dcba
>  
> -part / --source rootfs --fstype ext4 --mkfs-extraopts "-T default" - 
> -label platform --align 1024 --fsuuid 1f55d66a-40d8-11ee-be56-
> 0242ac120002
> +part / --source rootfs --fstype ext4 --mkfs-extraopts "-T default" -
> -label platform --align 1024 --fsuuid 1f55d66a-40d8-11ee-be56-
> 0242ac120002 --uuid abcdd66a-40d8-11ee-be56-0242ac120002
>  
>  bootloader --ptable gpt --timeout 2 --append "console=ttyS0,115200"

--
Siemens AG, Technology
Linux Expert Center
MOESSBAUER, Felix Jan. 24, 2024, 7:59 a.m. UTC | #3
On Wed, 2024-01-24 at 06:03 +0000, Adithya.Balakumar@toshiba-tsip.com
wrote:
> Hi Felix,
> 
> Thanks for your comment. Will send out a v2 of the patch. I would
> like to ask a small clarification about your comments? 
> 
> As for the part "Can we please use unique UUIDs across all devices
> (not always the same).", I understand this. Will set unique UUIDs
> across all devices.
> 
> However, could you please elaborate on the second part of your
> comment: 
> "Also it would be nice to add a note somewhere that these UUIDs
> should be changed in case the user creates an image for flashing and
> one for the target (which is quite common). Here, the UUIDs would
> collide."

A common use-case is the creation of two images (either from the same
build or two separate ones): One image is for flashing the image onto
the target, the other one is the image for the target (i.e. the image
you want to run on the target). If both the installer (for flashing)
and the target image use the same partition UUIDs, you will get
collisions once the partition table is re-read.

To circumvent this, both images need to use distinct UUIDs for the
partitions. As this is hard to achieve with our pre-defined .wks files,
a note somewhere would be good.

For product development I anyways recommend to use fresh UUIDs and not
the default ones.

Best regards,
Felix

> 
> Thanks and Regards,
> Adithya Balakumar
> 
> -----Original Message-----
> From: MOESSBAUER, Felix <felix.moessbauer@siemens.com> 
> Sent: Tuesday, January 23, 2024 3:02 PM
> To: cip-dev@lists.cip-project.org; balakumar adithya(TSIP TEUR)
> <Adithya.Balakumar@toshiba-tsip.com>; Kiszka, Jan
> <jan.kiszka@siemens.com>
> Cc: kunijadar shivanand(TSIP TMIEC ODG Porting)
> <Shivanand.Kunijadar@toshiba-tsip.com>; ashrith sai(TSIP)
> <Sai.Sathujoda@toshiba-tsip.com>; dinesh kumar(TSIP TMIEC ODG
> Porting) <dinesh.kumar@toshiba-tsip.com>; hayashi kazuhiro(林 和宏 DME
> ○DIG□MPS○MP4) <kazuhiro3.hayashi@toshiba.co.jp>
> Subject: Re: [isar-cip-core][PATCH v1] wic: Set fixed partition UUID
> values
> 
> On Mon, 2024-01-22 at 17:45 +0530, Adithya Balakumar wrote:
> > From: Adithya Balakumar <adithya.balakumar@toshiba-tsip.com>
> > 
> > This commit sets fixed partition uuid for partitions. The --uuid 
> > option in wic allows to set fixed uuid for a partition. This is 
> > required for generating reproducible images.
> 
> Thanks for this patch. Just a minor note:
> 
> Can we please use unique UUIDs across all devices (not always the
> same). Also it would be nice to add a note somewhere that these UUIDs
> should be changed in case the user creates an image for flashing and
> one for the target (which is quite common). Here, the UUIDs would
> collide.
> 
> Felix
> 
> > 
> > Signed-off-by: Adithya Balakumar
> > <adithya.balakumar@toshiba-tsip.com>
> > ---
> >  wic/bbb-efibootguard.wks.in                   | 4 ++--
> >  wic/bbb.wks                                   | 2 +-
> >  wic/ebg-signed-sysparts.inc                   | 6 +++---
> >  wic/ebg-sysparts.inc                          | 6 +++---
> >  wic/hihope-rzg2m-efibootguard.wks.in          | 4 ++--
> >  wic/hihope-rzg2m.wks                          | 4 ++--
> >  wic/iwg20m.wks                                | 4 ++--
> >  wic/qemu-amd64-efibootguard-secureboot.wks.in | 4 ++--
> >  wic/qemu-arm64-efibootguard-secureboot.wks.in | 4 ++--
> >  wic/qemu-arm64-efibootguard.wks.in            | 4 ++--
> >  wic/qemu-riscv64-efibootguard.wks.in          | 4 ++--
> >  wic/x86-efibootguard.wks.in                   | 4 ++--
> >  wic/x86_64-generic.wks                        | 4 ++--
> >  13 files changed, 27 insertions(+), 27 deletions(-)
> > 
> > diff --git a/wic/bbb-efibootguard.wks.in b/wic/bbb- 
> > efibootguard.wks.in index 48789c7..123f86b 100644
> > --- a/wic/bbb-efibootguard.wks.in
> > +++ b/wic/bbb-efibootguard.wks.in
> > @@ -15,7 +15,7 @@ part --source rawcopy --sourceparams 
> > "file=${IMAGE_FULLNAME}.squashfs" --align 1
> >  part --source empty --align 1024 --fixed-size 1G --uuid 
> > "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-
> > 3D69D8477DE4
> >  
> >  # home and var are extra partitions
> > -part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> > fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-
> > 40d8-11ee-be56-0242ac120002
> > -part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> > fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-
> > 4258-11ee-be56-0242ac120002
> > +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> > fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-
> > 40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-
> > 0242ac120002
> > +part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> > fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-
> > 4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-
> > 0242ac120002
> >  
> >  bootloader --ptable gpt --append="rootwait console=ttyO0,115200
> > omap_wdt.early_enable=1 omap_wdt.nowayout=1 
> > watchdog.handle_boot_enabled=0"
> > diff --git a/wic/bbb.wks b/wic/bbb.wks index a797e95..03939b4
> > 100644
> > --- a/wic/bbb.wks
> > +++ b/wic/bbb.wks
> > @@ -9,6 +9,6 @@
> >  part --source rawcopy --sourceparams "file=/usr/lib/u-
> > boot/bbb/MLO"
> > --no-table --align 128
> >  part --source rawcopy --sourceparams "file=/usr/lib/u-boot/bbb/u- 
> > boot.img" --no-table --align 384
> >  
> > -part / --source rootfs-u-boot --ondisk mmcblk0 --fstype ext4 --
> > mkfs- 
> > extraopts "-T default" --label platform --align 1024 --active -- 
> > fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
> > +part / --source rootfs-u-boot --ondisk mmcblk0 --fstype ext4 --
> > mkfs-
> > extraopts "-T default" --label platform --align 1024 --active -- 
> > fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-
> > 11ee-be56-0242ac120002
> >  
> >  bootloader --append "rootwait console=ttyO0,115200"
> > diff --git a/wic/ebg-signed-sysparts.inc b/wic/ebg-signed- 
> > sysparts.inc index b2340e2..0c339fc 100644
> > --- a/wic/ebg-signed-sysparts.inc
> > +++ b/wic/ebg-signed-sysparts.inc
> > @@ -1,8 +1,8 @@
> >  # default partition layout EFI Boot Guard usage, signed version
> >  
> >  # EFI partition containing efibootguard bootloader binary -part 
> > --source efibootguard-efi  --size 16M --extra-space 0 -- 
> > overhead-factor 1 --label efi   --align 1024 --part-type=EF00 -- 
> > active --sourceparams "signwith=/usr/bin/sign_secure_image.sh" -- 
> > fsuuid 0x4321dcba
> > +part --source efibootguard-efi  --size 16M --extra-space 0 --
> > overhead-factor 1 --label efi   --align 1024 --part-type=EF00 -- 
> > active --sourceparams "signwith=/usr/bin/sign_secure_image.sh" -- 
> > fsuuid 0x4321dcba --uuid 0x5678dcba
> >  
> >  # EFI Boot Guard environment/config partitions plus Kernel files 
> > -part --source efibootguard-boot --size 32M --extra-space 0 -- 
> > overhead-factor 1 --label BOOT0 --align 1024 --part-type=0700 -- 
> > sourceparams "revision=2,signwith=/usr/bin/sign_secure_image.sh" --
> > fsuuid 0x4321dcbb -part --source efibootguard-boot --size 32M 
> > --extra-space 0 -- overhead-factor 1 --label BOOT1 --align 1024 
> > --part-type=0700 -- sourceparams 
> > "revision=1,signwith=/usr/bin/sign_secure_image.sh" -- fsuuid 
> > 0x4321dcbc
> > +part --source efibootguard-boot --size 32M --extra-space 0 --
> > overhead-factor 1 --label BOOT0 --align 1024 --part-type=0700 -- 
> > sourceparams "revision=2,signwith=/usr/bin/sign_secure_image.sh" --
> > fsuuid 0x4321dcbb --uuid 0x5678dcbb
> > +part --source efibootguard-boot --size 32M --extra-space 0 --
> > overhead-factor 1 --label BOOT1 --align 1024 --part-type=0700 -- 
> > sourceparams "revision=1,signwith=/usr/bin/sign_secure_image.sh" --
> > fsuuid 0x4321dcbc --uuid 0x5678dcbc diff --git a/wic/ebg-
> > sysparts.inc 
> > b/wic/ebg-sysparts.inc index 300c36f..beb0903 100644
> > --- a/wic/ebg-sysparts.inc
> > +++ b/wic/ebg-sysparts.inc
> > @@ -1,8 +1,8 @@
> >  # default partition layout EFI Boot Guard usage
> >  
> >  # EFI partition containing efibootguard bootloader binary -part 
> > --source efibootguard-efi  --size 16M --extra-space 0 -- 
> > overhead-factor 1 --label efi   --align 1024 --part-type=EF00 -- 
> > active --fsuuid 0x4321dcba
> > +part --source efibootguard-efi  --size 16M --extra-space 0 --
> > overhead-factor 1 --label efi   --align 1024 --part-type=EF00 -- 
> > active --fsuuid 0x4321dcba --uuid 0x5678dcba
> >  
> >  # EFI Boot Guard environment/config partitions plus Kernel files 
> > -part --source efibootguard-boot --size 32M --extra-space 0 -- 
> > overhead-factor 1 --label BOOT0 --align 1024 --part-type=0700 -- 
> > sourceparams "revision=2" --fsuuid 0x4321dcbb -part --source 
> > efibootguard-boot --size 32M --extra-space 0 -- overhead-factor 1 
> > --label BOOT1 --align 1024 --part-type=0700 -- sourceparams 
> > "revision=1" --fsuuid 0x4321dcbc
> > +part --source efibootguard-boot --size 32M --extra-space 0 --
> > overhead-factor 1 --label BOOT0 --align 1024 --part-type=0700 -- 
> > sourceparams "revision=2" --fsuuid 0x4321dcbb --uuid 0x5678dcbb
> > +part --source efibootguard-boot --size 32M --extra-space 0 --
> > overhead-factor 1 --label BOOT1 --align 1024 --part-type=0700 -- 
> > sourceparams "revision=1" --fsuuid 0x4321dcbc --uuid 0x5678dcbc
> > diff 
> > --git a/wic/hihope-rzg2m-efibootguard.wks.in b/wic/hihope-rzg2m- 
> > efibootguard.wks.in index 2ac8850..38581dd 100644
> > --- a/wic/hihope-rzg2m-efibootguard.wks.in
> > +++ b/wic/hihope-rzg2m-efibootguard.wks.in
> > @@ -8,7 +8,7 @@ part --source empty --align 1024 --fixed-size 1G --
> > uuid "${ABROOTFS_PART_UUID_B}
> >  
> >  # home and var are extra partitions
> >  
> > -part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> > fstype=ext4 --label home --align 1024  --size 1G --extra-space=100M
> > - 
> > -fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
> > -part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> > fstype=ext4 --label var --align 1024  --size 2G --extra-space=100M
> > -- 
> > fsuuid 96be3374-4258-11ee-be56-0242ac120002
> > +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> > fstype=ext4 --label home --align 1024  --size 1G --extra-space=100M
> > - 
> > -fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-
> > 11ee-be56-0242ac120002
> > +part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> > fstype=ext4 --label var --align 1024  --size 2G --extra-space=100M
> > -- 
> > fsuuid 96be3374-4258-11ee-be56-0242ac120002 --uuid 12343374-4258-
> > 11ee-be56-0242ac120002
> >  
> >  bootloader --ptable gpt --append="console=tty0
> > console=ttySC0,115200 
> > rootwait earlyprintk"
> > diff --git a/wic/hihope-rzg2m.wks b/wic/hihope-rzg2m.wks index 
> > fd3a338..1bb8ced 100644
> > --- a/wic/hihope-rzg2m.wks
> > +++ b/wic/hihope-rzg2m.wks
> > @@ -9,7 +9,7 @@
> >  # SPDX-License-Identifier: MIT
> >  #
> >  
> > -part /boot --source bootimg-partition --ondisk mmcblk0 --fstype
> > vfat 
> > --label boot --align 1 --size 32M --extra-space 0 --fsuuid
> > 0x4321dcba
> > +part /boot --source bootimg-partition --ondisk mmcblk0 --fstype
> > vfat
> > --label boot --align 1 --size 32M --extra-space 0 --fsuuid
> > 0x4321dcba 
> > --uuid 0x5678dcba
> >  
> >  # Rootfs partition
> > -part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label root
> > - 
> > -align 1024 --size 2G --active --fsuuid 1f55d66a-40d8-11ee-be56-
> > 0242ac120002
> > +part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label root
> > -
> > -align 1024 --size 2G --active --fsuuid 1f55d66a-40d8-11ee-be56-
> > 0242ac120002 --uuid abcdd66a-40d8-11ee-be56-0242ac120002
> > diff --git a/wic/iwg20m.wks b/wic/iwg20m.wks index 85765f0..feea21e
> > 100644
> > --- a/wic/iwg20m.wks
> > +++ b/wic/iwg20m.wks
> > @@ -12,7 +12,7 @@
> >  # [Note] u-boot runs from an SPI memory device
> >  
> >  # SDCard Boot partition (copies files in IMAGE_BOOT_FILES: zImage
> > and 
> > device tree) -part /boot --source bootimg-partition --ondisk
> > mmcblk0 
> > --fstype vfat --label boot --align 1 --size 32M --extra-space 0 
> > --fsuuid 0x4321dcba
> > +part /boot --source bootimg-partition --ondisk mmcblk0 --fstype
> > vfat
> > --label boot --align 1 --size 32M --extra-space 0 --fsuuid
> > 0x4321dcba 
> > --uuid 0x5678dcba
> >  
> >  # Rootfs partition
> > -part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label root
> > - 
> > -align 1024 --size 2G --active --fsuuid 1f55d66a-40d8-11ee-be56-
> > 0242ac120002
> > +part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label root
> > -
> > -align 1024 --size 2G --active --fsuuid 1f55d66a-40d8-11ee-be56-
> > 0242ac120002 --uuid abcdd66a-40d8-11ee-be56-0242ac120002
> > diff --git a/wic/qemu-amd64-efibootguard-secureboot.wks.in
> > b/wic/qemu-amd64-efibootguard-secureboot.wks.in
> > index 2e5cb39..03c715b 100644
> > --- a/wic/qemu-amd64-efibootguard-secureboot.wks.in
> > +++ b/wic/qemu-amd64-efibootguard-secureboot.wks.in
> > @@ -4,7 +4,7 @@ part --source rawcopy --sourceparams 
> > "file=${IMAGE_FULLNAME}.verity" --align 102
> >  part --source empty --align 1024 --fixed-size 1G --uuid 
> > "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-
> > 3D69D8477DE4
> >  
> >  # home and var are extra partitions
> > -part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> > fstype=ext4 --label home --align 1024 --size 1G --fsuuid 1f55d66a-
> > 40d8-11ee-be56-0242ac120002
> > -part /var  --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var  --
> > fstype=ext4 --label var  --align 1024 --size 2G --fsuuid 96be3374-
> > 4258-11ee-be56-0242ac120002
> > +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> > fstype=ext4 --label home --align 1024 --size 1G --fsuuid 1f55d66a-
> > 40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-
> > 0242ac120002
> > +part /var  --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var  --
> > fstype=ext4 --label var  --align 1024 --size 2G --fsuuid 96be3374-
> > 4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-
> > 0242ac120002
> >  
> >  bootloader --ptable gpt --append="console=tty0
> > console=ttyS0,115200 
> > rootwait earlyprintk watchdog.handle_boot_enabled=0
> > iTCO_wdt.nowayout=1 panic=5"
> > diff --git a/wic/qemu-arm64-efibootguard-secureboot.wks.in
> > b/wic/qemu-arm64-efibootguard-secureboot.wks.in
> > index 2fc389c..ede1fd5 100644
> > --- a/wic/qemu-arm64-efibootguard-secureboot.wks.in
> > +++ b/wic/qemu-arm64-efibootguard-secureboot.wks.in
> > @@ -4,7 +4,7 @@ part --source rawcopy --sourceparams 
> > "file=${IMAGE_FULLNAME}.verity" --align 102
> >  part --source empty --align 1024 --fixed-size 1G --uuid 
> > "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-
> > 3D69D8477DE4
> >  
> >  # home and var are extra partitions
> > -part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> > fstype=ext4 --label home --align 1024 --size 1G --fsuuid 1f55d66a-
> > 40d8-11ee-be56-0242ac120002
> > -part /var  --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var  --
> > fstype=ext4 --label var  --align 1024 --size 2G --fsuuid 96be3374-
> > 4258-11ee-be56-0242ac120002
> > +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> > fstype=ext4 --label home --align 1024 --size 1G --fsuuid 1f55d66a-
> > 40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-
> > 0242ac120002
> > +part /var  --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var  --
> > fstype=ext4 --label var  --align 1024 --size 2G --fsuuid 96be3374-
> > 4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-
> > 0242ac120002
> >  
> >  bootloader --ptable gpt --append="panic=5"
> > diff --git a/wic/qemu-arm64-efibootguard.wks.in b/wic/qemu-arm64- 
> > efibootguard.wks.in index 1f50ba3..bf58e1c 100644
> > --- a/wic/qemu-arm64-efibootguard.wks.in
> > +++ b/wic/qemu-arm64-efibootguard.wks.in
> > @@ -7,7 +7,7 @@ part --source rawcopy --sourceparams 
> > "file=${IMAGE_FULLNAME}.squashfs" --align 1
> >  part --source empty --align 1024 --fixed-size 1G --uuid 
> > "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-
> > 3D69D8477DE4
> >  
> >  # home and var are extra partitions
> > -part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> > fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-
> > 40d8-11ee-be56-0242ac120002
> > -part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> > fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-
> > 4258-11ee-be56-0242ac120002
> > +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> > fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-
> > 40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-
> > 0242ac120002
> > +part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> > fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-
> > 4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-
> > 0242ac120002
> >  
> >  bootloader --ptable gpt
> > diff --git a/wic/qemu-riscv64-efibootguard.wks.in b/wic/qemu-
> > riscv64- 
> > efibootguard.wks.in index 9158aa4..b37c971 100644
> > --- a/wic/qemu-riscv64-efibootguard.wks.in
> > +++ b/wic/qemu-riscv64-efibootguard.wks.in
> > @@ -7,7 +7,7 @@ part --source rawcopy --sourceparams 
> > "file=${IMAGE_FULLNAME}.squashfs" --align 1
> >  part --source empty --align 1024 --fixed-size 1G --uuid 
> > "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-
> > 3D69D8477DE4
> >  
> >  # home and var are extra partitions
> > -part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> > fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-
> > 40d8-11ee-be56-0242ac120002
> > -part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> > fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-
> > 4258-11ee-be56-0242ac120002
> > +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> > fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-
> > 40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-
> > 0242ac120002
> > +part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> > fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-
> > 4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-
> > 0242ac120002
> >  
> >  bootloader --ptable gpt
> > diff --git a/wic/x86-efibootguard.wks.in b/wic/x86- 
> > efibootguard.wks.in index 98e8da5..b002ea5 100644
> > --- a/wic/x86-efibootguard.wks.in
> > +++ b/wic/x86-efibootguard.wks.in
> > @@ -8,7 +8,7 @@ part --source empty --align 1024 --fixed-size 1G --
> > uuid "${ABROOTFS_PART_UUID_B}
> >  
> >  # home and var are extra partitions
> >  
> > -part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> > fstype=ext4 --label home --align 1024  --size 1G --extra-space=100M
> > - 
> > -fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
> > -part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> > fstype=ext4 --label var --align 1024  --size 2G --extra-space=100M
> > -- 
> > fsuuid 96be3374-4258-11ee-be56-0242ac120002
> > +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> > fstype=ext4 --label home --align 1024  --size 1G --extra-space=100M
> > - 
> > -fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-
> > 11ee-be56-0242ac120002
> > +part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> > fstype=ext4 --label var --align 1024  --size 2G --extra-space=100M
> > -- 
> > fsuuid 96be3374-4258-11ee-be56-0242ac120002 --uuid 12343374-4258-
> > 11ee-be56-0242ac120002
> >  
> >  bootloader --ptable gpt --append="console=tty0
> > console=ttyS0,115200 
> > rootwait earlyprintk watchdog.handle_boot_enabled=0
> > iTCO_wdt.nowayout=1 "
> > diff --git a/wic/x86_64-generic.wks b/wic/x86_64-generic.wks index 
> > 1a44e26..a63f7f3 100644
> > --- a/wic/x86_64-generic.wks
> > +++ b/wic/x86_64-generic.wks
> > @@ -6,8 +6,8 @@
> >  # SPDX-License-Identifier: MIT
> >  #
> >  
> > -part /boot --source bootimg-efi-isar --sourceparams "loader=grub- 
> > efi" --label efi --part-type EF00 --align 1024 --fsuuid 0x4321dcba
> > +part /boot --source bootimg-efi-isar --sourceparams "loader=grub-
> > efi" --label efi --part-type EF00 --align 1024 --fsuuid 0x4321dcba
> > -- 
> > uuid 0x5678dcba
> >  
> > -part / --source rootfs --fstype ext4 --mkfs-extraopts "-T default"
> > - 
> > -label platform --align 1024 --fsuuid 1f55d66a-40d8-11ee-be56-
> > 0242ac120002
> > +part / --source rootfs --fstype ext4 --mkfs-extraopts "-T default"
> > -
> > -label platform --align 1024 --fsuuid 1f55d66a-40d8-11ee-be56-
> > 0242ac120002 --uuid abcdd66a-40d8-11ee-be56-0242ac120002
> >  
> >  bootloader --ptable gpt --timeout 2 --append
> > "console=ttyS0,115200"
> 
> --
> Siemens AG, Technology
> Linux Expert Center
> 
>
Jan Kiszka Jan. 29, 2024, 12:30 p.m. UTC | #4
On 24.01.24 07:03, Adithya.Balakumar@toshiba-tsip.com wrote:
> Hi Felix,
> 
> Thanks for your comment. Will send out a v2 of the patch. I would like to ask a small clarification about your comments? 
> 

If v2 should still be part of the 1.3 release (I would consider this as
fix, not as feature), please send it soon.

Jan

> As for the part "Can we please use unique UUIDs across all devices (not always the same).", I understand this. Will set unique UUIDs across all devices.
> 
> However, could you please elaborate on the second part of your comment: 
> "Also it would be nice to add a note somewhere that these UUIDs should be changed in case the user creates an image for flashing and one for the target (which is quite common). Here, the UUIDs would collide."
> 
> Thanks and Regards,
> Adithya Balakumar
> 
> -----Original Message-----
> From: MOESSBAUER, Felix <felix.moessbauer@siemens.com> 
> Sent: Tuesday, January 23, 2024 3:02 PM
> To: cip-dev@lists.cip-project.org; balakumar adithya(TSIP TEUR) <Adithya.Balakumar@toshiba-tsip.com>; Kiszka, Jan <jan.kiszka@siemens.com>
> Cc: kunijadar shivanand(TSIP TMIEC ODG Porting) <Shivanand.Kunijadar@toshiba-tsip.com>; ashrith sai(TSIP) <Sai.Sathujoda@toshiba-tsip.com>; dinesh kumar(TSIP TMIEC ODG Porting) <dinesh.kumar@toshiba-tsip.com>; hayashi kazuhiro(林 和宏 DME ○DIG□MPS○MP4) <kazuhiro3.hayashi@toshiba.co.jp>
> Subject: Re: [isar-cip-core][PATCH v1] wic: Set fixed partition UUID values
> 
> On Mon, 2024-01-22 at 17:45 +0530, Adithya Balakumar wrote:
>> From: Adithya Balakumar <adithya.balakumar@toshiba-tsip.com>
>>
>> This commit sets fixed partition uuid for partitions. The --uuid 
>> option in wic allows to set fixed uuid for a partition. This is 
>> required for generating reproducible images.
> 
> Thanks for this patch. Just a minor note:
> 
> Can we please use unique UUIDs across all devices (not always the same). Also it would be nice to add a note somewhere that these UUIDs should be changed in case the user creates an image for flashing and one for the target (which is quite common). Here, the UUIDs would collide.
> 
> Felix
> 
>>
>> Signed-off-by: Adithya Balakumar <adithya.balakumar@toshiba-tsip.com>
>> ---
>>  wic/bbb-efibootguard.wks.in                   | 4 ++--
>>  wic/bbb.wks                                   | 2 +-
>>  wic/ebg-signed-sysparts.inc                   | 6 +++---
>>  wic/ebg-sysparts.inc                          | 6 +++---
>>  wic/hihope-rzg2m-efibootguard.wks.in          | 4 ++--
>>  wic/hihope-rzg2m.wks                          | 4 ++--
>>  wic/iwg20m.wks                                | 4 ++--
>>  wic/qemu-amd64-efibootguard-secureboot.wks.in | 4 ++--
>>  wic/qemu-arm64-efibootguard-secureboot.wks.in | 4 ++--
>>  wic/qemu-arm64-efibootguard.wks.in            | 4 ++--
>>  wic/qemu-riscv64-efibootguard.wks.in          | 4 ++--
>>  wic/x86-efibootguard.wks.in                   | 4 ++--
>>  wic/x86_64-generic.wks                        | 4 ++--
>>  13 files changed, 27 insertions(+), 27 deletions(-)
>>
>> diff --git a/wic/bbb-efibootguard.wks.in b/wic/bbb- 
>> efibootguard.wks.in index 48789c7..123f86b 100644
>> --- a/wic/bbb-efibootguard.wks.in
>> +++ b/wic/bbb-efibootguard.wks.in
>> @@ -15,7 +15,7 @@ part --source rawcopy --sourceparams 
>> "file=${IMAGE_FULLNAME}.squashfs" --align 1
>>  part --source empty --align 1024 --fixed-size 1G --uuid 
>> "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-
>> 3D69D8477DE4
>>  
>>  # home and var are extra partitions
>> -part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
>> fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-
>> 40d8-11ee-be56-0242ac120002
>> -part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
>> fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-
>> 4258-11ee-be56-0242ac120002
>> +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
>> fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-
>> 40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-
>> 0242ac120002
>> +part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
>> fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-
>> 4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-
>> 0242ac120002
>>  
>>  bootloader --ptable gpt --append="rootwait console=ttyO0,115200
>> omap_wdt.early_enable=1 omap_wdt.nowayout=1 
>> watchdog.handle_boot_enabled=0"
>> diff --git a/wic/bbb.wks b/wic/bbb.wks index a797e95..03939b4 100644
>> --- a/wic/bbb.wks
>> +++ b/wic/bbb.wks
>> @@ -9,6 +9,6 @@
>>  part --source rawcopy --sourceparams "file=/usr/lib/u-boot/bbb/MLO"
>> --no-table --align 128
>>  part --source rawcopy --sourceparams "file=/usr/lib/u-boot/bbb/u- 
>> boot.img" --no-table --align 384
>>  
>> -part / --source rootfs-u-boot --ondisk mmcblk0 --fstype ext4 --mkfs- 
>> extraopts "-T default" --label platform --align 1024 --active -- 
>> fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
>> +part / --source rootfs-u-boot --ondisk mmcblk0 --fstype ext4 --mkfs-
>> extraopts "-T default" --label platform --align 1024 --active -- 
>> fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-
>> 11ee-be56-0242ac120002
>>  
>>  bootloader --append "rootwait console=ttyO0,115200"
>> diff --git a/wic/ebg-signed-sysparts.inc b/wic/ebg-signed- 
>> sysparts.inc index b2340e2..0c339fc 100644
>> --- a/wic/ebg-signed-sysparts.inc
>> +++ b/wic/ebg-signed-sysparts.inc
>> @@ -1,8 +1,8 @@
>>  # default partition layout EFI Boot Guard usage, signed version
>>  
>>  # EFI partition containing efibootguard bootloader binary -part 
>> --source efibootguard-efi  --size 16M --extra-space 0 -- 
>> overhead-factor 1 --label efi   --align 1024 --part-type=EF00 -- 
>> active --sourceparams "signwith=/usr/bin/sign_secure_image.sh" -- 
>> fsuuid 0x4321dcba
>> +part --source efibootguard-efi  --size 16M --extra-space 0 --
>> overhead-factor 1 --label efi   --align 1024 --part-type=EF00 -- 
>> active --sourceparams "signwith=/usr/bin/sign_secure_image.sh" -- 
>> fsuuid 0x4321dcba --uuid 0x5678dcba
>>  
>>  # EFI Boot Guard environment/config partitions plus Kernel files 
>> -part --source efibootguard-boot --size 32M --extra-space 0 -- 
>> overhead-factor 1 --label BOOT0 --align 1024 --part-type=0700 -- 
>> sourceparams "revision=2,signwith=/usr/bin/sign_secure_image.sh" -- 
>> fsuuid 0x4321dcbb -part --source efibootguard-boot --size 32M 
>> --extra-space 0 -- overhead-factor 1 --label BOOT1 --align 1024 
>> --part-type=0700 -- sourceparams 
>> "revision=1,signwith=/usr/bin/sign_secure_image.sh" -- fsuuid 
>> 0x4321dcbc
>> +part --source efibootguard-boot --size 32M --extra-space 0 --
>> overhead-factor 1 --label BOOT0 --align 1024 --part-type=0700 -- 
>> sourceparams "revision=2,signwith=/usr/bin/sign_secure_image.sh" -- 
>> fsuuid 0x4321dcbb --uuid 0x5678dcbb
>> +part --source efibootguard-boot --size 32M --extra-space 0 --
>> overhead-factor 1 --label BOOT1 --align 1024 --part-type=0700 -- 
>> sourceparams "revision=1,signwith=/usr/bin/sign_secure_image.sh" -- 
>> fsuuid 0x4321dcbc --uuid 0x5678dcbc diff --git a/wic/ebg-sysparts.inc 
>> b/wic/ebg-sysparts.inc index 300c36f..beb0903 100644
>> --- a/wic/ebg-sysparts.inc
>> +++ b/wic/ebg-sysparts.inc
>> @@ -1,8 +1,8 @@
>>  # default partition layout EFI Boot Guard usage
>>  
>>  # EFI partition containing efibootguard bootloader binary -part 
>> --source efibootguard-efi  --size 16M --extra-space 0 -- 
>> overhead-factor 1 --label efi   --align 1024 --part-type=EF00 -- 
>> active --fsuuid 0x4321dcba
>> +part --source efibootguard-efi  --size 16M --extra-space 0 --
>> overhead-factor 1 --label efi   --align 1024 --part-type=EF00 -- 
>> active --fsuuid 0x4321dcba --uuid 0x5678dcba
>>  
>>  # EFI Boot Guard environment/config partitions plus Kernel files 
>> -part --source efibootguard-boot --size 32M --extra-space 0 -- 
>> overhead-factor 1 --label BOOT0 --align 1024 --part-type=0700 -- 
>> sourceparams "revision=2" --fsuuid 0x4321dcbb -part --source 
>> efibootguard-boot --size 32M --extra-space 0 -- overhead-factor 1 
>> --label BOOT1 --align 1024 --part-type=0700 -- sourceparams 
>> "revision=1" --fsuuid 0x4321dcbc
>> +part --source efibootguard-boot --size 32M --extra-space 0 --
>> overhead-factor 1 --label BOOT0 --align 1024 --part-type=0700 -- 
>> sourceparams "revision=2" --fsuuid 0x4321dcbb --uuid 0x5678dcbb
>> +part --source efibootguard-boot --size 32M --extra-space 0 --
>> overhead-factor 1 --label BOOT1 --align 1024 --part-type=0700 -- 
>> sourceparams "revision=1" --fsuuid 0x4321dcbc --uuid 0x5678dcbc diff 
>> --git a/wic/hihope-rzg2m-efibootguard.wks.in b/wic/hihope-rzg2m- 
>> efibootguard.wks.in index 2ac8850..38581dd 100644
>> --- a/wic/hihope-rzg2m-efibootguard.wks.in
>> +++ b/wic/hihope-rzg2m-efibootguard.wks.in
>> @@ -8,7 +8,7 @@ part --source empty --align 1024 --fixed-size 1G -- 
>> uuid "${ABROOTFS_PART_UUID_B}
>>  
>>  # home and var are extra partitions
>>  
>> -part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
>> fstype=ext4 --label home --align 1024  --size 1G --extra-space=100M - 
>> -fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
>> -part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
>> fstype=ext4 --label var --align 1024  --size 2G --extra-space=100M -- 
>> fsuuid 96be3374-4258-11ee-be56-0242ac120002
>> +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
>> fstype=ext4 --label home --align 1024  --size 1G --extra-space=100M - 
>> -fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-
>> 11ee-be56-0242ac120002
>> +part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
>> fstype=ext4 --label var --align 1024  --size 2G --extra-space=100M -- 
>> fsuuid 96be3374-4258-11ee-be56-0242ac120002 --uuid 12343374-4258-
>> 11ee-be56-0242ac120002
>>  
>>  bootloader --ptable gpt --append="console=tty0 console=ttySC0,115200 
>> rootwait earlyprintk"
>> diff --git a/wic/hihope-rzg2m.wks b/wic/hihope-rzg2m.wks index 
>> fd3a338..1bb8ced 100644
>> --- a/wic/hihope-rzg2m.wks
>> +++ b/wic/hihope-rzg2m.wks
>> @@ -9,7 +9,7 @@
>>  # SPDX-License-Identifier: MIT
>>  #
>>  
>> -part /boot --source bootimg-partition --ondisk mmcblk0 --fstype vfat 
>> --label boot --align 1 --size 32M --extra-space 0 --fsuuid 0x4321dcba
>> +part /boot --source bootimg-partition --ondisk mmcblk0 --fstype vfat
>> --label boot --align 1 --size 32M --extra-space 0 --fsuuid 0x4321dcba 
>> --uuid 0x5678dcba
>>  
>>  # Rootfs partition
>> -part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label root - 
>> -align 1024 --size 2G --active --fsuuid 1f55d66a-40d8-11ee-be56-
>> 0242ac120002
>> +part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label root -
>> -align 1024 --size 2G --active --fsuuid 1f55d66a-40d8-11ee-be56-
>> 0242ac120002 --uuid abcdd66a-40d8-11ee-be56-0242ac120002
>> diff --git a/wic/iwg20m.wks b/wic/iwg20m.wks index 85765f0..feea21e 
>> 100644
>> --- a/wic/iwg20m.wks
>> +++ b/wic/iwg20m.wks
>> @@ -12,7 +12,7 @@
>>  # [Note] u-boot runs from an SPI memory device
>>  
>>  # SDCard Boot partition (copies files in IMAGE_BOOT_FILES: zImage and 
>> device tree) -part /boot --source bootimg-partition --ondisk mmcblk0 
>> --fstype vfat --label boot --align 1 --size 32M --extra-space 0 
>> --fsuuid 0x4321dcba
>> +part /boot --source bootimg-partition --ondisk mmcblk0 --fstype vfat
>> --label boot --align 1 --size 32M --extra-space 0 --fsuuid 0x4321dcba 
>> --uuid 0x5678dcba
>>  
>>  # Rootfs partition
>> -part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label root - 
>> -align 1024 --size 2G --active --fsuuid 1f55d66a-40d8-11ee-be56-
>> 0242ac120002
>> +part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label root -
>> -align 1024 --size 2G --active --fsuuid 1f55d66a-40d8-11ee-be56-
>> 0242ac120002 --uuid abcdd66a-40d8-11ee-be56-0242ac120002
>> diff --git a/wic/qemu-amd64-efibootguard-secureboot.wks.in
>> b/wic/qemu-amd64-efibootguard-secureboot.wks.in
>> index 2e5cb39..03c715b 100644
>> --- a/wic/qemu-amd64-efibootguard-secureboot.wks.in
>> +++ b/wic/qemu-amd64-efibootguard-secureboot.wks.in
>> @@ -4,7 +4,7 @@ part --source rawcopy --sourceparams 
>> "file=${IMAGE_FULLNAME}.verity" --align 102
>>  part --source empty --align 1024 --fixed-size 1G --uuid 
>> "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-
>> 3D69D8477DE4
>>  
>>  # home and var are extra partitions
>> -part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
>> fstype=ext4 --label home --align 1024 --size 1G --fsuuid 1f55d66a-
>> 40d8-11ee-be56-0242ac120002
>> -part /var  --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var  --
>> fstype=ext4 --label var  --align 1024 --size 2G --fsuuid 96be3374-
>> 4258-11ee-be56-0242ac120002
>> +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
>> fstype=ext4 --label home --align 1024 --size 1G --fsuuid 1f55d66a-
>> 40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-
>> 0242ac120002
>> +part /var  --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var  --
>> fstype=ext4 --label var  --align 1024 --size 2G --fsuuid 96be3374-
>> 4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-
>> 0242ac120002
>>  
>>  bootloader --ptable gpt --append="console=tty0 console=ttyS0,115200 
>> rootwait earlyprintk watchdog.handle_boot_enabled=0
>> iTCO_wdt.nowayout=1 panic=5"
>> diff --git a/wic/qemu-arm64-efibootguard-secureboot.wks.in
>> b/wic/qemu-arm64-efibootguard-secureboot.wks.in
>> index 2fc389c..ede1fd5 100644
>> --- a/wic/qemu-arm64-efibootguard-secureboot.wks.in
>> +++ b/wic/qemu-arm64-efibootguard-secureboot.wks.in
>> @@ -4,7 +4,7 @@ part --source rawcopy --sourceparams 
>> "file=${IMAGE_FULLNAME}.verity" --align 102
>>  part --source empty --align 1024 --fixed-size 1G --uuid 
>> "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-
>> 3D69D8477DE4
>>  
>>  # home and var are extra partitions
>> -part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
>> fstype=ext4 --label home --align 1024 --size 1G --fsuuid 1f55d66a-
>> 40d8-11ee-be56-0242ac120002
>> -part /var  --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var  --
>> fstype=ext4 --label var  --align 1024 --size 2G --fsuuid 96be3374-
>> 4258-11ee-be56-0242ac120002
>> +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
>> fstype=ext4 --label home --align 1024 --size 1G --fsuuid 1f55d66a-
>> 40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-
>> 0242ac120002
>> +part /var  --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var  --
>> fstype=ext4 --label var  --align 1024 --size 2G --fsuuid 96be3374-
>> 4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-
>> 0242ac120002
>>  
>>  bootloader --ptable gpt --append="panic=5"
>> diff --git a/wic/qemu-arm64-efibootguard.wks.in b/wic/qemu-arm64- 
>> efibootguard.wks.in index 1f50ba3..bf58e1c 100644
>> --- a/wic/qemu-arm64-efibootguard.wks.in
>> +++ b/wic/qemu-arm64-efibootguard.wks.in
>> @@ -7,7 +7,7 @@ part --source rawcopy --sourceparams 
>> "file=${IMAGE_FULLNAME}.squashfs" --align 1
>>  part --source empty --align 1024 --fixed-size 1G --uuid 
>> "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-
>> 3D69D8477DE4
>>  
>>  # home and var are extra partitions
>> -part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
>> fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-
>> 40d8-11ee-be56-0242ac120002
>> -part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
>> fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-
>> 4258-11ee-be56-0242ac120002
>> +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
>> fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-
>> 40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-
>> 0242ac120002
>> +part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
>> fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-
>> 4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-
>> 0242ac120002
>>  
>>  bootloader --ptable gpt
>> diff --git a/wic/qemu-riscv64-efibootguard.wks.in b/wic/qemu-riscv64- 
>> efibootguard.wks.in index 9158aa4..b37c971 100644
>> --- a/wic/qemu-riscv64-efibootguard.wks.in
>> +++ b/wic/qemu-riscv64-efibootguard.wks.in
>> @@ -7,7 +7,7 @@ part --source rawcopy --sourceparams 
>> "file=${IMAGE_FULLNAME}.squashfs" --align 1
>>  part --source empty --align 1024 --fixed-size 1G --uuid 
>> "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-
>> 3D69D8477DE4
>>  
>>  # home and var are extra partitions
>> -part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
>> fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-
>> 40d8-11ee-be56-0242ac120002
>> -part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
>> fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-
>> 4258-11ee-be56-0242ac120002
>> +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
>> fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-
>> 40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-
>> 0242ac120002
>> +part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
>> fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-
>> 4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-
>> 0242ac120002
>>  
>>  bootloader --ptable gpt
>> diff --git a/wic/x86-efibootguard.wks.in b/wic/x86- 
>> efibootguard.wks.in index 98e8da5..b002ea5 100644
>> --- a/wic/x86-efibootguard.wks.in
>> +++ b/wic/x86-efibootguard.wks.in
>> @@ -8,7 +8,7 @@ part --source empty --align 1024 --fixed-size 1G -- 
>> uuid "${ABROOTFS_PART_UUID_B}
>>  
>>  # home and var are extra partitions
>>  
>> -part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
>> fstype=ext4 --label home --align 1024  --size 1G --extra-space=100M - 
>> -fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
>> -part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
>> fstype=ext4 --label var --align 1024  --size 2G --extra-space=100M -- 
>> fsuuid 96be3374-4258-11ee-be56-0242ac120002
>> +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
>> fstype=ext4 --label home --align 1024  --size 1G --extra-space=100M - 
>> -fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-
>> 11ee-be56-0242ac120002
>> +part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
>> fstype=ext4 --label var --align 1024  --size 2G --extra-space=100M -- 
>> fsuuid 96be3374-4258-11ee-be56-0242ac120002 --uuid 12343374-4258-
>> 11ee-be56-0242ac120002
>>  
>>  bootloader --ptable gpt --append="console=tty0 console=ttyS0,115200 
>> rootwait earlyprintk watchdog.handle_boot_enabled=0
>> iTCO_wdt.nowayout=1 "
>> diff --git a/wic/x86_64-generic.wks b/wic/x86_64-generic.wks index 
>> 1a44e26..a63f7f3 100644
>> --- a/wic/x86_64-generic.wks
>> +++ b/wic/x86_64-generic.wks
>> @@ -6,8 +6,8 @@
>>  # SPDX-License-Identifier: MIT
>>  #
>>  
>> -part /boot --source bootimg-efi-isar --sourceparams "loader=grub- 
>> efi" --label efi --part-type EF00 --align 1024 --fsuuid 0x4321dcba
>> +part /boot --source bootimg-efi-isar --sourceparams "loader=grub-
>> efi" --label efi --part-type EF00 --align 1024 --fsuuid 0x4321dcba -- 
>> uuid 0x5678dcba
>>  
>> -part / --source rootfs --fstype ext4 --mkfs-extraopts "-T default" - 
>> -label platform --align 1024 --fsuuid 1f55d66a-40d8-11ee-be56-
>> 0242ac120002
>> +part / --source rootfs --fstype ext4 --mkfs-extraopts "-T default" -
>> -label platform --align 1024 --fsuuid 1f55d66a-40d8-11ee-be56-
>> 0242ac120002 --uuid abcdd66a-40d8-11ee-be56-0242ac120002
>>  
>>  bootloader --ptable gpt --timeout 2 --append "console=ttyS0,115200"
> 
> --
> Siemens AG, Technology
> Linux Expert Center
> 
>
Adithya Balakumar Jan. 30, 2024, 5:23 a.m. UTC | #5
Hi Felix,
 
Thanks for the clarification. Just a minor clarification regarding adding a note about using fresh UUIDs for production images.
Would it be ok to add a note stating "For Production images, it is recommended to use fresh UUID's and not default ones" in the README.md file under the "Building Target Images" section or add a note in each .wks file.

Would like to know your opinion on this.
 
Thanks and Regards,
Adithya Balakumar

-----Original Message-----
From: MOESSBAUER, Felix <felix.moessbauer@siemens.com> 
Sent: Wednesday, January 24, 2024 1:30 PM
To: cip-dev@lists.cip-project.org; balakumar adithya(TSIP TEUR) <Adithya.Balakumar@toshiba-tsip.com>; Kiszka, Jan <jan.kiszka@siemens.com>
Cc: kunijadar shivanand(TSIP TMIEC ODG Porting) <Shivanand.Kunijadar@toshiba-tsip.com>; ashrith sai(TSIP) <Sai.Sathujoda@toshiba-tsip.com>; dinesh kumar(TSIP TMIEC ODG Porting) <dinesh.kumar@toshiba-tsip.com>; hayashi kazuhiro(林 和宏 DME ○DIG□MPS○MP4) <kazuhiro3.hayashi@toshiba.co.jp>
Subject: Re: [isar-cip-core][PATCH v1] wic: Set fixed partition UUID values

On Wed, 2024-01-24 at 06:03 +0000, Adithya.Balakumar@toshiba-tsip.com
wrote:
> Hi Felix,
> 
> Thanks for your comment. Will send out a v2 of the patch. I would like 
> to ask a small clarification about your comments?
> 
> As for the part "Can we please use unique UUIDs across all devices 
> (not always the same).", I understand this. Will set unique UUIDs 
> across all devices.
> 
> However, could you please elaborate on the second part of your
> comment: 
> "Also it would be nice to add a note somewhere that these UUIDs should 
> be changed in case the user creates an image for flashing and one for 
> the target (which is quite common). Here, the UUIDs would collide."

A common use-case is the creation of two images (either from the same build or two separate ones): One image is for flashing the image onto the target, the other one is the image for the target (i.e. the image you want to run on the target). If both the installer (for flashing) and the target image use the same partition UUIDs, you will get collisions once the partition table is re-read.

To circumvent this, both images need to use distinct UUIDs for the partitions. As this is hard to achieve with our pre-defined .wks files, a note somewhere would be good.

For product development I anyways recommend to use fresh UUIDs and not the default ones.

Best regards,
Felix

> 
> Thanks and Regards,
> Adithya Balakumar
> 
> -----Original Message-----
> From: MOESSBAUER, Felix <felix.moessbauer@siemens.com>
> Sent: Tuesday, January 23, 2024 3:02 PM
> To: cip-dev@lists.cip-project.org; balakumar adithya(TSIP TEUR) 
> <Adithya.Balakumar@toshiba-tsip.com>; Kiszka, Jan 
> <jan.kiszka@siemens.com>
> Cc: kunijadar shivanand(TSIP TMIEC ODG Porting) 
> <Shivanand.Kunijadar@toshiba-tsip.com>; ashrith sai(TSIP)
> <Sai.Sathujoda@toshiba-tsip.com>; dinesh kumar(TSIP TMIEC ODG
> Porting) <dinesh.kumar@toshiba-tsip.com>; hayashi kazuhiro(林 和宏 DME
> ○DIG□MPS○MP4) <kazuhiro3.hayashi@toshiba.co.jp>
> Subject: Re: [isar-cip-core][PATCH v1] wic: Set fixed partition UUID 
> values
> 
> On Mon, 2024-01-22 at 17:45 +0530, Adithya Balakumar wrote:
> > From: Adithya Balakumar <adithya.balakumar@toshiba-tsip.com>
> > 
> > This commit sets fixed partition uuid for partitions. The --uuid 
> > option in wic allows to set fixed uuid for a partition. This is 
> > required for generating reproducible images.
> 
> Thanks for this patch. Just a minor note:
> 
> Can we please use unique UUIDs across all devices (not always the 
> same). Also it would be nice to add a note somewhere that these UUIDs 
> should be changed in case the user creates an image for flashing and 
> one for the target (which is quite common). Here, the UUIDs would 
> collide.
> 
> Felix
> 
> > 
> > Signed-off-by: Adithya Balakumar
> > <adithya.balakumar@toshiba-tsip.com>
> > ---
> >  wic/bbb-efibootguard.wks.in                   | 4 ++--
> >  wic/bbb.wks                                   | 2 +-
> >  wic/ebg-signed-sysparts.inc                   | 6 +++---
> >  wic/ebg-sysparts.inc                          | 6 +++---
> >  wic/hihope-rzg2m-efibootguard.wks.in          | 4 ++--
> >  wic/hihope-rzg2m.wks                          | 4 ++--
> >  wic/iwg20m.wks                                | 4 ++--
> >  wic/qemu-amd64-efibootguard-secureboot.wks.in | 4 ++--
> >  wic/qemu-arm64-efibootguard-secureboot.wks.in | 4 ++--
> >  wic/qemu-arm64-efibootguard.wks.in            | 4 ++--
> >  wic/qemu-riscv64-efibootguard.wks.in          | 4 ++--
> >  wic/x86-efibootguard.wks.in                   | 4 ++--
> >  wic/x86_64-generic.wks                        | 4 ++--
> >  13 files changed, 27 insertions(+), 27 deletions(-)
> > 
> > diff --git a/wic/bbb-efibootguard.wks.in b/wic/bbb- 
> > efibootguard.wks.in index 48789c7..123f86b 100644
> > --- a/wic/bbb-efibootguard.wks.in
> > +++ b/wic/bbb-efibootguard.wks.in
> > @@ -15,7 +15,7 @@ part --source rawcopy --sourceparams 
> > "file=${IMAGE_FULLNAME}.squashfs" --align 1
> >  part --source empty --align 1024 --fixed-size 1G --uuid 
> > "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-
> > 3D69D8477DE4
> >  
> >  # home and var are extra partitions -part /home --source rootfs 
> > --rootfs-dir=${IMAGE_ROOTFS}/home --
> > fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-
> > 40d8-11ee-be56-0242ac120002
> > -part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> > fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-
> > 4258-11ee-be56-0242ac120002
> > +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> > fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-
> > 40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-
> > 0242ac120002
> > +part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> > fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-
> > 4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-
> > 0242ac120002
> >  
> >  bootloader --ptable gpt --append="rootwait console=ttyO0,115200
> > omap_wdt.early_enable=1 omap_wdt.nowayout=1 
> > watchdog.handle_boot_enabled=0"
> > diff --git a/wic/bbb.wks b/wic/bbb.wks index a797e95..03939b4
> > 100644
> > --- a/wic/bbb.wks
> > +++ b/wic/bbb.wks
> > @@ -9,6 +9,6 @@
> >  part --source rawcopy --sourceparams "file=/usr/lib/u- 
> > boot/bbb/MLO"
> > --no-table --align 128
> >  part --source rawcopy --sourceparams "file=/usr/lib/u-boot/bbb/u- 
> > boot.img" --no-table --align 384
> >  
> > -part / --source rootfs-u-boot --ondisk mmcblk0 --fstype ext4 --
> > mkfs-
> > extraopts "-T default" --label platform --align 1024 --active -- 
> > fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
> > +part / --source rootfs-u-boot --ondisk mmcblk0 --fstype ext4 --
> > mkfs-
> > extraopts "-T default" --label platform --align 1024 --active -- 
> > fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-
> > 11ee-be56-0242ac120002
> >  
> >  bootloader --append "rootwait console=ttyO0,115200"
> > diff --git a/wic/ebg-signed-sysparts.inc b/wic/ebg-signed- 
> > sysparts.inc index b2340e2..0c339fc 100644
> > --- a/wic/ebg-signed-sysparts.inc
> > +++ b/wic/ebg-signed-sysparts.inc
> > @@ -1,8 +1,8 @@
> >  # default partition layout EFI Boot Guard usage, signed version
> >  
> >  # EFI partition containing efibootguard bootloader binary -part 
> > --source efibootguard-efi  --size 16M --extra-space 0 -- 
> > overhead-factor 1 --label efi   --align 1024 --part-type=EF00 -- 
> > active --sourceparams "signwith=/usr/bin/sign_secure_image.sh" -- 
> > fsuuid 0x4321dcba
> > +part --source efibootguard-efi  --size 16M --extra-space 0 --
> > overhead-factor 1 --label efi   --align 1024 --part-type=EF00 -- 
> > active --sourceparams "signwith=/usr/bin/sign_secure_image.sh" -- 
> > fsuuid 0x4321dcba --uuid 0x5678dcba
> >  
> >  # EFI Boot Guard environment/config partitions plus Kernel files 
> > -part --source efibootguard-boot --size 32M --extra-space 0 -- 
> > overhead-factor 1 --label BOOT0 --align 1024 --part-type=0700 -- 
> > sourceparams "revision=2,signwith=/usr/bin/sign_secure_image.sh" -- 
> > fsuuid 0x4321dcbb -part --source efibootguard-boot --size 32M 
> > --extra-space 0 -- overhead-factor 1 --label BOOT1 --align 1024
> > --part-type=0700 -- sourceparams
> > "revision=1,signwith=/usr/bin/sign_secure_image.sh" -- fsuuid 
> > 0x4321dcbc
> > +part --source efibootguard-boot --size 32M --extra-space 0 --
> > overhead-factor 1 --label BOOT0 --align 1024 --part-type=0700 -- 
> > sourceparams "revision=2,signwith=/usr/bin/sign_secure_image.sh" -- 
> > fsuuid 0x4321dcbb --uuid 0x5678dcbb
> > +part --source efibootguard-boot --size 32M --extra-space 0 --
> > overhead-factor 1 --label BOOT1 --align 1024 --part-type=0700 -- 
> > sourceparams "revision=1,signwith=/usr/bin/sign_secure_image.sh" -- 
> > fsuuid 0x4321dcbc --uuid 0x5678dcbc diff --git a/wic/ebg- 
> > sysparts.inc b/wic/ebg-sysparts.inc index 300c36f..beb0903 100644
> > --- a/wic/ebg-sysparts.inc
> > +++ b/wic/ebg-sysparts.inc
> > @@ -1,8 +1,8 @@
> >  # default partition layout EFI Boot Guard usage
> >  
> >  # EFI partition containing efibootguard bootloader binary -part 
> > --source efibootguard-efi  --size 16M --extra-space 0 -- 
> > overhead-factor 1 --label efi   --align 1024 --part-type=EF00 -- 
> > active --fsuuid 0x4321dcba
> > +part --source efibootguard-efi  --size 16M --extra-space 0 --
> > overhead-factor 1 --label efi   --align 1024 --part-type=EF00 -- 
> > active --fsuuid 0x4321dcba --uuid 0x5678dcba
> >  
> >  # EFI Boot Guard environment/config partitions plus Kernel files 
> > -part --source efibootguard-boot --size 32M --extra-space 0 -- 
> > overhead-factor 1 --label BOOT0 --align 1024 --part-type=0700 -- 
> > sourceparams "revision=2" --fsuuid 0x4321dcbb -part --source 
> > efibootguard-boot --size 32M --extra-space 0 -- overhead-factor 1 
> > --label BOOT1 --align 1024 --part-type=0700 -- sourceparams 
> > "revision=1" --fsuuid 0x4321dcbc
> > +part --source efibootguard-boot --size 32M --extra-space 0 --
> > overhead-factor 1 --label BOOT0 --align 1024 --part-type=0700 -- 
> > sourceparams "revision=2" --fsuuid 0x4321dcbb --uuid 0x5678dcbb
> > +part --source efibootguard-boot --size 32M --extra-space 0 --
> > overhead-factor 1 --label BOOT1 --align 1024 --part-type=0700 -- 
> > sourceparams "revision=1" --fsuuid 0x4321dcbc --uuid 0x5678dcbc diff 
> > --git a/wic/hihope-rzg2m-efibootguard.wks.in b/wic/hihope-rzg2m- 
> > efibootguard.wks.in index 2ac8850..38581dd 100644
> > --- a/wic/hihope-rzg2m-efibootguard.wks.in
> > +++ b/wic/hihope-rzg2m-efibootguard.wks.in
> > @@ -8,7 +8,7 @@ part --source empty --align 1024 --fixed-size 1G -- 
> > uuid "${ABROOTFS_PART_UUID_B}
> >  
> >  # home and var are extra partitions
> >  
> > -part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> > fstype=ext4 --label home --align 1024  --size 1G --extra-space=100M
> > -
> > -fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
> > -part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> > fstype=ext4 --label var --align 1024  --size 2G --extra-space=100M
> > --
> > fsuuid 96be3374-4258-11ee-be56-0242ac120002
> > +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> > fstype=ext4 --label home --align 1024  --size 1G --extra-space=100M
> > -
> > -fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-
> > 11ee-be56-0242ac120002
> > +part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> > fstype=ext4 --label var --align 1024  --size 2G --extra-space=100M
> > --
> > fsuuid 96be3374-4258-11ee-be56-0242ac120002 --uuid 12343374-4258-
> > 11ee-be56-0242ac120002
> >  
> >  bootloader --ptable gpt --append="console=tty0
> > console=ttySC0,115200
> > rootwait earlyprintk"
> > diff --git a/wic/hihope-rzg2m.wks b/wic/hihope-rzg2m.wks index 
> > fd3a338..1bb8ced 100644
> > --- a/wic/hihope-rzg2m.wks
> > +++ b/wic/hihope-rzg2m.wks
> > @@ -9,7 +9,7 @@
> >  # SPDX-License-Identifier: MIT
> >  #
> >  
> > -part /boot --source bootimg-partition --ondisk mmcblk0 --fstype 
> > vfat --label boot --align 1 --size 32M --extra-space 0 --fsuuid 
> > 0x4321dcba
> > +part /boot --source bootimg-partition --ondisk mmcblk0 --fstype
> > vfat
> > --label boot --align 1 --size 32M --extra-space 0 --fsuuid 
> > 0x4321dcba --uuid 0x5678dcba
> >  
> >  # Rootfs partition
> > -part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label root
> > -
> > -align 1024 --size 2G --active --fsuuid 1f55d66a-40d8-11ee-be56-
> > 0242ac120002
> > +part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label root
> > -
> > -align 1024 --size 2G --active --fsuuid 1f55d66a-40d8-11ee-be56-
> > 0242ac120002 --uuid abcdd66a-40d8-11ee-be56-0242ac120002
> > diff --git a/wic/iwg20m.wks b/wic/iwg20m.wks index 85765f0..feea21e
> > 100644
> > --- a/wic/iwg20m.wks
> > +++ b/wic/iwg20m.wks
> > @@ -12,7 +12,7 @@
> >  # [Note] u-boot runs from an SPI memory device
> >  
> >  # SDCard Boot partition (copies files in IMAGE_BOOT_FILES: zImage 
> > and device tree) -part /boot --source bootimg-partition --ondisk
> > mmcblk0
> > --fstype vfat --label boot --align 1 --size 32M --extra-space 0 
> > --fsuuid 0x4321dcba
> > +part /boot --source bootimg-partition --ondisk mmcblk0 --fstype
> > vfat
> > --label boot --align 1 --size 32M --extra-space 0 --fsuuid 
> > 0x4321dcba --uuid 0x5678dcba
> >  
> >  # Rootfs partition
> > -part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label root
> > -
> > -align 1024 --size 2G --active --fsuuid 1f55d66a-40d8-11ee-be56-
> > 0242ac120002
> > +part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label root
> > -
> > -align 1024 --size 2G --active --fsuuid 1f55d66a-40d8-11ee-be56-
> > 0242ac120002 --uuid abcdd66a-40d8-11ee-be56-0242ac120002
> > diff --git a/wic/qemu-amd64-efibootguard-secureboot.wks.in
> > b/wic/qemu-amd64-efibootguard-secureboot.wks.in
> > index 2e5cb39..03c715b 100644
> > --- a/wic/qemu-amd64-efibootguard-secureboot.wks.in
> > +++ b/wic/qemu-amd64-efibootguard-secureboot.wks.in
> > @@ -4,7 +4,7 @@ part --source rawcopy --sourceparams 
> > "file=${IMAGE_FULLNAME}.verity" --align 102
> >  part --source empty --align 1024 --fixed-size 1G --uuid 
> > "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-
> > 3D69D8477DE4
> >  
> >  # home and var are extra partitions -part /home --source rootfs 
> > --rootfs-dir=${IMAGE_ROOTFS}/home --
> > fstype=ext4 --label home --align 1024 --size 1G --fsuuid 1f55d66a-
> > 40d8-11ee-be56-0242ac120002
> > -part /var  --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var  --
> > fstype=ext4 --label var  --align 1024 --size 2G --fsuuid 96be3374-
> > 4258-11ee-be56-0242ac120002
> > +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> > fstype=ext4 --label home --align 1024 --size 1G --fsuuid 1f55d66a-
> > 40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-
> > 0242ac120002
> > +part /var  --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var  --
> > fstype=ext4 --label var  --align 1024 --size 2G --fsuuid 96be3374-
> > 4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-
> > 0242ac120002
> >  
> >  bootloader --ptable gpt --append="console=tty0
> > console=ttyS0,115200
> > rootwait earlyprintk watchdog.handle_boot_enabled=0
> > iTCO_wdt.nowayout=1 panic=5"
> > diff --git a/wic/qemu-arm64-efibootguard-secureboot.wks.in
> > b/wic/qemu-arm64-efibootguard-secureboot.wks.in
> > index 2fc389c..ede1fd5 100644
> > --- a/wic/qemu-arm64-efibootguard-secureboot.wks.in
> > +++ b/wic/qemu-arm64-efibootguard-secureboot.wks.in
> > @@ -4,7 +4,7 @@ part --source rawcopy --sourceparams 
> > "file=${IMAGE_FULLNAME}.verity" --align 102
> >  part --source empty --align 1024 --fixed-size 1G --uuid 
> > "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-
> > 3D69D8477DE4
> >  
> >  # home and var are extra partitions -part /home --source rootfs 
> > --rootfs-dir=${IMAGE_ROOTFS}/home --
> > fstype=ext4 --label home --align 1024 --size 1G --fsuuid 1f55d66a-
> > 40d8-11ee-be56-0242ac120002
> > -part /var  --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var  --
> > fstype=ext4 --label var  --align 1024 --size 2G --fsuuid 96be3374-
> > 4258-11ee-be56-0242ac120002
> > +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> > fstype=ext4 --label home --align 1024 --size 1G --fsuuid 1f55d66a-
> > 40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-
> > 0242ac120002
> > +part /var  --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var  --
> > fstype=ext4 --label var  --align 1024 --size 2G --fsuuid 96be3374-
> > 4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-
> > 0242ac120002
> >  
> >  bootloader --ptable gpt --append="panic=5"
> > diff --git a/wic/qemu-arm64-efibootguard.wks.in b/wic/qemu-arm64- 
> > efibootguard.wks.in index 1f50ba3..bf58e1c 100644
> > --- a/wic/qemu-arm64-efibootguard.wks.in
> > +++ b/wic/qemu-arm64-efibootguard.wks.in
> > @@ -7,7 +7,7 @@ part --source rawcopy --sourceparams 
> > "file=${IMAGE_FULLNAME}.squashfs" --align 1
> >  part --source empty --align 1024 --fixed-size 1G --uuid 
> > "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-
> > 3D69D8477DE4
> >  
> >  # home and var are extra partitions -part /home --source rootfs 
> > --rootfs-dir=${IMAGE_ROOTFS}/home --
> > fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-
> > 40d8-11ee-be56-0242ac120002
> > -part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> > fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-
> > 4258-11ee-be56-0242ac120002
> > +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> > fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-
> > 40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-
> > 0242ac120002
> > +part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> > fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-
> > 4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-
> > 0242ac120002
> >  
> >  bootloader --ptable gpt
> > diff --git a/wic/qemu-riscv64-efibootguard.wks.in b/wic/qemu-
> > riscv64-
> > efibootguard.wks.in index 9158aa4..b37c971 100644
> > --- a/wic/qemu-riscv64-efibootguard.wks.in
> > +++ b/wic/qemu-riscv64-efibootguard.wks.in
> > @@ -7,7 +7,7 @@ part --source rawcopy --sourceparams 
> > "file=${IMAGE_FULLNAME}.squashfs" --align 1
> >  part --source empty --align 1024 --fixed-size 1G --uuid 
> > "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-
> > 3D69D8477DE4
> >  
> >  # home and var are extra partitions -part /home --source rootfs 
> > --rootfs-dir=${IMAGE_ROOTFS}/home --
> > fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-
> > 40d8-11ee-be56-0242ac120002
> > -part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> > fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-
> > 4258-11ee-be56-0242ac120002
> > +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> > fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-
> > 40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-
> > 0242ac120002
> > +part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> > fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-
> > 4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-
> > 0242ac120002
> >  
> >  bootloader --ptable gpt
> > diff --git a/wic/x86-efibootguard.wks.in b/wic/x86- 
> > efibootguard.wks.in index 98e8da5..b002ea5 100644
> > --- a/wic/x86-efibootguard.wks.in
> > +++ b/wic/x86-efibootguard.wks.in
> > @@ -8,7 +8,7 @@ part --source empty --align 1024 --fixed-size 1G -- 
> > uuid "${ABROOTFS_PART_UUID_B}
> >  
> >  # home and var are extra partitions
> >  
> > -part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> > fstype=ext4 --label home --align 1024  --size 1G --extra-space=100M
> > -
> > -fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
> > -part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> > fstype=ext4 --label var --align 1024  --size 2G --extra-space=100M
> > --
> > fsuuid 96be3374-4258-11ee-be56-0242ac120002
> > +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> > fstype=ext4 --label home --align 1024  --size 1G --extra-space=100M
> > -
> > -fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-
> > 11ee-be56-0242ac120002
> > +part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> > fstype=ext4 --label var --align 1024  --size 2G --extra-space=100M
> > --
> > fsuuid 96be3374-4258-11ee-be56-0242ac120002 --uuid 12343374-4258-
> > 11ee-be56-0242ac120002
> >  
> >  bootloader --ptable gpt --append="console=tty0
> > console=ttyS0,115200
> > rootwait earlyprintk watchdog.handle_boot_enabled=0
> > iTCO_wdt.nowayout=1 "
> > diff --git a/wic/x86_64-generic.wks b/wic/x86_64-generic.wks index
> > 1a44e26..a63f7f3 100644
> > --- a/wic/x86_64-generic.wks
> > +++ b/wic/x86_64-generic.wks
> > @@ -6,8 +6,8 @@
> >  # SPDX-License-Identifier: MIT
> >  #
> >  
> > -part /boot --source bootimg-efi-isar --sourceparams "loader=grub- 
> > efi" --label efi --part-type EF00 --align 1024 --fsuuid 0x4321dcba
> > +part /boot --source bootimg-efi-isar --sourceparams "loader=grub-
> > efi" --label efi --part-type EF00 --align 1024 --fsuuid 0x4321dcba
> > --
> > uuid 0x5678dcba
> >  
> > -part / --source rootfs --fstype ext4 --mkfs-extraopts "-T default"
> > -
> > -label platform --align 1024 --fsuuid 1f55d66a-40d8-11ee-be56-
> > 0242ac120002
> > +part / --source rootfs --fstype ext4 --mkfs-extraopts "-T default"
> > -
> > -label platform --align 1024 --fsuuid 1f55d66a-40d8-11ee-be56-
> > 0242ac120002 --uuid abcdd66a-40d8-11ee-be56-0242ac120002
> >  
> >  bootloader --ptable gpt --timeout 2 --append "console=ttyS0,115200"
> 
> --
> Siemens AG, Technology
> Linux Expert Center
> 
> 

--
Siemens AG, Technology
Linux Expert Center
MOESSBAUER, Felix Jan. 30, 2024, 8:22 a.m. UTC | #6
On Tue, 2024-01-30 at 05:23 +0000, Adithya.Balakumar@toshiba-tsip.com
wrote:
> Hi Felix,
>  
> Thanks for the clarification. Just a minor clarification regarding
> adding a note about using fresh UUIDs for production images.
> Would it be ok to add a note stating "For Production images, it is
> recommended to use fresh UUID's and not default ones" in the
> README.md file under the "Building Target Images" section or add a
> note in each .wks file.

Hi, sure! I guess that's a good place to add it.

In the end it is about expectation management. For testing it does not
matter so much, but when building a product these UUIDs should be
changed - as you said.

Happy Coding!
Felix

> 
> Would like to know your opinion on this.
>  
> Thanks and Regards,
> Adithya Balakumar
> 
> -----Original Message-----
> From: MOESSBAUER, Felix <felix.moessbauer@siemens.com> 
> Sent: Wednesday, January 24, 2024 1:30 PM
> To: cip-dev@lists.cip-project.org; balakumar adithya(TSIP TEUR)
> <Adithya.Balakumar@toshiba-tsip.com>; Kiszka, Jan
> <jan.kiszka@siemens.com>
> Cc: kunijadar shivanand(TSIP TMIEC ODG Porting)
> <Shivanand.Kunijadar@toshiba-tsip.com>; ashrith sai(TSIP)
> <Sai.Sathujoda@toshiba-tsip.com>; dinesh kumar(TSIP TMIEC ODG
> Porting) <dinesh.kumar@toshiba-tsip.com>; hayashi kazuhiro(林 和宏 DME
> ○DIG□MPS○MP4) <kazuhiro3.hayashi@toshiba.co.jp>
> Subject: Re: [isar-cip-core][PATCH v1] wic: Set fixed partition UUID
> values
> 
> On Wed, 2024-01-24 at 06:03 +0000, Adithya.Balakumar@toshiba-tsip.com
> wrote:
> > Hi Felix,
> > 
> > Thanks for your comment. Will send out a v2 of the patch. I would
> > like 
> > to ask a small clarification about your comments?
> > 
> > As for the part "Can we please use unique UUIDs across all devices 
> > (not always the same).", I understand this. Will set unique UUIDs 
> > across all devices.
> > 
> > However, could you please elaborate on the second part of your
> > comment: 
> > "Also it would be nice to add a note somewhere that these UUIDs
> > should 
> > be changed in case the user creates an image for flashing and one
> > for 
> > the target (which is quite common). Here, the UUIDs would collide."
> 
> A common use-case is the creation of two images (either from the same
> build or two separate ones): One image is for flashing the image onto
> the target, the other one is the image for the target (i.e. the image
> you want to run on the target). If both the installer (for flashing)
> and the target image use the same partition UUIDs, you will get
> collisions once the partition table is re-read.
> 
> To circumvent this, both images need to use distinct UUIDs for the
> partitions. As this is hard to achieve with our pre-defined .wks
> files, a note somewhere would be good.
> 
> For product development I anyways recommend to use fresh UUIDs and
> not the default ones.
> 
> Best regards,
> Felix
> 
> > 
> > Thanks and Regards,
> > Adithya Balakumar
> > 
> > -----Original Message-----
> > From: MOESSBAUER, Felix <felix.moessbauer@siemens.com>
> > Sent: Tuesday, January 23, 2024 3:02 PM
> > To: cip-dev@lists.cip-project.org; balakumar adithya(TSIP TEUR) 
> > <Adithya.Balakumar@toshiba-tsip.com>; Kiszka, Jan 
> > <jan.kiszka@siemens.com>
> > Cc: kunijadar shivanand(TSIP TMIEC ODG Porting) 
> > <Shivanand.Kunijadar@toshiba-tsip.com>; ashrith sai(TSIP)
> > <Sai.Sathujoda@toshiba-tsip.com>; dinesh kumar(TSIP TMIEC ODG
> > Porting) <dinesh.kumar@toshiba-tsip.com>; hayashi kazuhiro(林 和宏 DME
> > ○DIG□MPS○MP4) <kazuhiro3.hayashi@toshiba.co.jp>
> > Subject: Re: [isar-cip-core][PATCH v1] wic: Set fixed partition
> > UUID 
> > values
> > 
> > On Mon, 2024-01-22 at 17:45 +0530, Adithya Balakumar wrote:
> > > From: Adithya Balakumar <adithya.balakumar@toshiba-tsip.com>
> > > 
> > > This commit sets fixed partition uuid for partitions. The --uuid 
> > > option in wic allows to set fixed uuid for a partition. This is 
> > > required for generating reproducible images.
> > 
> > Thanks for this patch. Just a minor note:
> > 
> > Can we please use unique UUIDs across all devices (not always the 
> > same). Also it would be nice to add a note somewhere that these
> > UUIDs 
> > should be changed in case the user creates an image for flashing
> > and 
> > one for the target (which is quite common). Here, the UUIDs would 
> > collide.
> > 
> > Felix
> > 
> > > 
> > > Signed-off-by: Adithya Balakumar
> > > <adithya.balakumar@toshiba-tsip.com>
> > > ---
> > >  wic/bbb-efibootguard.wks.in                   | 4 ++--
> > >  wic/bbb.wks                                   | 2 +-
> > >  wic/ebg-signed-sysparts.inc                   | 6 +++---
> > >  wic/ebg-sysparts.inc                          | 6 +++---
> > >  wic/hihope-rzg2m-efibootguard.wks.in          | 4 ++--
> > >  wic/hihope-rzg2m.wks                          | 4 ++--
> > >  wic/iwg20m.wks                                | 4 ++--
> > >  wic/qemu-amd64-efibootguard-secureboot.wks.in | 4 ++--
> > >  wic/qemu-arm64-efibootguard-secureboot.wks.in | 4 ++--
> > >  wic/qemu-arm64-efibootguard.wks.in            | 4 ++--
> > >  wic/qemu-riscv64-efibootguard.wks.in          | 4 ++--
> > >  wic/x86-efibootguard.wks.in                   | 4 ++--
> > >  wic/x86_64-generic.wks                        | 4 ++--
> > >  13 files changed, 27 insertions(+), 27 deletions(-)
> > > 
> > > diff --git a/wic/bbb-efibootguard.wks.in b/wic/bbb- 
> > > efibootguard.wks.in index 48789c7..123f86b 100644
> > > --- a/wic/bbb-efibootguard.wks.in
> > > +++ b/wic/bbb-efibootguard.wks.in
> > > @@ -15,7 +15,7 @@ part --source rawcopy --sourceparams 
> > > "file=${IMAGE_FULLNAME}.squashfs" --align 1
> > >  part --source empty --align 1024 --fixed-size 1G --uuid 
> > > "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-
> > > 3D69D8477DE4
> > >  
> > >  # home and var are extra partitions -part /home --source rootfs 
> > > --rootfs-dir=${IMAGE_ROOTFS}/home --
> > > fstype=ext4 --label home --align 1024  --size 1G --fsuuid
> > > 1f55d66a-
> > > 40d8-11ee-be56-0242ac120002
> > > -part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> > > fstype=ext4 --label var --align 1024  --size 2G --fsuuid
> > > 96be3374-
> > > 4258-11ee-be56-0242ac120002
> > > +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> > > fstype=ext4 --label home --align 1024  --size 1G --fsuuid
> > > 1f55d66a-
> > > 40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-
> > > 0242ac120002
> > > +part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> > > fstype=ext4 --label var --align 1024  --size 2G --fsuuid
> > > 96be3374-
> > > 4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-
> > > 0242ac120002
> > >  
> > >  bootloader --ptable gpt --append="rootwait console=ttyO0,115200
> > > omap_wdt.early_enable=1 omap_wdt.nowayout=1 
> > > watchdog.handle_boot_enabled=0"
> > > diff --git a/wic/bbb.wks b/wic/bbb.wks index a797e95..03939b4
> > > 100644
> > > --- a/wic/bbb.wks
> > > +++ b/wic/bbb.wks
> > > @@ -9,6 +9,6 @@
> > >  part --source rawcopy --sourceparams "file=/usr/lib/u- 
> > > boot/bbb/MLO"
> > > --no-table --align 128
> > >  part --source rawcopy --sourceparams "file=/usr/lib/u-
> > > boot/bbb/u- 
> > > boot.img" --no-table --align 384
> > >  
> > > -part / --source rootfs-u-boot --ondisk mmcblk0 --fstype ext4 --
> > > mkfs-
> > > extraopts "-T default" --label platform --align 1024 --active -- 
> > > fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
> > > +part / --source rootfs-u-boot --ondisk mmcblk0 --fstype ext4 --
> > > mkfs-
> > > extraopts "-T default" --label platform --align 1024 --active -- 
> > > fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-
> > > 11ee-be56-0242ac120002
> > >  
> > >  bootloader --append "rootwait console=ttyO0,115200"
> > > diff --git a/wic/ebg-signed-sysparts.inc b/wic/ebg-signed- 
> > > sysparts.inc index b2340e2..0c339fc 100644
> > > --- a/wic/ebg-signed-sysparts.inc
> > > +++ b/wic/ebg-signed-sysparts.inc
> > > @@ -1,8 +1,8 @@
> > >  # default partition layout EFI Boot Guard usage, signed version
> > >  
> > >  # EFI partition containing efibootguard bootloader binary -part 
> > > --source efibootguard-efi  --size 16M --extra-space 0 -- 
> > > overhead-factor 1 --label efi   --align 1024 --part-type=EF00 -- 
> > > active --sourceparams "signwith=/usr/bin/sign_secure_image.sh" --
> > > fsuuid 0x4321dcba
> > > +part --source efibootguard-efi  --size 16M --extra-space 0 --
> > > overhead-factor 1 --label efi   --align 1024 --part-type=EF00 -- 
> > > active --sourceparams "signwith=/usr/bin/sign_secure_image.sh" --
> > > fsuuid 0x4321dcba --uuid 0x5678dcba
> > >  
> > >  # EFI Boot Guard environment/config partitions plus Kernel files
> > > -part --source efibootguard-boot --size 32M --extra-space 0 -- 
> > > overhead-factor 1 --label BOOT0 --align 1024 --part-type=0700 -- 
> > > sourceparams "revision=2,signwith=/usr/bin/sign_secure_image.sh"
> > > -- 
> > > fsuuid 0x4321dcbb -part --source efibootguard-boot --size 32M 
> > > --extra-space 0 -- overhead-factor 1 --label BOOT1 --align 1024
> > > --part-type=0700 -- sourceparams
> > > "revision=1,signwith=/usr/bin/sign_secure_image.sh" -- fsuuid 
> > > 0x4321dcbc
> > > +part --source efibootguard-boot --size 32M --extra-space 0 --
> > > overhead-factor 1 --label BOOT0 --align 1024 --part-type=0700 -- 
> > > sourceparams "revision=2,signwith=/usr/bin/sign_secure_image.sh"
> > > -- 
> > > fsuuid 0x4321dcbb --uuid 0x5678dcbb
> > > +part --source efibootguard-boot --size 32M --extra-space 0 --
> > > overhead-factor 1 --label BOOT1 --align 1024 --part-type=0700 -- 
> > > sourceparams "revision=1,signwith=/usr/bin/sign_secure_image.sh"
> > > -- 
> > > fsuuid 0x4321dcbc --uuid 0x5678dcbc diff --git a/wic/ebg- 
> > > sysparts.inc b/wic/ebg-sysparts.inc index 300c36f..beb0903 100644
> > > --- a/wic/ebg-sysparts.inc
> > > +++ b/wic/ebg-sysparts.inc
> > > @@ -1,8 +1,8 @@
> > >  # default partition layout EFI Boot Guard usage
> > >  
> > >  # EFI partition containing efibootguard bootloader binary -part 
> > > --source efibootguard-efi  --size 16M --extra-space 0 -- 
> > > overhead-factor 1 --label efi   --align 1024 --part-type=EF00 -- 
> > > active --fsuuid 0x4321dcba
> > > +part --source efibootguard-efi  --size 16M --extra-space 0 --
> > > overhead-factor 1 --label efi   --align 1024 --part-type=EF00 -- 
> > > active --fsuuid 0x4321dcba --uuid 0x5678dcba
> > >  
> > >  # EFI Boot Guard environment/config partitions plus Kernel files
> > > -part --source efibootguard-boot --size 32M --extra-space 0 -- 
> > > overhead-factor 1 --label BOOT0 --align 1024 --part-type=0700 -- 
> > > sourceparams "revision=2" --fsuuid 0x4321dcbb -part --source 
> > > efibootguard-boot --size 32M --extra-space 0 -- overhead-factor 1
> > > --label BOOT1 --align 1024 --part-type=0700 -- sourceparams 
> > > "revision=1" --fsuuid 0x4321dcbc
> > > +part --source efibootguard-boot --size 32M --extra-space 0 --
> > > overhead-factor 1 --label BOOT0 --align 1024 --part-type=0700 -- 
> > > sourceparams "revision=2" --fsuuid 0x4321dcbb --uuid 0x5678dcbb
> > > +part --source efibootguard-boot --size 32M --extra-space 0 --
> > > overhead-factor 1 --label BOOT1 --align 1024 --part-type=0700 -- 
> > > sourceparams "revision=1" --fsuuid 0x4321dcbc --uuid 0x5678dcbc
> > > diff 
> > > --git a/wic/hihope-rzg2m-efibootguard.wks.in b/wic/hihope-rzg2m- 
> > > efibootguard.wks.in index 2ac8850..38581dd 100644
> > > --- a/wic/hihope-rzg2m-efibootguard.wks.in
> > > +++ b/wic/hihope-rzg2m-efibootguard.wks.in
> > > @@ -8,7 +8,7 @@ part --source empty --align 1024 --fixed-size 1G
> > > -- 
> > > uuid "${ABROOTFS_PART_UUID_B}
> > >  
> > >  # home and var are extra partitions
> > >  
> > > -part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> > > fstype=ext4 --label home --align 1024  --size 1G --extra-
> > > space=100M
> > > -
> > > -fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
> > > -part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> > > fstype=ext4 --label var --align 1024  --size 2G --extra-
> > > space=100M
> > > --
> > > fsuuid 96be3374-4258-11ee-be56-0242ac120002
> > > +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> > > fstype=ext4 --label home --align 1024  --size 1G --extra-
> > > space=100M
> > > -
> > > -fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid abcdd66a-
> > > 40d8-
> > > 11ee-be56-0242ac120002
> > > +part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> > > fstype=ext4 --label var --align 1024  --size 2G --extra-
> > > space=100M
> > > --
> > > fsuuid 96be3374-4258-11ee-be56-0242ac120002 --uuid 12343374-4258-
> > > 11ee-be56-0242ac120002
> > >  
> > >  bootloader --ptable gpt --append="console=tty0
> > > console=ttySC0,115200
> > > rootwait earlyprintk"
> > > diff --git a/wic/hihope-rzg2m.wks b/wic/hihope-rzg2m.wks index 
> > > fd3a338..1bb8ced 100644
> > > --- a/wic/hihope-rzg2m.wks
> > > +++ b/wic/hihope-rzg2m.wks
> > > @@ -9,7 +9,7 @@
> > >  # SPDX-License-Identifier: MIT
> > >  #
> > >  
> > > -part /boot --source bootimg-partition --ondisk mmcblk0 --fstype 
> > > vfat --label boot --align 1 --size 32M --extra-space 0 --fsuuid 
> > > 0x4321dcba
> > > +part /boot --source bootimg-partition --ondisk mmcblk0 --fstype
> > > vfat
> > > --label boot --align 1 --size 32M --extra-space 0 --fsuuid 
> > > 0x4321dcba --uuid 0x5678dcba
> > >  
> > >  # Rootfs partition
> > > -part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label
> > > root
> > > -
> > > -align 1024 --size 2G --active --fsuuid 1f55d66a-40d8-11ee-be56-
> > > 0242ac120002
> > > +part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label
> > > root
> > > -
> > > -align 1024 --size 2G --active --fsuuid 1f55d66a-40d8-11ee-be56-
> > > 0242ac120002 --uuid abcdd66a-40d8-11ee-be56-0242ac120002
> > > diff --git a/wic/iwg20m.wks b/wic/iwg20m.wks index
> > > 85765f0..feea21e
> > > 100644
> > > --- a/wic/iwg20m.wks
> > > +++ b/wic/iwg20m.wks
> > > @@ -12,7 +12,7 @@
> > >  # [Note] u-boot runs from an SPI memory device
> > >  
> > >  # SDCard Boot partition (copies files in IMAGE_BOOT_FILES:
> > > zImage 
> > > and device tree) -part /boot --source bootimg-partition --ondisk
> > > mmcblk0
> > > --fstype vfat --label boot --align 1 --size 32M --extra-space 0 
> > > --fsuuid 0x4321dcba
> > > +part /boot --source bootimg-partition --ondisk mmcblk0 --fstype
> > > vfat
> > > --label boot --align 1 --size 32M --extra-space 0 --fsuuid 
> > > 0x4321dcba --uuid 0x5678dcba
> > >  
> > >  # Rootfs partition
> > > -part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label
> > > root
> > > -
> > > -align 1024 --size 2G --active --fsuuid 1f55d66a-40d8-11ee-be56-
> > > 0242ac120002
> > > +part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label
> > > root
> > > -
> > > -align 1024 --size 2G --active --fsuuid 1f55d66a-40d8-11ee-be56-
> > > 0242ac120002 --uuid abcdd66a-40d8-11ee-be56-0242ac120002
> > > diff --git a/wic/qemu-amd64-efibootguard-secureboot.wks.in
> > > b/wic/qemu-amd64-efibootguard-secureboot.wks.in
> > > index 2e5cb39..03c715b 100644
> > > --- a/wic/qemu-amd64-efibootguard-secureboot.wks.in
> > > +++ b/wic/qemu-amd64-efibootguard-secureboot.wks.in
> > > @@ -4,7 +4,7 @@ part --source rawcopy --sourceparams 
> > > "file=${IMAGE_FULLNAME}.verity" --align 102
> > >  part --source empty --align 1024 --fixed-size 1G --uuid 
> > > "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-
> > > 3D69D8477DE4
> > >  
> > >  # home and var are extra partitions -part /home --source rootfs 
> > > --rootfs-dir=${IMAGE_ROOTFS}/home --
> > > fstype=ext4 --label home --align 1024 --size 1G --fsuuid
> > > 1f55d66a-
> > > 40d8-11ee-be56-0242ac120002
> > > -part /var  --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var  --
> > > fstype=ext4 --label var  --align 1024 --size 2G --fsuuid
> > > 96be3374-
> > > 4258-11ee-be56-0242ac120002
> > > +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> > > fstype=ext4 --label home --align 1024 --size 1G --fsuuid
> > > 1f55d66a-
> > > 40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-
> > > 0242ac120002
> > > +part /var  --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var  --
> > > fstype=ext4 --label var  --align 1024 --size 2G --fsuuid
> > > 96be3374-
> > > 4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-
> > > 0242ac120002
> > >  
> > >  bootloader --ptable gpt --append="console=tty0
> > > console=ttyS0,115200
> > > rootwait earlyprintk watchdog.handle_boot_enabled=0
> > > iTCO_wdt.nowayout=1 panic=5"
> > > diff --git a/wic/qemu-arm64-efibootguard-secureboot.wks.in
> > > b/wic/qemu-arm64-efibootguard-secureboot.wks.in
> > > index 2fc389c..ede1fd5 100644
> > > --- a/wic/qemu-arm64-efibootguard-secureboot.wks.in
> > > +++ b/wic/qemu-arm64-efibootguard-secureboot.wks.in
> > > @@ -4,7 +4,7 @@ part --source rawcopy --sourceparams 
> > > "file=${IMAGE_FULLNAME}.verity" --align 102
> > >  part --source empty --align 1024 --fixed-size 1G --uuid 
> > > "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-
> > > 3D69D8477DE4
> > >  
> > >  # home and var are extra partitions -part /home --source rootfs 
> > > --rootfs-dir=${IMAGE_ROOTFS}/home --
> > > fstype=ext4 --label home --align 1024 --size 1G --fsuuid
> > > 1f55d66a-
> > > 40d8-11ee-be56-0242ac120002
> > > -part /var  --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var  --
> > > fstype=ext4 --label var  --align 1024 --size 2G --fsuuid
> > > 96be3374-
> > > 4258-11ee-be56-0242ac120002
> > > +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> > > fstype=ext4 --label home --align 1024 --size 1G --fsuuid
> > > 1f55d66a-
> > > 40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-
> > > 0242ac120002
> > > +part /var  --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var  --
> > > fstype=ext4 --label var  --align 1024 --size 2G --fsuuid
> > > 96be3374-
> > > 4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-
> > > 0242ac120002
> > >  
> > >  bootloader --ptable gpt --append="panic=5"
> > > diff --git a/wic/qemu-arm64-efibootguard.wks.in b/wic/qemu-arm64-
> > > efibootguard.wks.in index 1f50ba3..bf58e1c 100644
> > > --- a/wic/qemu-arm64-efibootguard.wks.in
> > > +++ b/wic/qemu-arm64-efibootguard.wks.in
> > > @@ -7,7 +7,7 @@ part --source rawcopy --sourceparams 
> > > "file=${IMAGE_FULLNAME}.squashfs" --align 1
> > >  part --source empty --align 1024 --fixed-size 1G --uuid 
> > > "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-
> > > 3D69D8477DE4
> > >  
> > >  # home and var are extra partitions -part /home --source rootfs 
> > > --rootfs-dir=${IMAGE_ROOTFS}/home --
> > > fstype=ext4 --label home --align 1024  --size 1G --fsuuid
> > > 1f55d66a-
> > > 40d8-11ee-be56-0242ac120002
> > > -part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> > > fstype=ext4 --label var --align 1024  --size 2G --fsuuid
> > > 96be3374-
> > > 4258-11ee-be56-0242ac120002
> > > +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> > > fstype=ext4 --label home --align 1024  --size 1G --fsuuid
> > > 1f55d66a-
> > > 40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-
> > > 0242ac120002
> > > +part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> > > fstype=ext4 --label var --align 1024  --size 2G --fsuuid
> > > 96be3374-
> > > 4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-
> > > 0242ac120002
> > >  
> > >  bootloader --ptable gpt
> > > diff --git a/wic/qemu-riscv64-efibootguard.wks.in b/wic/qemu-
> > > riscv64-
> > > efibootguard.wks.in index 9158aa4..b37c971 100644
> > > --- a/wic/qemu-riscv64-efibootguard.wks.in
> > > +++ b/wic/qemu-riscv64-efibootguard.wks.in
> > > @@ -7,7 +7,7 @@ part --source rawcopy --sourceparams 
> > > "file=${IMAGE_FULLNAME}.squashfs" --align 1
> > >  part --source empty --align 1024 --fixed-size 1G --uuid 
> > > "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-
> > > 3D69D8477DE4
> > >  
> > >  # home and var are extra partitions -part /home --source rootfs 
> > > --rootfs-dir=${IMAGE_ROOTFS}/home --
> > > fstype=ext4 --label home --align 1024  --size 1G --fsuuid
> > > 1f55d66a-
> > > 40d8-11ee-be56-0242ac120002
> > > -part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> > > fstype=ext4 --label var --align 1024  --size 2G --fsuuid
> > > 96be3374-
> > > 4258-11ee-be56-0242ac120002
> > > +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> > > fstype=ext4 --label home --align 1024  --size 1G --fsuuid
> > > 1f55d66a-
> > > 40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-
> > > 0242ac120002
> > > +part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> > > fstype=ext4 --label var --align 1024  --size 2G --fsuuid
> > > 96be3374-
> > > 4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-
> > > 0242ac120002
> > >  
> > >  bootloader --ptable gpt
> > > diff --git a/wic/x86-efibootguard.wks.in b/wic/x86- 
> > > efibootguard.wks.in index 98e8da5..b002ea5 100644
> > > --- a/wic/x86-efibootguard.wks.in
> > > +++ b/wic/x86-efibootguard.wks.in
> > > @@ -8,7 +8,7 @@ part --source empty --align 1024 --fixed-size 1G
> > > -- 
> > > uuid "${ABROOTFS_PART_UUID_B}
> > >  
> > >  # home and var are extra partitions
> > >  
> > > -part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> > > fstype=ext4 --label home --align 1024  --size 1G --extra-
> > > space=100M
> > > -
> > > -fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
> > > -part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> > > fstype=ext4 --label var --align 1024  --size 2G --extra-
> > > space=100M
> > > --
> > > fsuuid 96be3374-4258-11ee-be56-0242ac120002
> > > +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --
> > > fstype=ext4 --label home --align 1024  --size 1G --extra-
> > > space=100M
> > > -
> > > -fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid abcdd66a-
> > > 40d8-
> > > 11ee-be56-0242ac120002
> > > +part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --
> > > fstype=ext4 --label var --align 1024  --size 2G --extra-
> > > space=100M
> > > --
> > > fsuuid 96be3374-4258-11ee-be56-0242ac120002 --uuid 12343374-4258-
> > > 11ee-be56-0242ac120002
> > >  
> > >  bootloader --ptable gpt --append="console=tty0
> > > console=ttyS0,115200
> > > rootwait earlyprintk watchdog.handle_boot_enabled=0
> > > iTCO_wdt.nowayout=1 "
> > > diff --git a/wic/x86_64-generic.wks b/wic/x86_64-generic.wks
> > > index
> > > 1a44e26..a63f7f3 100644
> > > --- a/wic/x86_64-generic.wks
> > > +++ b/wic/x86_64-generic.wks
> > > @@ -6,8 +6,8 @@
> > >  # SPDX-License-Identifier: MIT
> > >  #
> > >  
> > > -part /boot --source bootimg-efi-isar --sourceparams
> > > "loader=grub- 
> > > efi" --label efi --part-type EF00 --align 1024 --fsuuid
> > > 0x4321dcba
> > > +part /boot --source bootimg-efi-isar --sourceparams
> > > "loader=grub-
> > > efi" --label efi --part-type EF00 --align 1024 --fsuuid
> > > 0x4321dcba
> > > --
> > > uuid 0x5678dcba
> > >  
> > > -part / --source rootfs --fstype ext4 --mkfs-extraopts "-T
> > > default"
> > > -
> > > -label platform --align 1024 --fsuuid 1f55d66a-40d8-11ee-be56-
> > > 0242ac120002
> > > +part / --source rootfs --fstype ext4 --mkfs-extraopts "-T
> > > default"
> > > -
> > > -label platform --align 1024 --fsuuid 1f55d66a-40d8-11ee-be56-
> > > 0242ac120002 --uuid abcdd66a-40d8-11ee-be56-0242ac120002
> > >  
> > >  bootloader --ptable gpt --timeout 2 --append
> > > "console=ttyS0,115200"
> > 
> > --
> > Siemens AG, Technology
> > Linux Expert Center
> > 
> > 
> 
> --
> Siemens AG, Technology
> Linux Expert Center
> 
>
diff mbox series

Patch

diff --git a/wic/bbb-efibootguard.wks.in b/wic/bbb-efibootguard.wks.in
index 48789c7..123f86b 100644
--- a/wic/bbb-efibootguard.wks.in
+++ b/wic/bbb-efibootguard.wks.in
@@ -15,7 +15,7 @@  part --source rawcopy --sourceparams "file=${IMAGE_FULLNAME}.squashfs" --align 1
 part --source empty --align 1024 --fixed-size 1G --uuid "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-3D69D8477DE4
 
 # home and var are extra partitions
-part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
-part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-4258-11ee-be56-0242ac120002
+part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-0242ac120002
+part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-0242ac120002
 
 bootloader --ptable gpt --append="rootwait console=ttyO0,115200 omap_wdt.early_enable=1 omap_wdt.nowayout=1 watchdog.handle_boot_enabled=0"
diff --git a/wic/bbb.wks b/wic/bbb.wks
index a797e95..03939b4 100644
--- a/wic/bbb.wks
+++ b/wic/bbb.wks
@@ -9,6 +9,6 @@ 
 part --source rawcopy --sourceparams "file=/usr/lib/u-boot/bbb/MLO" --no-table --align 128
 part --source rawcopy --sourceparams "file=/usr/lib/u-boot/bbb/u-boot.img" --no-table --align 384
 
-part / --source rootfs-u-boot --ondisk mmcblk0 --fstype ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --active --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
+part / --source rootfs-u-boot --ondisk mmcblk0 --fstype ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --active --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-0242ac120002
 
 bootloader --append "rootwait console=ttyO0,115200"
diff --git a/wic/ebg-signed-sysparts.inc b/wic/ebg-signed-sysparts.inc
index b2340e2..0c339fc 100644
--- a/wic/ebg-signed-sysparts.inc
+++ b/wic/ebg-signed-sysparts.inc
@@ -1,8 +1,8 @@ 
 # default partition layout EFI Boot Guard usage, signed version
 
 # EFI partition containing efibootguard bootloader binary
-part --source efibootguard-efi  --size 16M --extra-space 0 --overhead-factor 1 --label efi   --align 1024 --part-type=EF00 --active --sourceparams "signwith=/usr/bin/sign_secure_image.sh" --fsuuid 0x4321dcba
+part --source efibootguard-efi  --size 16M --extra-space 0 --overhead-factor 1 --label efi   --align 1024 --part-type=EF00 --active --sourceparams "signwith=/usr/bin/sign_secure_image.sh" --fsuuid 0x4321dcba --uuid 0x5678dcba
 
 # EFI Boot Guard environment/config partitions plus Kernel files
-part --source efibootguard-boot --size 32M --extra-space 0 --overhead-factor 1 --label BOOT0 --align 1024 --part-type=0700 --sourceparams "revision=2,signwith=/usr/bin/sign_secure_image.sh" --fsuuid 0x4321dcbb
-part --source efibootguard-boot --size 32M --extra-space 0 --overhead-factor 1 --label BOOT1 --align 1024 --part-type=0700 --sourceparams "revision=1,signwith=/usr/bin/sign_secure_image.sh" --fsuuid 0x4321dcbc
+part --source efibootguard-boot --size 32M --extra-space 0 --overhead-factor 1 --label BOOT0 --align 1024 --part-type=0700 --sourceparams "revision=2,signwith=/usr/bin/sign_secure_image.sh" --fsuuid 0x4321dcbb --uuid 0x5678dcbb
+part --source efibootguard-boot --size 32M --extra-space 0 --overhead-factor 1 --label BOOT1 --align 1024 --part-type=0700 --sourceparams "revision=1,signwith=/usr/bin/sign_secure_image.sh" --fsuuid 0x4321dcbc --uuid 0x5678dcbc
diff --git a/wic/ebg-sysparts.inc b/wic/ebg-sysparts.inc
index 300c36f..beb0903 100644
--- a/wic/ebg-sysparts.inc
+++ b/wic/ebg-sysparts.inc
@@ -1,8 +1,8 @@ 
 # default partition layout EFI Boot Guard usage
 
 # EFI partition containing efibootguard bootloader binary
-part --source efibootguard-efi  --size 16M --extra-space 0 --overhead-factor 1 --label efi   --align 1024 --part-type=EF00 --active --fsuuid 0x4321dcba
+part --source efibootguard-efi  --size 16M --extra-space 0 --overhead-factor 1 --label efi   --align 1024 --part-type=EF00 --active --fsuuid 0x4321dcba --uuid 0x5678dcba
 
 # EFI Boot Guard environment/config partitions plus Kernel files
-part --source efibootguard-boot --size 32M --extra-space 0 --overhead-factor 1 --label BOOT0 --align 1024 --part-type=0700 --sourceparams "revision=2" --fsuuid 0x4321dcbb
-part --source efibootguard-boot --size 32M --extra-space 0 --overhead-factor 1 --label BOOT1 --align 1024 --part-type=0700 --sourceparams "revision=1" --fsuuid 0x4321dcbc
+part --source efibootguard-boot --size 32M --extra-space 0 --overhead-factor 1 --label BOOT0 --align 1024 --part-type=0700 --sourceparams "revision=2" --fsuuid 0x4321dcbb --uuid 0x5678dcbb
+part --source efibootguard-boot --size 32M --extra-space 0 --overhead-factor 1 --label BOOT1 --align 1024 --part-type=0700 --sourceparams "revision=1" --fsuuid 0x4321dcbc --uuid 0x5678dcbc
diff --git a/wic/hihope-rzg2m-efibootguard.wks.in b/wic/hihope-rzg2m-efibootguard.wks.in
index 2ac8850..38581dd 100644
--- a/wic/hihope-rzg2m-efibootguard.wks.in
+++ b/wic/hihope-rzg2m-efibootguard.wks.in
@@ -8,7 +8,7 @@  part --source empty --align 1024 --fixed-size 1G --uuid "${ABROOTFS_PART_UUID_B}
 
 # home and var are extra partitions
 
-part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --fstype=ext4 --label home --align 1024  --size 1G --extra-space=100M --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
-part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --fstype=ext4 --label var --align 1024  --size 2G --extra-space=100M --fsuuid 96be3374-4258-11ee-be56-0242ac120002
+part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --fstype=ext4 --label home --align 1024  --size 1G --extra-space=100M --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-0242ac120002
+part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --fstype=ext4 --label var --align 1024  --size 2G --extra-space=100M --fsuuid 96be3374-4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-0242ac120002
 
 bootloader --ptable gpt --append="console=tty0 console=ttySC0,115200 rootwait earlyprintk"
diff --git a/wic/hihope-rzg2m.wks b/wic/hihope-rzg2m.wks
index fd3a338..1bb8ced 100644
--- a/wic/hihope-rzg2m.wks
+++ b/wic/hihope-rzg2m.wks
@@ -9,7 +9,7 @@ 
 # SPDX-License-Identifier: MIT
 #
 
-part /boot --source bootimg-partition --ondisk mmcblk0 --fstype vfat --label boot --align 1 --size 32M --extra-space 0 --fsuuid 0x4321dcba
+part /boot --source bootimg-partition --ondisk mmcblk0 --fstype vfat --label boot --align 1 --size 32M --extra-space 0 --fsuuid 0x4321dcba --uuid 0x5678dcba
 
 # Rootfs partition
-part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label root --align 1024 --size 2G --active --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
+part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label root --align 1024 --size 2G --active --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-0242ac120002
diff --git a/wic/iwg20m.wks b/wic/iwg20m.wks
index 85765f0..feea21e 100644
--- a/wic/iwg20m.wks
+++ b/wic/iwg20m.wks
@@ -12,7 +12,7 @@ 
 # [Note] u-boot runs from an SPI memory device
 
 # SDCard Boot partition (copies files in IMAGE_BOOT_FILES: zImage and device tree)
-part /boot --source bootimg-partition --ondisk mmcblk0 --fstype vfat --label boot --align 1 --size 32M --extra-space 0 --fsuuid 0x4321dcba
+part /boot --source bootimg-partition --ondisk mmcblk0 --fstype vfat --label boot --align 1 --size 32M --extra-space 0 --fsuuid 0x4321dcba --uuid 0x5678dcba
 
 # Rootfs partition
-part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label root --align 1024 --size 2G --active --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
+part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label root --align 1024 --size 2G --active --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-0242ac120002
diff --git a/wic/qemu-amd64-efibootguard-secureboot.wks.in b/wic/qemu-amd64-efibootguard-secureboot.wks.in
index 2e5cb39..03c715b 100644
--- a/wic/qemu-amd64-efibootguard-secureboot.wks.in
+++ b/wic/qemu-amd64-efibootguard-secureboot.wks.in
@@ -4,7 +4,7 @@  part --source rawcopy --sourceparams "file=${IMAGE_FULLNAME}.verity" --align 102
 part --source empty --align 1024 --fixed-size 1G --uuid "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-3D69D8477DE4
 
 # home and var are extra partitions
-part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --fstype=ext4 --label home --align 1024 --size 1G --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
-part /var  --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var  --fstype=ext4 --label var  --align 1024 --size 2G --fsuuid 96be3374-4258-11ee-be56-0242ac120002
+part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --fstype=ext4 --label home --align 1024 --size 1G --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-0242ac120002
+part /var  --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var  --fstype=ext4 --label var  --align 1024 --size 2G --fsuuid 96be3374-4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-0242ac120002
 
 bootloader --ptable gpt --append="console=tty0 console=ttyS0,115200 rootwait earlyprintk watchdog.handle_boot_enabled=0 iTCO_wdt.nowayout=1 panic=5"
diff --git a/wic/qemu-arm64-efibootguard-secureboot.wks.in b/wic/qemu-arm64-efibootguard-secureboot.wks.in
index 2fc389c..ede1fd5 100644
--- a/wic/qemu-arm64-efibootguard-secureboot.wks.in
+++ b/wic/qemu-arm64-efibootguard-secureboot.wks.in
@@ -4,7 +4,7 @@  part --source rawcopy --sourceparams "file=${IMAGE_FULLNAME}.verity" --align 102
 part --source empty --align 1024 --fixed-size 1G --uuid "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-3D69D8477DE4
 
 # home and var are extra partitions
-part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --fstype=ext4 --label home --align 1024 --size 1G --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
-part /var  --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var  --fstype=ext4 --label var  --align 1024 --size 2G --fsuuid 96be3374-4258-11ee-be56-0242ac120002
+part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --fstype=ext4 --label home --align 1024 --size 1G --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-0242ac120002
+part /var  --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var  --fstype=ext4 --label var  --align 1024 --size 2G --fsuuid 96be3374-4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-0242ac120002
 
 bootloader --ptable gpt --append="panic=5"
diff --git a/wic/qemu-arm64-efibootguard.wks.in b/wic/qemu-arm64-efibootguard.wks.in
index 1f50ba3..bf58e1c 100644
--- a/wic/qemu-arm64-efibootguard.wks.in
+++ b/wic/qemu-arm64-efibootguard.wks.in
@@ -7,7 +7,7 @@  part --source rawcopy --sourceparams "file=${IMAGE_FULLNAME}.squashfs" --align 1
 part --source empty --align 1024 --fixed-size 1G --uuid "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-3D69D8477DE4
 
 # home and var are extra partitions
-part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
-part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-4258-11ee-be56-0242ac120002
+part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-0242ac120002
+part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-0242ac120002
 
 bootloader --ptable gpt
diff --git a/wic/qemu-riscv64-efibootguard.wks.in b/wic/qemu-riscv64-efibootguard.wks.in
index 9158aa4..b37c971 100644
--- a/wic/qemu-riscv64-efibootguard.wks.in
+++ b/wic/qemu-riscv64-efibootguard.wks.in
@@ -7,7 +7,7 @@  part --source rawcopy --sourceparams "file=${IMAGE_FULLNAME}.squashfs" --align 1
 part --source empty --align 1024 --fixed-size 1G --uuid "${ABROOTFS_PART_UUID_B}" --part-type 0FC63DAF-8483-4772-8E79-3D69D8477DE4
 
 # home and var are extra partitions
-part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
-part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-4258-11ee-be56-0242ac120002
+part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --fstype=ext4 --label home --align 1024  --size 1G --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-0242ac120002
+part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --fstype=ext4 --label var --align 1024  --size 2G --fsuuid 96be3374-4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-0242ac120002
 
 bootloader --ptable gpt
diff --git a/wic/x86-efibootguard.wks.in b/wic/x86-efibootguard.wks.in
index 98e8da5..b002ea5 100644
--- a/wic/x86-efibootguard.wks.in
+++ b/wic/x86-efibootguard.wks.in
@@ -8,7 +8,7 @@  part --source empty --align 1024 --fixed-size 1G --uuid "${ABROOTFS_PART_UUID_B}
 
 # home and var are extra partitions
 
-part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --fstype=ext4 --label home --align 1024  --size 1G --extra-space=100M --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
-part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --fstype=ext4 --label var --align 1024  --size 2G --extra-space=100M --fsuuid 96be3374-4258-11ee-be56-0242ac120002
+part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --fstype=ext4 --label home --align 1024  --size 1G --extra-space=100M --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-0242ac120002
+part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --fstype=ext4 --label var --align 1024  --size 2G --extra-space=100M --fsuuid 96be3374-4258-11ee-be56-0242ac120002 --uuid 12343374-4258-11ee-be56-0242ac120002
 
 bootloader --ptable gpt --append="console=tty0 console=ttyS0,115200 rootwait earlyprintk watchdog.handle_boot_enabled=0 iTCO_wdt.nowayout=1 "
diff --git a/wic/x86_64-generic.wks b/wic/x86_64-generic.wks
index 1a44e26..a63f7f3 100644
--- a/wic/x86_64-generic.wks
+++ b/wic/x86_64-generic.wks
@@ -6,8 +6,8 @@ 
 # SPDX-License-Identifier: MIT
 #
 
-part /boot --source bootimg-efi-isar --sourceparams "loader=grub-efi" --label efi --part-type EF00 --align 1024 --fsuuid 0x4321dcba
+part /boot --source bootimg-efi-isar --sourceparams "loader=grub-efi" --label efi --part-type EF00 --align 1024 --fsuuid 0x4321dcba --uuid 0x5678dcba
 
-part / --source rootfs --fstype ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
+part / --source rootfs --fstype ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid abcdd66a-40d8-11ee-be56-0242ac120002
 
 bootloader --ptable gpt --timeout 2 --append "console=ttyS0,115200"