summaryrefslogtreecommitdiff
path: root/boot/bootm_os.c
diff options
context:
space:
mode:
Diffstat (limited to 'boot/bootm_os.c')
-rw-r--r--boot/bootm_os.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/boot/bootm_os.c b/boot/bootm_os.c
index 15297ddb530..6a6621706f7 100644
--- a/boot/bootm_os.c
+++ b/boot/bootm_os.c
@@ -8,6 +8,7 @@
#include <bootstage.h>
#include <cpu_func.h>
#include <efi_loader.h>
+#include <elf.h>
#include <env.h>
#include <fdt_support.h>
#include <image.h>
@@ -394,6 +395,20 @@ static int do_bootm_qnxelf(int flag, struct bootm_info *bmi)
}
#endif
+#if defined(CONFIG_BOOTM_ELF)
+static int do_bootm_elf(int flag, struct bootm_info *bmi)
+{
+ Bootelf_flags flags = { .autostart = 1 };
+
+ if (flag != BOOTM_STATE_OS_GO)
+ return 0;
+
+ bootelf(bmi->images->ep, flags, 0, NULL);
+
+ return 1;
+}
+#endif
+
#ifdef CONFIG_INTEGRITY
static int do_bootm_integrity(int flag, struct bootm_info *bmi)
{
@@ -535,6 +550,9 @@ static boot_os_fn *boot_os[] = {
#ifdef CONFIG_BOOTM_EFI
[IH_OS_EFI] = do_bootm_efi,
#endif
+#if defined(CONFIG_BOOTM_ELF)
+ [IH_OS_ELF] = do_bootm_elf,
+#endif
};
/* Allow for arch specific config before we boot */