]> Git Repo - J-u-boot.git/blobdiff - arch/x86/lib/bootm.c
command: Remove the cmd_tbl_t typedef
[J-u-boot.git] / arch / x86 / lib / bootm.c
index e548cdbed5923252f67a8f392332e5c38d57df05..1569d30f8ed0aa3aec13a02371c8af438e55a0ca 100644 (file)
@@ -1,15 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2002
  * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
  * Marius Groeger <[email protected]>
  *
  * Copyright (C) 2001  Erik Mouw ([email protected])
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
+#include <hang.h>
 #include <dm/device.h>
 #include <dm/root.h>
 #include <errno.h>
@@ -28,15 +29,6 @@ DECLARE_GLOBAL_DATA_PTR;
 
 #define COMMAND_LINE_OFFSET 0x9000
 
-int arch_fixup_fdt(void *blob)
-{
-       return 0;
-}
-
-__weak void board_quiesce_devices(void)
-{
-}
-
 void bootm_announce_and_cleanup(void)
 {
        printf("\nStarting kernel ...\n\n");
@@ -45,7 +37,7 @@ void bootm_announce_and_cleanup(void)
        timestamp_add_now(TS_U_BOOT_START_KERNEL);
 #endif
        bootstage_mark_name(BOOTSTAGE_ID_BOOTM_HANDOFF, "start_kernel");
-#ifdef CONFIG_BOOTSTAGE_REPORT
+#if CONFIG_IS_ENABLED(BOOTSTAGE_REPORT)
        bootstage_report();
 #endif
 
@@ -126,6 +118,10 @@ static int boot_prep_linux(bootm_headers_t *images)
                char *base_ptr;
 
                base_ptr = (char *)load_zimage(data, len, &load_address);
+               if (!base_ptr) {
+                       puts("## Kernel loading failed ...\n");
+                       goto error;
+               }
                images->os.load = load_address;
                cmd_line_dest = base_ptr + COMMAND_LINE_OFFSET;
                images->ep = (ulong)base_ptr;
@@ -210,8 +206,8 @@ static int boot_jump_linux(bootm_headers_t *images)
                                 images->os.arch == IH_ARCH_X86_64);
 }
 
-int do_bootm_linux(int flag, int argc, char * const argv[],
-               bootm_headers_t *images)
+int do_bootm_linux(int flag, int argc, char *const argv[],
+                  bootm_headers_t *images)
 {
        /* No need for those on x86 */
        if (flag & BOOTM_STATE_OS_BD_T || flag & BOOTM_STATE_OS_CMDLINE)
This page took 0.026698 seconds and 4 git commands to generate.