From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6899340313789202432 Date: Thu, 26 Nov 2020 01:14:10 -0800 (PST) From: "vijaikumar....@gmail.com" To: isar-users Message-Id: <4ce49a52-688c-4f85-87e8-2c9bb3826919n@googlegroups.com> In-Reply-To: <20201126093954.5920b387@md1za8fc.ad001.siemens.net> References: <20201126080328.26721-1-Vijaikumar_Kanagarajan@mentor.com> <20201126093954.5920b387@md1za8fc.ad001.siemens.net> Subject: Re: [PATCH] wic/plugins: Fix boot plugin MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1402_689115789.1606382050142" X-TUID: dNGzvhzIEbT2 ------=_Part_1402_689115789.1606382050142 Content-Type: multipart/alternative; boundary="----=_Part_1403_1561746890.1606382050142" ------=_Part_1403_1561746890.1606382050142 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On Thursday, November 26, 2020 at 2:09:56 PM UTC+5:30 Henning Schild wrote: > Am Thu, 26 Nov 2020 13:33:28 +0530 > schrieb Vijai Kumar K : > > > When we use --use-uuid along with bootimg plugin, it is observed > > that the uuid updated in /etc/fstab is not same as the one the > > disk created by bootimg has. > > > > The latest wic[1] creates a UUID for use for these plugins, our ISAR > > version of these plugins were not consuming the uuid generated by > > wic while generating the partition. Instead a default volume id is > > generated which is different from what is written by wic in fstab; > > resulting in boot failure. > > > > Fix the ISAR bootimg plugins to use the uuid from wic. > > Also, enable --use-uuid with bootimg-pcbios-isar plugin in > > common-isar.wks.inc for a testcase. > > > > [1] > > > https://github.com/openembedded/openembedded-core/commit/9256b8799495634ee8aee5d16ff71bd6e6e25ed4 > > > > Reported-by: Henning Schild > > Signed-off-by: Vijai Kumar K > > --- > > meta-isar/scripts/lib/wic/canned-wks/common-isar.wks.inc | 2 +- > > meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py | 3 ++- > > meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py | 3 ++- > > 3 files changed, 5 insertions(+), 3 deletions(-) > > > > diff --git a/meta-isar/scripts/lib/wic/canned-wks/common-isar.wks.inc > > b/meta-isar/scripts/lib/wic/canned-wks/common-isar.wks.inc index > > cc38a01..4290edb 100644 --- > > a/meta-isar/scripts/lib/wic/canned-wks/common-isar.wks.inc +++ > > b/meta-isar/scripts/lib/wic/canned-wks/common-isar.wks.inc @@ -1,3 > > +1,3 @@ # This file is included into 3 canned wks files from this > > directory -part /boot --source bootimg-pcbios-isar --ondisk sda > > --label boot --active --align 1024 +part /boot --use-uuid --source > > bootimg-pcbios-isar --ondisk sda --label boot --active --align 1024 > > part / --source rootfs --ondisk sda --fstype=ext4 --label platform > > --align 1024 --exclude-path=boot diff --git > > This is a deviation that you needed for testing, but it is not what > upstream wic does. I would suggest to drop that. > Will drop that in v2. > > > a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py > > b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py index > > 2285d2e..6b2fbc2 100644 --- > > a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py +++ > > b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py @@ -276,7 > > +276,8 @@ class BootimgEFIPlugin(SourcePlugin): # dosfs image, > > created by mkdosfs bootimg = "%s/boot.img" % cr_workdir > > - dosfs_cmd = "mkdosfs -n efi -C %s %d" % (bootimg, blocks) > > + dosfs_cmd = "mkdosfs -n efi -i %s -C %s %d" % \ > > + (part.fsuuid, bootimg, blocks) > > exec_cmd(dosfs_cmd) > > This seems like stuff that was forgotten about when bumping wic, right? > > Maybe worth diffing our fork plugins with their originals, in old and > new wic to see if anything else was forgotten. > Yes. I will try to align our plugins close to their respective parent in upstream and will send out a separate patchset if there are any changes. Thanks, Vijai Kumar K > > Henning > > > mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (bootimg, hdddir) > > diff --git > > a/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py > > b/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py index > > 493615b..b3d71c5 100644 --- > > a/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py +++ > > b/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py @@ > > -209,7 +209,8 @@ class BootimgPcbiosIsarPlugin(SourcePlugin): # dosfs > > image, created by mkdosfs bootimg = "%s/boot.img" % cr_workdir > > - dosfs_cmd = "mkdosfs -n boot -S 512 -C %s %d" % (bootimg, > > blocks) > > + dosfs_cmd = "mkdosfs -n boot -i %s -S 512 -C %s %d" % \ > > + (part.fsuuid, bootimg, blocks) > > exec_native_cmd(dosfs_cmd, native_sysroot) > > > > mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (bootimg, hdddir) > > ------=_Part_1403_1561746890.1606382050142 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit

