]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Teach 60-ukify.install to search the staging dir
authorMarc Pervaz Boocha <mboocha@sudomsg.xyz>
Sun, 30 Jul 2023 17:05:39 +0000 (22:35 +0530)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 7 Aug 2023 10:11:05 +0000 (12:11 +0200)
60-ukify.install would only work with initrd provided by command line
arguements. Fixed to look for both microcode and initrd is found in
$KERNEL_INSTALL_STAGING_AREA which is placed by initrd generator like
mkinitcpio

src/kernel-install/60-ukify.install.in

index 96ca2482b061a769d508061eee34ff71eba434d8..ecef36b324918cf6cac24566c15ddb1c71f417d5 100755 (executable)
@@ -171,6 +171,14 @@ def kernel_cmdline(opts) -> str:
     return ' ' + ' '.join(options)
 
 
+def initrd_list(opts) -> list[Path]:
+    microcode = sorted(opts.staging_area.glob('microcode/*'))
+    initrd = sorted(opts.staging_area.glob('initrd*'))
+
+    #Order taken from 90-loaderentry.install
+    return [*microcode, *opts.initrd, *initrd]
+
+
 def call_ukify(opts):
     # Punish me harder.
     # We want this:
@@ -191,7 +199,7 @@ def call_ukify(opts):
     opts2.config = config_file_location()
     opts2.uname = opts.kernel_version
     opts2.linux = opts.kernel_image
-    opts2.initrd = opts.initrd
+    opts2.initrd = initrd_list(opts)
     # Note that 'uki.efi' is the name required by 90-uki-copy.install.
     opts2.output = opts.staging_area / 'uki.efi'