| Summary: | WIC creates wrong partition number | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Racemouse <fink> |
| Component: | Scripts and Tools | Assignee: | Ed Bartosh <eduard.bartosh> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | kai.ruhnau, ross.burton |
| Version: | 2.4 | ||
| Target Milestone: | 2.4 M2 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Don't know | |
|
Description
Racemouse
2017-07-14 12:56:45 UTC
Looks like a bug to me. Can you try if it's fixed by this patch?
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
index f2e6127..31d07ba 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -312,7 +312,7 @@ class PartitionedImage():
part.realnum = 0
else:
realnum += 1
- if self.ptable_format == 'msdos' and realnum > 3:
+ if self.ptable_format == 'msdos' and realnum > 3 and len(partitions) > 4:
part.realnum = realnum + 1
continue
part.realnum = realnum
BTW, you've specified Yocto version 2.3.2. this version doesn't exist yet, I believe. Can you tell which Yocto version do you use?
(In reply to comment #1) > Looks like a bug to me. Can you try if it's fixed by this patch? > > diff --git a/scripts/lib/wic/plugins/imager/direct.py > b/scripts/lib/wic/plugins/imager/direct.py > index f2e6127..31d07ba 100644 > --- a/scripts/lib/wic/plugins/imager/direct.py > +++ b/scripts/lib/wic/plugins/imager/direct.py > @@ -312,7 +312,7 @@ class PartitionedImage(): > part.realnum = 0 > else: > realnum += 1 > - if self.ptable_format == 'msdos' and realnum > 3: > + if self.ptable_format == 'msdos' and realnum > 3 and > len(partitions) > 4: > part.realnum = realnum + 1 > continue > part.realnum = realnum > > Hi, Damn, you are fast !! :-) Well, it seems to have cured my issue. Now fstab correctly shows mmcblk0p4 on the right spot. From my point of view this can be closed. Again: Thanks a lot for the prompt reply :-) > BTW, you've specified Yocto version 2.3.2. this version doesn't exist yet, I > believe. Can you tell which Yocto version do you use? I-m using "YP Core - Pyro 2.3", so I assumed 2.3.2 was that. I was obviously wrong, then. Should I change the field into something else? Please advise :-) BR RaceMouse of Denmark Please review fixes for master, pyro and morty: http://lists.openembedded.org/pipermail/openembedded-core/2017-July/139683.html http://lists.openembedded.org/pipermail/openembedded-core/2017-July/139684.html http://lists.openembedded.org/pipermail/openembedded-core/2017-July/139685.html The fix has been merged into poky master. Commit id 8fb8a21b7d4f1fb69f0407f03fd5907d861f7d42 I have just tested this patch on my ARM platform and it doesn't work as intended: The `len(partitions) > 4` also counts those with the --no-table flag so my u-boot "partition" is counted as well. Although there are only 4 real partitions in my wks, the fstab still ends up with mmcblk1p5 for the fourth partition. |