Date
1 - 3 of 3
SWUpdate with unified-kernel using UUID in the kernel command line
Kunijadar Shivanand
Hi CIP-team,
I'm trying to use UUID in the kernel command line for selecting the boot target(rootfs) with unified-kernel image. Check the below details on how UUID is used to switch the partitions and let me know what is the advantage of the initramfs script approach over UUID? * Use filesystem UUID to specify the boot target (rootfs) * UUID is generated for each filesystem and its value changes every release. * Each unified kernel image is always generated with root=UUID=(The UUID of corresponding filesystem) in its cmdline and .swu includes the pair of unified kernel and rootfs. * Install the update image using raw update type (i.e. block level). Example: Before update, Active partition: ROOTFS-A(mmcblk1p4): sudo blkid /dev/mmcblk1p4: LABEL="ROOTFS1" UUID="U1" TYPE="ext4" PARTLABEL="ROOTFS1" PARTUUID="PARTUUID1" /dev/mmcblk1p5: LABEL="ROOTFS2" UUID="U0" TYPE="ext4" PARTLABEL="ROOTFS2" PARTUUID="PARTUUID2" While building .swu .swu includes... a partition image (for ROOTFS-X) which UUID is U2 a unified kernel which cmdline includes root=UUID=U2 While installing the .swu for ROOTFS-B: Unified kernel is installed to BOOT-B(mmcblk1p2) The partition image is installed to ROOTFS-B(mmcblk1p5) After update, Active partition: ROOTFS-B(mmcblk1p5): sudo blkid /dev/mmcblk1p4: LABEL="ROOTFS1" UUID="U1" TYPE="ext4" PARTLABEL="ROOTFS1" PARTUUID="PARTUUID1" /dev/mmcblk1p5: LABEL="ROOTFS2" UUID="U2" TYPE="ext4" PARTLABEL="ROOTFS2" PARTUUID="PARTUUID2" Thanks & Regards Shivanand K |
|
Kunijadar Shivanand
Hi CIP-team,
toggle quoted message
Show quoted text
Any comments on this approach ? Let's discuss this topic in the today's CIP core meeting. Thanks & Regards Shivanand K -----Original Message-----
From: kunijadar shivanand(TSIP TMIEC ODG Porting) Sent: 27 January 2023 12:50 To: cip-dev@... Cc: jan.kiszka@...; 38A5323E673042E40E350B6BD8E7D4A7 <kazuhiro3.hayashi@...>; dinesh kumar(TSIP TMIEC ODG Porting) <dinesh.kumar@...>; pyla venkata(TSIP TMIEC ODG Porting) <Venkata.Pyla@...> Subject: SWUpdate with unified-kernel using UUID in the kernel command line Hi CIP-team, I'm trying to use UUID in the kernel command line for selecting the boot target(rootfs) with unified-kernel image. Check the below details on how UUID is used to switch the partitions and let me know what is the advantage of the initramfs script approach over UUID? * Use filesystem UUID to specify the boot target (rootfs) * UUID is generated for each filesystem and its value changes every release. * Each unified kernel image is always generated with root=UUID=(The UUID of corresponding filesystem) in its cmdline and .swu includes the pair of unified kernel and rootfs. * Install the update image using raw update type (i.e. block level). Example: Before update, Active partition: ROOTFS-A(mmcblk1p4): sudo blkid /dev/mmcblk1p4: LABEL="ROOTFS1" UUID="U1" TYPE="ext4" PARTLABEL="ROOTFS1" PARTUUID="PARTUUID1" /dev/mmcblk1p5: LABEL="ROOTFS2" UUID="U0" TYPE="ext4" PARTLABEL="ROOTFS2" PARTUUID="PARTUUID2" While building .swu .swu includes... a partition image (for ROOTFS-X) which UUID is U2 a unified kernel which cmdline includes root=UUID=U2 While installing the .swu for ROOTFS-B: Unified kernel is installed to BOOT-B(mmcblk1p2) The partition image is installed to ROOTFS-B(mmcblk1p5) After update, Active partition: ROOTFS-B(mmcblk1p5): sudo blkid /dev/mmcblk1p4: LABEL="ROOTFS1" UUID="U1" TYPE="ext4" PARTLABEL="ROOTFS1" PARTUUID="PARTUUID1" /dev/mmcblk1p5: LABEL="ROOTFS2" UUID="U2" TYPE="ext4" PARTLABEL="ROOTFS2" PARTUUID="PARTUUID2" Thanks & Regards Shivanand K |
|
Jan Kiszka
On 27.01.23 08:19, Shivanand.Kunijadar@... wrote:
Hi CIP-team,We considered using filesystem UUIDs for selecting the rootfs by the UKI (in the absence for dm-verity-based peering), but not all filesystems come with this feature. Therefore, isar-cip-core implements a mechanism that is independent of the filesystem type. HTH, Jan * UUID is generated for each filesystem and its value changes every release.-- Siemens AG, Technology Competence Center Embedded Linux |
|