summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2024-07-02 09:38:53 +0200
committerLennart Poettering <lennart@poettering.net>2024-09-06 16:12:03 +0200
commit22b8236ff61f5427b5f266ca65b983a50502d5bc (patch)
tree5f7fec3855b5a74b3b79f5c157bb8b64cd113e16
parentjournald: mention the access mode we tried to open /dev/kmsg in (diff)
downloadsystemd-22b8236ff61f5427b5f266ca65b983a50502d5bc.tar.xz
systemd-22b8236ff61f5427b5f266ca65b983a50502d5bc.zip
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.
Diffstat (limited to '')
-rw-r--r--man/ukify.xml11
-rwxr-xr-xsrc/ukify/ukify.py9
2 files changed, 20 insertions, 0 deletions
diff --git a/man/ukify.xml b/man/ukify.xml
index bfe54a8f27..1c52c9414b 100644
--- a/man/ukify.xml
+++ b/man/ukify.xml
@@ -401,6 +401,17 @@
</varlistentry>
<varlistentry>
+ <term><varname>Profile=<replaceable>PATH</replaceable></varname></term>
+ <term><option>--profile=<replaceable>PATH</replaceable></option></term>
+
+ <listitem><para>A path to a UKI profile to place in an <literal>.profile</literal> section. This
+ option is useful for creating multi-profile UKIs, and is typically used in combination with
+ <option>--extend=</option>, to extend the specified UKI with an additional profile.</para>
+
+ <xi:include href="version-info.xml" xpointer="v257"/></listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><varname>PCRBanks=<replaceable>PATH</replaceable></varname></term>
<term><option>--pcr-banks=<replaceable>PATH</replaceable></option></term>
diff --git a/src/ukify/ukify.py b/src/ukify/ukify.py
index 3478ff5689..c8b6ce401b 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 ),
@@ -1360,6 +1362,13 @@ CONFIG_ITEMS = [
),
ConfigItem(
+ '--profile',
+ metavar='TEST|@PATH',
+ help='Profile information [.profile section]',
+ config_key = 'UKI/Uname',
+ ),
+
+ ConfigItem(
'--efi-arch',
metavar = 'ARCH',
choices = ('ia32', 'x64', 'arm', 'aa64', 'riscv64'),