diff options
authorMatt Fleming <matt.fleming@intel.com>2013-06-24 09:34:39 +0100
committerMatt Fleming <matt.fleming@intel.com>2013-06-24 09:46:38 +0100
commitacf2fcb4cc03c14fd144a740d68ff399e1932d9e (patch)
parent2a81889c7d680fbe51de63dbbeb4e8c290ec46fa (diff)
load_linux: fallback to the BIOS linux loader
The BIOS firmware backend is missing a .load_linux pointer, and so anyone trying to boot a Linux kernel under BIOS is hitting the following error message, "No linux boot function registered for firmware" The usual way to handle this kind of abstraction would be to move bios_load_linux() to core/bios.c and assign it to .load_linux, but that would necessitate pulling the movebits and shuffler code into the core. For now, leave the BIOS loader where it is and use it as the default. In future we will want to move this to BIOS-specific code (though not necessarily in the core) because, by having it in the generic loader code, it is currently being built for the EFI backends even though it is never used. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
1 files changed, 5 insertions, 6 deletions
diff --git a/com32/lib/syslinux/load_linux.c b/com32/lib/syslinux/load_linux.c
index 120c69b4..914258ba 100644
--- a/com32/lib/syslinux/load_linux.c
+++ b/com32/lib/syslinux/load_linux.c
@@ -517,11 +517,10 @@ int syslinux_boot_linux(void *kernel_buf, size_t kernel_size,
struct setup_data *setup_data,
char *cmdline)
- if (!firmware->boot_linux) {
- printf("No linux boot function registered for firmware\n");
- return -1;
- }
+ if (firmware->boot_linux)
+ return firmware->boot_linux(kernel_buf, kernel_size, initramfs,
+ setup_data, cmdline);
- return firmware->boot_linux(kernel_buf, kernel_size, initramfs,
- setup_data, cmdline);
+ return bios_boot_linux(kernel_buf, kernel_size, initramfs,
+ setup_data, cmdline);