Files
openbios/arch/amd64/boot.c
Blue Swirl 58ca864765 Delete extra whitespace at the end of line, which annoys quilt
git-svn-id: svn://coreboot.org/openbios/openbios-devel@284 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-11 20:30:53 +00:00

44 lines
926 B
C

/*
*
*/
#undef BOOTSTRAP
#include "openbios/config.h"
#include "openbios/bindings.h"
#include "openbios/elfload.h"
#include "openbios/nvram.h"
#include "libc/diskio.h"
#include "sys_info.h"
int elf_load(struct sys_info *, const char *filename, const char *cmdline);
int linux_load(struct sys_info *, const char *filename, const char *cmdline);
void boot(void);
struct sys_info sys_info;
void boot(void)
{
char *path=pop_fstr_copy(), *param;
// char *param="root=/dev/hda2 console=ttyS0,115200n8 console=tty0";
if(!path) {
printk("[x86] Booting default not supported.\n");
return;
}
param = strchr(path, ' ');
if(param) {
*param = '\0';
param++;
}
printk("[x86] Booting file '%s' with parameters '%s'\n",path, param);
if (elf_load(&sys_info, path, param) == LOADER_NOT_SUPPORT)
if (linux_load(&sys_info, path, param) == LOADER_NOT_SUPPORT)
printk("Unsupported image format\n");
free(path);
}