2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
Move loader out of the kernel * kern/loader.c: moved to ... * commands/boot.c: ... moved here * commands/minicmd.c (grub_mini_cmd_boot): moved to ... * commands/boot.c (grub_cmd_boot): moved here. All users updated * include/grub/kernel.h (grub_machine_fini): export * include/grub/loader.h (grub_loader_is_loaded): update declaration (grub_loader_set): likewise (grub_loader_unset): likewise (grub_loader_boot): likewise * conf/common.rmk: new module boot.mod (pkglib_MODULES): add boot.mod * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c (grub_emu_SOURCES): likewise * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise (grub_emu_SOURCES): likewise * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise (grub_emu_SOURCES): likewise * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise (grub_emu_SOURCES): likewise * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise (grub_emu_SOURCES): likewise * conf/sparcs64-ieee1275.rmk (kernel_elf_SOURCES): likewise (grub_emu_SOURCES): likewise * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise (grub_emu_SOURCES): likewise
This commit is contained in:
parent
5999d61917
commit
0d5d565326
13 changed files with 125 additions and 50 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2002,2005,2006,2007,2008 Free Software Foundation, Inc.
|
||||
* Copyright (C) 2002,2005,2006,2007,2008,2009 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -64,7 +64,7 @@ void grub_main (void);
|
|||
void grub_machine_init (void);
|
||||
|
||||
/* The machine-specific finalization. */
|
||||
void grub_machine_fini (void);
|
||||
void EXPORT_FUNC(grub_machine_fini) (void);
|
||||
|
||||
/* The machine-specific prefix initialization. */
|
||||
void grub_machine_set_prefix (void);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* loader.h - OS loaders */
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2002,2003,2004,2006,2007 Free Software Foundation, Inc.
|
||||
* Copyright (C) 2002,2003,2004,2006,2007,2009 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -26,19 +26,19 @@
|
|||
#include <grub/types.h>
|
||||
|
||||
/* Check if a loader is loaded. */
|
||||
int EXPORT_FUNC(grub_loader_is_loaded) (void);
|
||||
int grub_loader_is_loaded (void);
|
||||
|
||||
/* Set loader functions. NORETURN must be set to true, if BOOT won't return
|
||||
to the original state. */
|
||||
void EXPORT_FUNC(grub_loader_set) (grub_err_t (*boot) (void),
|
||||
grub_err_t (*unload) (void),
|
||||
int noreturn);
|
||||
void grub_loader_set (grub_err_t (*boot) (void),
|
||||
grub_err_t (*unload) (void),
|
||||
int noreturn);
|
||||
|
||||
/* Unset current loader, if any. */
|
||||
void EXPORT_FUNC(grub_loader_unset) (void);
|
||||
void grub_loader_unset (void);
|
||||
|
||||
/* Call the boot hook in current loader. This may or may not return,
|
||||
depending on the setting by grub_loader_set. */
|
||||
grub_err_t EXPORT_FUNC(grub_loader_boot) (void);
|
||||
grub_err_t grub_loader_boot (void);
|
||||
|
||||
#endif /* ! GRUB_LOADER_HEADER */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue