Skip to contentSkip to conversation

wic: bootimg-efi: Support + symbol in filenames

PATCH Igor Opaniuk 1 participant 1 message Feb 4, 2025 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 42 lines · Igor Opaniuk via lists.openembedded.org

From: Igor Opaniuk <[email protected]>

Allow the '+' symbol as a valid character in filenames listed in the IMAGE_EFI_BOOT_FILES variable.

The '+' symbol might be used to support boot counting for boot entries, as described in the UAPI Boot Loader Specification [1]:

The boot counting data is stored in the name of the boot loader entry. A boot loader entry file name may contain a plus (+) followed by a number. This may optionally be followed by a minus (-) followed by a second number. The dot (.) and file name suffix (conf or efi) must immediately follow.
Boot counting is enabled for entries which match this pattern.

Example:
IMAGE_EFI_BOOT_FILES:append = " entry.conf;loader/entries/entry+3.conf"

[1] https://uapi-group.org/specifications/specs/boot_loader_specification/#boot-counting

---
 scripts/lib/wic/plugins/source/bootimg-efi.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/lib/wic/plugins/source/bootimg-efi.py +1 -2
index c05f38f229..96c710bf77 100644
@@ -252,7 +252,7 @@ class BootimgEFIPlugin(SourcePlugin):
 
             # list of tuples (src_name, dst_name)
             deploy_files = []
-            for src_entry in re.findall(r'[\w;\-\./\*]+', boot_files):
+            for src_entry in re.findall(r'[\w;\-\.\+/\*]+', boot_files):
                 if ';' in src_entry:
                     dst_entry = tuple(src_entry.split(';'))
                     if not dst_entry[0] or not dst_entry[1]:
--

2.43.0

Quoted 8 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#210442): https://lists.openembedded.org/g/openembedded-core/message/210442
Mute This Topic: https://lists.openembedded.org/mt/110896349/6685241
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

gentle ping, let me know if there is anything else for me to do

Signature · 6 lines
Best regards - Freundliche Grüsse - Meilleures salutations

Igor Opaniuk
Senior Software Engineer, Embedded & Security
E: [email protected]
W: www.foundries.io