On Thursday, November 26, 2020 at 2:09:56 PM UTC+5:30 Henning Schild wrote:
Am Thu, 26 Nov 2020 13:33:28 +0530
schrieb Vijai Kumar K <Vijaikumar_...@mentor.com>:

> When we use --use-uuid along with bootimg plugin, it is observed
> that the uuid updated in /etc/fstab is not same as the one the
> disk created by bootimg has.
>
> The latest wic[1] creates a UUID for use for these plugins, our ISAR
> version of these plugins were not consuming the uuid generated by
> wic while generating the partition. Instead a default volume id is
> generated which is different from what is written by wic in fstab;
> resulting in boot failure.
>
> Fix the ISAR bootimg plugins to use the uuid from wic.
> Also, enable --use-uuid with bootimg-pcbios-isar plugin in
> common-isar.wks.inc for a testcase.
>
> [1]
> https://github.com/openembedded/openembedded-core/commit/9256b8799495634ee8aee5d16ff71bd6e6e25ed4
>
> Reported-by: Henning Schild <henning...@siemens.com>
> Signed-off-by: Vijai Kumar K <Vijaikumar_...@mentor.com>
> ---
> meta-isar/scripts/lib/wic/canned-wks/common-isar.wks.inc | 2 +-
> meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py | 3 ++-
> meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py | 3 ++-
> 3 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/meta-isar/scripts/lib/wic/canned-wks/common-isar.wks.inc
> b/meta-isar/scripts/lib/wic/canned-wks/common-isar.wks.inc index
> cc38a01..4290edb 100644 ---
> a/meta-isar/scripts/lib/wic/canned-wks/common-isar.wks.inc +++
> b/meta-isar/scripts/lib/wic/canned-wks/common-isar.wks.inc @@ -1,3
> +1,3 @@ # This file is included into 3 canned wks files from this
> directory -part /boot --source bootimg-pcbios-isar --ondisk sda
> --label boot --active --align 1024 +part /boot --use-uuid --source
> bootimg-pcbios-isar --ondisk sda --label boot --active --align 1024
> part / --source rootfs --ondisk sda --fstype=ext4 --label platform
> --align 1024 --exclude-path=boot diff --git

This is a deviation that you needed for testing, but it is not what
upstream wic does. I would suggest to drop that.

Will drop that in v2.
 

> a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
> b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py index
> 2285d2e..6b2fbc2 100644 ---
> a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py +++
> b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py @@ -276,7
> +276,8 @@ class BootimgEFIPlugin(SourcePlugin): # dosfs image,
> created by mkdosfs bootimg = "%s/boot.img" % cr_workdir
> - dosfs_cmd = "mkdosfs -n efi -C %s %d" % (bootimg, blocks)
> + dosfs_cmd = "mkdosfs -n efi -i %s -C %s %d" % \
> + (part.fsuuid, bootimg, blocks)
> exec_cmd(dosfs_cmd)

This seems like stuff that was forgotten about when bumping wic, right?

Maybe worth diffing our fork plugins with their originals, in old and
new wic to see if anything else was forgotten.

Yes. I will try to align our plugins close to their respective parent in upstream and will
send out a separate patchset if there are any changes. 

Thanks,
Vijai Kumar K
 

Henning

> mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (bootimg, hdddir)
> diff --git
> a/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py
> b/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py index
> 493615b..b3d71c5 100644 ---
> a/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py +++
> b/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py @@
> -209,7 +209,8 @@ class BootimgPcbiosIsarPlugin(SourcePlugin): # dosfs
> image, created by mkdosfs bootimg = "%s/boot.img" % cr_workdir
> - dosfs_cmd = "mkdosfs -n boot -S 512 -C %s %d" % (bootimg,
> blocks)
> + dosfs_cmd = "mkdosfs -n boot -i %s -S 512 -C %s %d" % \
> + (part.fsuuid, bootimg, blocks)
> exec_native_cmd(dosfs_cmd, native_sysroot)
>
> mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (bootimg, hdddir)

------=_Part_1403_1561746890.1606382050142-- ------=_Part_1402_689115789.1606382050142--