From: Lennart Poettering Date: Tue, 2 Jul 2024 07:38:53 +0000 (+0200) Subject: ukify: add basic .profile support X-Git-Tag: v257-rc1~525^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22b8236ff61f5427b5f266ca65b983a50502d5bc;p=thirdparty%2Fsystemd.git ukify: add basic .profile support This just allows including .profile sections, but doesn't try to be smart about it. This alone won't help you much to create valid multi-profile UKIs. --- diff --git a/man/ukify.xml b/man/ukify.xml index bfe54a8f276..1c52c9414b3 100644 --- a/man/ukify.xml +++ b/man/ukify.xml @@ -400,6 +400,17 @@ + + Profile=PATH + + + A path to a UKI profile to place in an .profile section. This + option is useful for creating multi-profile UKIs, and is typically used in combination with + , to extend the specified UKI with an additional profile. + + + + PCRBanks=PATH diff --git a/src/ukify/ukify.py b/src/ukify/ukify.py index 3478ff56898..c8b6ce401bb 100755 --- a/src/ukify/ukify.py +++ b/src/ukify/ukify.py @@ -313,6 +313,7 @@ DEFAULT_SECTIONS_TO_SHOW = { '.pcrsig' : 'text', '.sbat' : 'text', '.sbom' : 'binary', + '.profile' : 'text', } @dataclasses.dataclass @@ -849,6 +850,7 @@ def make_uki(opts): sections = [ # name, content, measure? + ('.profile', opts.profile, True ), ('.osrel', opts.os_release, True ), ('.cmdline', opts.cmdline, True ), ('.dtb', opts.devicetree, True ), @@ -1359,6 +1361,13 @@ CONFIG_ITEMS = [ help = 'section as name and contents [NAME section] or section to print', ), + ConfigItem( + '--profile', + metavar='TEST|@PATH', + help='Profile information [.profile section]', + config_key = 'UKI/Uname', + ), + ConfigItem( '--efi-arch', metavar = 'ARCH',