Files
openbios/libopenbios/load.c
Blue Swirl 626c95da21 Fix Unix target build
Fix build failure:
  LINK  openbios-unix
libopenbios.a(load.o)(.text+0xe0): In function `load':
../libopenbios/load.c:58: undefined reference to `elf_boot_notes'
libopenbios.a(load.o)(.text+0xe8):../libopenbios/load.c:58: undefined reference to `elf_boot_notes'

Move elf_boot_notes variable to load.c to make it also available on
Unix build. Also fix a spurious sys_info variable definition.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@829 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-01 21:15:14 +00:00

75 lines
1.4 KiB
C

/*
* Creation Date: <2010/06/25 20:00:00 mcayland>
* Time-stamp: <2010/06/25 20:00:00 mcayland>
*
* <load.c>
*
* C implementation of load
*
* Copyright (C) 2010 Mark Cave-Ayland (mark.cave-ayland@siriusit.co.uk)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2
*
*/
#include "config.h"
#include "kernel/kernel.h"
#include "libopenbios/bindings.h"
#include "libopenbios/sys_info.h"
#include "libopenbios/load.h"
#ifdef CONFIG_LOADER_ELF
#include "libopenbios/elf_load.h"
#endif
#ifdef CONFIG_LOADER_AOUT
#include "libopenbios/aout_load.h"
#endif
#ifdef CONFIG_LOADER_FCODE
#include "libopenbios/fcode_load.h"
#endif
#ifdef CONFIG_LOADER_FORTH
#include "libopenbios/forth_load.h"
#endif
struct sys_info sys_info;
void *elf_boot_notes = NULL;
void load(ihandle_t dev)
{
/* Invoke the loaders on the specified device */
char *param;
#ifdef CONFIG_LOADER_ELF
/* Grab the boot arguments */
push_str("bootargs");
push_str("/chosen");
fword("(find-dev)");
POP();
fword("get-package-property");
POP();
param = pop_fstr_copy();
elf_load(&sys_info, dev, param, &elf_boot_notes);
#endif
#ifdef CONFIG_LOADER_AOUT
aout_load(&sys_info, dev);
#endif
#ifdef CONFIG_LOADER_FCODE
fcode_load(dev);
#endif
#ifdef CONFIG_LOADER_FORTH
forth_load(dev);
#endif
}