]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[lkrn] Shut down devices before jumping to kernel entry point
authorMichael Brown <mcb30@ipxe.org>
Wed, 21 May 2025 13:22:36 +0000 (14:22 +0100)
committerMichael Brown <mcb30@ipxe.org>
Wed, 21 May 2025 14:07:55 +0000 (15:07 +0100)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/image/lkrn.c

index 15e9c0d7bc7cdb01a36697fda5f4f8e7e8e65d10..c6c5f9b152552b16b2f2e4bf2259bde518cf5680 100644 (file)
@@ -33,6 +33,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
 #include <ipxe/segment.h>
 #include <ipxe/io.h>
 #include <ipxe/fdt.h>
+#include <ipxe/init.h>
 #include <ipxe/lkrn.h>
 
 /** @file
@@ -227,6 +228,9 @@ static int lkrn_exec ( struct image *image ) {
        if ( ( rc = lkrn_load ( image, &ctx ) ) != 0 )
                return rc;
 
+       /* Shut down ready for boot */
+       shutdown_boot();
+
        /* Jump to kernel entry point */
        DBGC ( image, "LKRN %s jumping to kernel at %#08lx\n",
               image->name, ctx.entry );