diff mbox series

[isar-cip-core] wic: Use fixed UUID values for the partitions

Message ID 20230922064904.11232-1-venkata.pyla@toshiba-tsip.com (mailing list archive)
State Accepted
Headers show
Series [isar-cip-core] wic: Use fixed UUID values for the partitions | expand

Commit Message

Venkata Pyla Sept. 22, 2023, 6:49 a.m. UTC
From: venkata pyla <venkata.pyla@toshiba-tsip.com>

To generated images reproducibly it should assign with fixed UUID
values.

Signed-off-by: venkata pyla <venkata.pyla@toshiba-tsip.com>
---
 wic/ebg-signed-sysparts.inc | 6 +++---
 wic/hihope-rzg2m.wks        | 4 ++--
 wic/iwg20m.wks              | 4 ++--
 wic/simatic-ipc227e.wks     | 4 ++--
 4 files changed, 9 insertions(+), 9 deletions(-)

Comments

Jan Kiszka Sept. 22, 2023, 2:26 p.m. UTC | #1
On 22.09.23 08:49, venkata.pyla@toshiba-tsip.com wrote:
> From: venkata pyla <venkata.pyla@toshiba-tsip.com>
> 
> To generated images reproducibly it should assign with fixed UUID
> values.
> 
> Signed-off-by: venkata pyla <venkata.pyla@toshiba-tsip.com>
> ---
>  wic/ebg-signed-sysparts.inc | 6 +++---
>  wic/hihope-rzg2m.wks        | 4 ++--
>  wic/iwg20m.wks              | 4 ++--
>  wic/simatic-ipc227e.wks     | 4 ++--
>  4 files changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/wic/ebg-signed-sysparts.inc b/wic/ebg-signed-sysparts.inc
> index 2d4d0e3..b2340e2 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"
> +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
>  
>  # 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"
> -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"
> +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
> diff --git a/wic/hihope-rzg2m.wks b/wic/hihope-rzg2m.wks
> index c0a9f77..fd3a338 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
> +part /boot --source bootimg-partition --ondisk mmcblk0 --fstype vfat --label boot --align 1 --size 32M --extra-space 0 --fsuuid 0x4321dcba
>  
>  # Rootfs partition
> -part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label root --align 1024 --size 2G --active
> +part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label root --align 1024 --size 2G --active --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
> diff --git a/wic/iwg20m.wks b/wic/iwg20m.wks
> index 14bf8b0..85765f0 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
> +part /boot --source bootimg-partition --ondisk mmcblk0 --fstype vfat --label boot --align 1 --size 32M --extra-space 0 --fsuuid 0x4321dcba
>  
>  # Rootfs partition
> -part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label root --align 1024 --size 2G --active
> +part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label root --align 1024 --size 2G --active --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
> diff --git a/wic/simatic-ipc227e.wks b/wic/simatic-ipc227e.wks
> index 9044e0f..1a44e26 100644
> --- a/wic/simatic-ipc227e.wks
> +++ b/wic/simatic-ipc227e.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
> +part /boot --source bootimg-efi-isar --sourceparams "loader=grub-efi" --label efi --part-type EF00 --align 1024 --fsuuid 0x4321dcba
>  
> -part / --source rootfs --fstype ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --use-uuid
> +part / --source rootfs --fstype ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
>  
>  bootloader --ptable gpt --timeout 2 --append "console=ttyS0,115200"

Thanks, applied.

Jan
diff mbox series

Patch

diff --git a/wic/ebg-signed-sysparts.inc b/wic/ebg-signed-sysparts.inc
index 2d4d0e3..b2340e2 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"
+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
 
 # 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"
-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"
+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
diff --git a/wic/hihope-rzg2m.wks b/wic/hihope-rzg2m.wks
index c0a9f77..fd3a338 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
+part /boot --source bootimg-partition --ondisk mmcblk0 --fstype vfat --label boot --align 1 --size 32M --extra-space 0 --fsuuid 0x4321dcba
 
 # Rootfs partition
-part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label root --align 1024 --size 2G --active
+part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label root --align 1024 --size 2G --active --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
diff --git a/wic/iwg20m.wks b/wic/iwg20m.wks
index 14bf8b0..85765f0 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
+part /boot --source bootimg-partition --ondisk mmcblk0 --fstype vfat --label boot --align 1 --size 32M --extra-space 0 --fsuuid 0x4321dcba
 
 # Rootfs partition
-part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label root --align 1024 --size 2G --active
+part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label root --align 1024 --size 2G --active --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
diff --git a/wic/simatic-ipc227e.wks b/wic/simatic-ipc227e.wks
index 9044e0f..1a44e26 100644
--- a/wic/simatic-ipc227e.wks
+++ b/wic/simatic-ipc227e.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
+part /boot --source bootimg-efi-isar --sourceparams "loader=grub-efi" --label efi --part-type EF00 --align 1024 --fsuuid 0x4321dcba
 
-part / --source rootfs --fstype ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --use-uuid
+part / --source rootfs --fstype ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002
 
 bootloader --ptable gpt --timeout 2 --append "console=ttyS0,115200"