Remove -DGRUB_UTIL when compiling grub-emu
This commit is contained in:
parent
1eebb21608
commit
2083672af1
14 changed files with 24 additions and 134 deletions
|
@ -91,7 +91,12 @@ grub_dl_t grub_dl_load_core (void *addr, grub_size_t size);
|
|||
int EXPORT_FUNC(grub_dl_unload) (grub_dl_t mod);
|
||||
void grub_dl_unload_unneeded (void);
|
||||
void grub_dl_unload_all (void);
|
||||
#ifdef GRUB_UTIL
|
||||
#if defined (GRUB_MACHINE_EMU) || defined (GRUB_UTIL)
|
||||
#define GRUB_NO_MODULES 1
|
||||
#else
|
||||
#define GRUB_NO_MODULES 0
|
||||
#endif
|
||||
#if GRUB_NO_MODULES
|
||||
static inline int
|
||||
grub_dl_ref (grub_dl_t mod)
|
||||
{
|
||||
|
@ -116,7 +121,7 @@ grub_err_t grub_dl_register_symbol (const char *name, void *addr,
|
|||
grub_err_t grub_arch_dl_check_header (void *ehdr);
|
||||
grub_err_t grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr);
|
||||
|
||||
#if defined (_mips) && ! defined (GRUB_UTIL)
|
||||
#if defined (_mips) && ! defined (GRUB_UTIL) && !defined (GRUB_MACHINE_EMU)
|
||||
#define GRUB_LINKER_HAVE_INIT 1
|
||||
void grub_arch_dl_init_linker (void);
|
||||
#endif
|
||||
|
|
|
@ -36,7 +36,7 @@ void *EXPORT_FUNC(grub_realloc) (void *ptr, grub_size_t size);
|
|||
void *EXPORT_FUNC(grub_memalign) (grub_size_t align, grub_size_t size);
|
||||
|
||||
/* For debugging. */
|
||||
#if defined(MM_DEBUG) && !defined(GRUB_UTIL)
|
||||
#if defined(MM_DEBUG) && !defined(GRUB_UTIL) && !defined (GRUB_MACHINE_EMU)
|
||||
/* Set this variable to 1 when you want to trace all memory function calls. */
|
||||
extern int EXPORT_VAR(grub_mm_debug);
|
||||
|
||||
|
|
|
@ -1,70 +0,0 @@
|
|||
/* multiboot2.h - multiboot2 header file with grub definitions. */
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2005,2007 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
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GRUB_MULTIBOOT2_HEADER
|
||||
#define GRUB_MULTIBOOT2_HEADER 1
|
||||
|
||||
#include <grub/types.h>
|
||||
#include <grub/err.h>
|
||||
#include <grub/elf.h>
|
||||
|
||||
#ifndef GRUB_UTIL
|
||||
typedef grub_uint32_t uint32_t;
|
||||
typedef grub_uint64_t uint64_t;
|
||||
#define __WORDSIZE GRUB_TARGET_WORDSIZE
|
||||
#endif
|
||||
|
||||
struct multiboot2_tag_header;
|
||||
|
||||
grub_err_t
|
||||
grub_mb2_tag_alloc (grub_addr_t *addr, int key, grub_size_t len);
|
||||
|
||||
grub_err_t
|
||||
grub_mb2_tags_arch_create (void);
|
||||
|
||||
void
|
||||
grub_mb2_arch_boot (grub_addr_t entry, void *tags);
|
||||
|
||||
void
|
||||
grub_mb2_arch_unload (struct multiboot2_tag_header *tags);
|
||||
|
||||
grub_err_t
|
||||
grub_mb2_arch_elf32_hook (Elf32_Phdr *phdr, grub_addr_t *addr, int *do_load);
|
||||
|
||||
grub_err_t
|
||||
grub_mb2_arch_elf64_hook (Elf64_Phdr *phdr, grub_addr_t *addr, int *do_load);
|
||||
|
||||
grub_err_t
|
||||
grub_mb2_arch_module_alloc (grub_size_t size, grub_addr_t *addr);
|
||||
|
||||
grub_err_t
|
||||
grub_mb2_arch_module_free (grub_addr_t addr, grub_size_t size);
|
||||
|
||||
void
|
||||
grub_multiboot2 (int argc, char *argv[]);
|
||||
|
||||
void
|
||||
grub_module2 (int argc, char *argv[]);
|
||||
|
||||
#define for_each_tag(tag, tags) \
|
||||
for (tag = tags; \
|
||||
tag && tag->key != MULTIBOOT2_TAG_END; \
|
||||
tag = (struct multiboot2_tag_header *)((char *)tag + tag->len))
|
||||
|
||||
#endif /* ! GRUB_MULTIBOOT2_HEADER */
|
|
@ -110,37 +110,4 @@ void read_terminal_list (void);
|
|||
|
||||
void grub_set_more (int onoff);
|
||||
|
||||
#ifdef GRUB_UTIL
|
||||
void grub_normal_init (void);
|
||||
void grub_normal_fini (void);
|
||||
void grub_hello_init (void);
|
||||
void grub_hello_fini (void);
|
||||
void grub_ls_init (void);
|
||||
void grub_ls_fini (void);
|
||||
void grub_cat_init (void);
|
||||
void grub_cat_fini (void);
|
||||
void grub_boot_init (void);
|
||||
void grub_boot_fini (void);
|
||||
void grub_cmp_init (void);
|
||||
void grub_cmp_fini (void);
|
||||
void grub_terminal_init (void);
|
||||
void grub_terminal_fini (void);
|
||||
void grub_loop_init (void);
|
||||
void grub_loop_fini (void);
|
||||
void grub_help_init (void);
|
||||
void grub_help_fini (void);
|
||||
void grub_halt_init (void);
|
||||
void grub_halt_fini (void);
|
||||
void grub_reboot_init (void);
|
||||
void grub_reboot_fini (void);
|
||||
void grub_configfile_init (void);
|
||||
void grub_configfile_fini (void);
|
||||
void grub_search_init (void);
|
||||
void grub_search_fini (void);
|
||||
void grub_test_init (void);
|
||||
void grub_test_fini (void);
|
||||
void grub_blocklist_init (void);
|
||||
void grub_blocklist_fini (void);
|
||||
#endif
|
||||
|
||||
#endif /* ! GRUB_NORMAL_HEADER */
|
||||
|
|
|
@ -83,20 +83,6 @@ void EXPORT_FUNC(grub_partition_map_register) (grub_partition_map_t partmap);
|
|||
|
||||
void EXPORT_FUNC(grub_partition_map_unregister) (grub_partition_map_t partmap);
|
||||
|
||||
#ifdef GRUB_UTIL
|
||||
void grub_msdos_partition_map_init (void);
|
||||
void grub_msdos_partition_map_fini (void);
|
||||
void grub_amiga_partition_map_init (void);
|
||||
void grub_amiga_partition_map_fini (void);
|
||||
void grub_apple_partition_map_init (void);
|
||||
void grub_apple_partition_map_fini (void);
|
||||
void grub_sun_partition_map_init (void);
|
||||
void grub_sun_partition_map_fini (void);
|
||||
void grub_gpt_partition_map_init (void);
|
||||
void grub_gpt_partition_map_fini (void);
|
||||
void grub_apple_partition_map_init (void);
|
||||
void grub_apple_partition_map_fini (void);
|
||||
#endif
|
||||
|
||||
static inline grub_disk_addr_t
|
||||
grub_partition_get_start (const grub_partition_t p)
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
|
||||
typedef grub_uint32_t grub_pci_id_t;
|
||||
|
||||
#ifdef GRUB_UTIL
|
||||
#ifdef GRUB_MACHINE_EMU
|
||||
#include <grub/pciutils.h>
|
||||
#else
|
||||
typedef grub_uint32_t grub_pci_address_t;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue