Skip to contentSkip to conversation

wic/bootimg-efi: replace hardcoded volume name with label

PATCH Superseded [email protected] 2 participants 3 messages May 10, 2019 – May 13, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wic/bootimg-efi: replace hardcoded volume name with label

From: Chee Yang Lee <[email protected]>

volume name should refer to --label in .wks. Replace the hardcoded volume name with label. Keep "efi" as default name when no lable specified.

---
 scripts/lib/wic/plugins/source/bootimg-efi.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
scripts/lib/wic/plugins/source/bootimg-efi.py +4 -2
index 0a0c5bd..55202a8 100644
@@ -268,8 +268,10 @@ class BootimgEFIPlugin(SourcePlugin):
         # dosfs image, created by mkdosfs
         bootimg = "%s/boot.img" % cr_workdir
 
-        dosfs_cmd = "mkdosfs -n efi -i %s -C %s %d" % \
-                    (part.fsuuid, bootimg, blocks)
+        label = part.label if part.label else "efi"
+
+        dosfs_cmd = "mkdosfs -n %s -i %s -C %s %d" % \
+                    (label, part.fsuuid, bootimg, blocks)
         exec_native_cmd(dosfs_cmd, native_sysroot)
 
         mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (bootimg, hdddir)
Signature · 1 line
2.7.4
#1 lore raw
Quoted 18 lines · On Fri, May 10, 2019 at 11:00:45AM +0800, [email protected] wrote:

From: Chee Yang Lee <[email protected]>

volume name should refer to --label in .wks. Replace the hardcoded volume name with label. Keep "efi" as default name when no lable specified.

---
 scripts/lib/wic/plugins/source/bootimg-efi.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
scripts/lib/wic/plugins/source/bootimg-efi.py +0 -0
index 0a0c5bd..55202a8 100644
@@ -268,8 +268,10 @@ class BootimgEFIPlugin(SourcePlugin):
         # dosfs image, created by mkdosfs
         bootimg = "%s/boot.img" % cr_workdir

scripts/lib/wic/plugins/source/bootimg-efi.py class BootimgEFIPlugin(SourcePlugin): · line 277

Quoted 10 lines
scripts/lib/wic/plugins/source/bootimg-efi.py +4 -2
 
-        dosfs_cmd = "mkdosfs -n efi -i %s -C %s %d" % \
-                    (part.fsuuid, bootimg, blocks)
+        label = part.label if part.label else "efi"
+
+        dosfs_cmd = "mkdosfs -n %s -i %s -C %s %d" % \
+                    (label, part.fsuuid, bootimg, blocks)
         exec_native_cmd(dosfs_cmd, native_sysroot)
 
         mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (bootimg, hdddir)

Does the name "efi" come from some spec? I would expect the default name here to be "ESP". Thanks!

Signature · 1 line
Tom
#2 lore raw

I guess no
"ESP" are fine to me

On 5/10/19, 10:05 PM, "Tom Rini" <[email protected]> wrote:

Does the name "efi" come from some spec? I would expect the default name here to be "ESP". Thanks!

--
Tom