* [scarthgap][PATCH v2] wic: Fix updating fstab for nvme devices
@ 2026-06-21 20:25 Aleksandar Nikolic
2026-06-26 22:51 ` [OE-core] " Yoann Congal
0 siblings, 1 reply; 4+ messages in thread
From: Aleksandar Nikolic @ 2026-06-21 20:25 UTC (permalink / raw)
To: openembedded-core; +Cc: Aleksandar Nikolic
From: Aleksandar Nikolic <aleksandar.nikolic@zeiss.com>
In case wks file references nvme, update_fstab() function will not add
prefix 'p' before the partition number, as the if condition only takes
mmcblk into consideration.
In case of nvme0n1 this leads that following entries are added to fstab:
/dev/nvme0n11
/dev/nvme0n13
instead of:
/dev/nvme0n1p1
/dev/nvme0n1p3
The patch fixes this as it extends the if condition and adds prefix 'p' for
both mmcblk and nvme.
Upstream-Status: Backport [https://git.yoctoproject.org/wic/commit/?id=f20cda73b495b75ef399c331f59b0e2401a3e76a]
Signed-off-by: Aleksandar Nikolic <aleksandar.nikolic@zeiss.com>
---
scripts/lib/wic/plugins/imager/direct.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
index a1d152659b..b06e6a8f23 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -133,8 +133,8 @@ class DirectPlugin(ImagerPlugin):
elif part.use_label:
device_name = "LABEL=%s" % part.label
else:
- # mmc device partitions are named mmcblk0p1, mmcblk0p2..
- prefix = 'p' if part.disk.startswith('mmcblk') else ''
+ # mmc and nvme device partitions start with prefix 'p'
+ prefix = 'p' if part.disk.startswith(('mmcblk', 'nvme')) else ''
device_name = "/dev/%s%s%d" % (part.disk, prefix, part.realnum)
opts = part.fsopts if part.fsopts else "defaults"
@@ -266,7 +266,7 @@ class DirectPlugin(ImagerPlugin):
elif part.label and self.ptable_format != 'msdos':
return "PARTLABEL=%s" % part.label
else:
- suffix = 'p' if part.disk.startswith('mmcblk') else ''
+ suffix = 'p' if part.disk.startswith(('mmcblk', 'nvme')) else ''
return "/dev/%s%s%-d" % (part.disk, suffix, part.realnum)
def cleanup(self):
--
2.47.3
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [OE-core] [scarthgap][PATCH v2] wic: Fix updating fstab for nvme devices 2026-06-21 20:25 [scarthgap][PATCH v2] wic: Fix updating fstab for nvme devices Aleksandar Nikolic @ 2026-06-26 22:51 ` Yoann Congal 2026-06-27 0:17 ` Trevor Woerner 0 siblings, 1 reply; 4+ messages in thread From: Yoann Congal @ 2026-06-26 22:51 UTC (permalink / raw) To: aleksandar.nikolic010, openembedded-core; +Cc: Aleksandar Nikolic On Sun Jun 21, 2026 at 10:25 PM CEST, Aleksandar Nikolic via lists.openembedded.org wrote: > From: Aleksandar Nikolic <aleksandar.nikolic@zeiss.com> > > In case wks file references nvme, update_fstab() function will not add > prefix 'p' before the partition number, as the if condition only takes > mmcblk into consideration. > > In case of nvme0n1 this leads that following entries are added to fstab: > > /dev/nvme0n11 > /dev/nvme0n13 > > instead of: > > /dev/nvme0n1p1 > /dev/nvme0n1p3 > > The patch fixes this as it extends the if condition and adds prefix 'p' for > both mmcblk and nvme. > > Upstream-Status: Backport [https://git.yoctoproject.org/wic/commit/?id=f20cda73b495b75ef399c331f59b0e2401a3e76a] > Signed-off-by: Aleksandar Nikolic <aleksandar.nikolic@zeiss.com> Hello, Sorry I missed it in earlier reviews but it look like this patch is also needed on wrynose: wrynose has wic 0.3.0 but this patch is 2 commits above that. To accept this patch on scarthgap, I would need a equivalent patch for wrynose. Can you send that and ping back here? Thanks! > --- > scripts/lib/wic/plugins/imager/direct.py | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py > index a1d152659b..b06e6a8f23 100644 > --- a/scripts/lib/wic/plugins/imager/direct.py > +++ b/scripts/lib/wic/plugins/imager/direct.py > @@ -133,8 +133,8 @@ class DirectPlugin(ImagerPlugin): > elif part.use_label: > device_name = "LABEL=%s" % part.label > else: > - # mmc device partitions are named mmcblk0p1, mmcblk0p2.. > - prefix = 'p' if part.disk.startswith('mmcblk') else '' > + # mmc and nvme device partitions start with prefix 'p' > + prefix = 'p' if part.disk.startswith(('mmcblk', 'nvme')) else '' > device_name = "/dev/%s%s%d" % (part.disk, prefix, part.realnum) > > opts = part.fsopts if part.fsopts else "defaults" > @@ -266,7 +266,7 @@ class DirectPlugin(ImagerPlugin): > elif part.label and self.ptable_format != 'msdos': > return "PARTLABEL=%s" % part.label > else: > - suffix = 'p' if part.disk.startswith('mmcblk') else '' > + suffix = 'p' if part.disk.startswith(('mmcblk', 'nvme')) else '' > return "/dev/%s%s%-d" % (part.disk, suffix, part.realnum) > > def cleanup(self): -- Yoann Congal Smile ECS ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [OE-core] [scarthgap][PATCH v2] wic: Fix updating fstab for nvme devices 2026-06-26 22:51 ` [OE-core] " Yoann Congal @ 2026-06-27 0:17 ` Trevor Woerner 2026-06-27 8:20 ` Yoann Congal 0 siblings, 1 reply; 4+ messages in thread From: Trevor Woerner @ 2026-06-27 0:17 UTC (permalink / raw) To: yoann.congal; +Cc: aleksandar.nikolic010, openembedded-core, Aleksandar Nikolic On Sat 2026-06-27 @ 12:51:14 AM, Yoann Congal via lists.openembedded.org wrote: > On Sun Jun 21, 2026 at 10:25 PM CEST, Aleksandar Nikolic via lists.openembedded.org wrote: > > From: Aleksandar Nikolic <aleksandar.nikolic@zeiss.com> > > > > In case wks file references nvme, update_fstab() function will not add > > prefix 'p' before the partition number, as the if condition only takes > > mmcblk into consideration. > > > > In case of nvme0n1 this leads that following entries are added to fstab: > > > > /dev/nvme0n11 > > /dev/nvme0n13 > > > > instead of: > > > > /dev/nvme0n1p1 > > /dev/nvme0n1p3 > > > > The patch fixes this as it extends the if condition and adds prefix 'p' for > > both mmcblk and nvme. > > > > Upstream-Status: Backport [https://git.yoctoproject.org/wic/commit/?id=f20cda73b495b75ef399c331f59b0e2401a3e76a] > > Signed-off-by: Aleksandar Nikolic <aleksandar.nikolic@zeiss.com> > > Hello, > > Sorry I missed it in earlier reviews but it look like this patch is also > needed on wrynose: wrynose has wic 0.3.0 but this patch is 2 commits > above that. > > To accept this patch on scarthgap, I would need a equivalent patch for > wrynose. Can you send that and ping back here? In scarthgap wic is part of oe-core, in wrynose it is not. For wrynose it would require a completely different patch; but it would probably be best to just update the SRCREV instead. > Thanks! > > > --- > > scripts/lib/wic/plugins/imager/direct.py | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py > > index a1d152659b..b06e6a8f23 100644 > > --- a/scripts/lib/wic/plugins/imager/direct.py > > +++ b/scripts/lib/wic/plugins/imager/direct.py > > @@ -133,8 +133,8 @@ class DirectPlugin(ImagerPlugin): > > elif part.use_label: > > device_name = "LABEL=%s" % part.label > > else: > > - # mmc device partitions are named mmcblk0p1, mmcblk0p2.. > > - prefix = 'p' if part.disk.startswith('mmcblk') else '' > > + # mmc and nvme device partitions start with prefix 'p' > > + prefix = 'p' if part.disk.startswith(('mmcblk', 'nvme')) else '' > > device_name = "/dev/%s%s%d" % (part.disk, prefix, part.realnum) > > > > opts = part.fsopts if part.fsopts else "defaults" > > @@ -266,7 +266,7 @@ class DirectPlugin(ImagerPlugin): > > elif part.label and self.ptable_format != 'msdos': > > return "PARTLABEL=%s" % part.label > > else: > > - suffix = 'p' if part.disk.startswith('mmcblk') else '' > > + suffix = 'p' if part.disk.startswith(('mmcblk', 'nvme')) else '' > > return "/dev/%s%s%-d" % (part.disk, suffix, part.realnum) > > > > def cleanup(self): > > > -- > Yoann Congal > Smile ECS > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#239668): https://lists.openembedded.org/g/openembedded-core/message/239668 > Mute This Topic: https://lists.openembedded.org/mt/119915320/900817 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [twoerner@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [OE-core] [scarthgap][PATCH v2] wic: Fix updating fstab for nvme devices 2026-06-27 0:17 ` Trevor Woerner @ 2026-06-27 8:20 ` Yoann Congal 0 siblings, 0 replies; 4+ messages in thread From: Yoann Congal @ 2026-06-27 8:20 UTC (permalink / raw) To: Trevor Woerner Cc: aleksandar.nikolic010, Patches and discussions about the oe-core layer, Aleksandar Nikolic [-- Attachment #1: Type: text/plain, Size: 4188 bytes --] Le sam. 27 juin 2026, 02:18, Trevor Woerner <twoerner@gmail.com> a écrit : > On Sat 2026-06-27 @ 12:51:14 AM, Yoann Congal via lists.openembedded.org > wrote: > > On Sun Jun 21, 2026 at 10:25 PM CEST, Aleksandar Nikolic via > lists.openembedded.org wrote: > > > From: Aleksandar Nikolic <aleksandar.nikolic@zeiss.com> > > > > > > In case wks file references nvme, update_fstab() function will not add > > > prefix 'p' before the partition number, as the if condition only takes > > > mmcblk into consideration. > > > > > > In case of nvme0n1 this leads that following entries are added to > fstab: > > > > > > /dev/nvme0n11 > > > /dev/nvme0n13 > > > > > > instead of: > > > > > > /dev/nvme0n1p1 > > > /dev/nvme0n1p3 > > > > > > The patch fixes this as it extends the if condition and adds prefix > 'p' for > > > both mmcblk and nvme. > > > > > > Upstream-Status: Backport [ > https://git.yoctoproject.org/wic/commit/?id=f20cda73b495b75ef399c331f59b0e2401a3e76a > ] > > > Signed-off-by: Aleksandar Nikolic <aleksandar.nikolic@zeiss.com> > > > > Hello, > > > > Sorry I missed it in earlier reviews but it look like this patch is also > > needed on wrynose: wrynose has wic 0.3.0 but this patch is 2 commits > > above that. > > > > To accept this patch on scarthgap, I would need a equivalent patch for > > wrynose. Can you send that and ping back here? > > In scarthgap wic is part of oe-core, in wrynose it is not. > > For wrynose it would require a completely different patch; but it would > probably be best to just update the SRCREV instead. > Trevor, thanks for the added details. Do you plan to release a wic 0.3.1 soon? Or do you recommend we switch from version based SRC_URI to commit based SRCREV (I'd prefer to stay version based)? Looking at the master logs, I could take a 0.3.1 upgrade with the current master state. Alternatively, we could backport Aleksandar's fix on top of the 0.3.0 recipe (as usual) Regards, > > Thanks! > > > > > --- > > > scripts/lib/wic/plugins/imager/direct.py | 6 +++--- > > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > > > diff --git a/scripts/lib/wic/plugins/imager/direct.py > b/scripts/lib/wic/plugins/imager/direct.py > > > index a1d152659b..b06e6a8f23 100644 > > > --- a/scripts/lib/wic/plugins/imager/direct.py > > > +++ b/scripts/lib/wic/plugins/imager/direct.py > > > @@ -133,8 +133,8 @@ class DirectPlugin(ImagerPlugin): > > > elif part.use_label: > > > device_name = "LABEL=%s" % part.label > > > else: > > > - # mmc device partitions are named mmcblk0p1, > mmcblk0p2.. > > > - prefix = 'p' if part.disk.startswith('mmcblk') else > '' > > > + # mmc and nvme device partitions start with prefix 'p' > > > + prefix = 'p' if part.disk.startswith(('mmcblk', > 'nvme')) else '' > > > device_name = "/dev/%s%s%d" % (part.disk, prefix, > part.realnum) > > > > > > opts = part.fsopts if part.fsopts else "defaults" > > > @@ -266,7 +266,7 @@ class DirectPlugin(ImagerPlugin): > > > elif part.label and self.ptable_format != 'msdos': > > > return "PARTLABEL=%s" % part.label > > > else: > > > - suffix = 'p' if part.disk.startswith('mmcblk') > else '' > > > + suffix = 'p' if part.disk.startswith(('mmcblk', > 'nvme')) else '' > > > return "/dev/%s%s%-d" % (part.disk, suffix, > part.realnum) > > > > > > def cleanup(self): > > > > > > -- > > Yoann Congal > > Smile ECS > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- > > Links: You receive all messages sent to this group. > > View/Reply Online (#239668): > https://lists.openembedded.org/g/openembedded-core/message/239668 > > Mute This Topic: https://lists.openembedded.org/mt/119915320/900817 > > Group Owner: openembedded-core+owner@lists.openembedded.org > > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ > twoerner@gmail.com] > > -=-=-=-=-=-=-=-=-=-=-=- > > > > [-- Attachment #2: Type: text/html, Size: 6840 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-06-27 8:21 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-06-21 20:25 [scarthgap][PATCH v2] wic: Fix updating fstab for nvme devices Aleksandar Nikolic 2026-06-26 22:51 ` [OE-core] " Yoann Congal 2026-06-27 0:17 ` Trevor Woerner 2026-06-27 8:20 ` Yoann Congal
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox