fix compilation on coreboot
This commit is contained in:
parent
e39029dd1e
commit
11aadbadfb
12 changed files with 16 additions and 36 deletions
|
@ -32,10 +32,10 @@ kernel_img_SOURCES = kern/i386/coreboot/startup.S \
|
|||
term/i386/pc/vga_text.c term/i386/vga_common.c \
|
||||
symlist.c
|
||||
kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
||||
env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
|
||||
env.h err.h file.h fs.h kernel.h misc.h mm.h net.h parser.h \
|
||||
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
||||
machine/boot.h machine/console.h machine/init.h \
|
||||
machine/memory.h machine/loader.h list.h handler.h command.h i18n.h
|
||||
machine/memory.h list.h handler.h command.h i18n.h mm_private.h
|
||||
kernel_img_CFLAGS = $(COMMON_CFLAGS)
|
||||
kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
|
||||
kernel_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-S,-Ttext,$(GRUB_KERNEL_MACHINE_LINK_ADDR),-Bstatic
|
||||
|
@ -76,10 +76,10 @@ kernel_img_SOURCES = kern/i386/qemu/startup.S \
|
|||
term/i386/pc/vga_text.c term/i386/vga_common.c \
|
||||
symlist.c
|
||||
kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
||||
env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
|
||||
env.h err.h file.h fs.h kernel.h misc.h mm.h net.h parser.h \
|
||||
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
||||
machine/boot.h machine/console.h machine/init.h \
|
||||
machine/memory.h machine/loader.h list.h handler.h command.h i18n.h
|
||||
machine/memory.h list.h handler.h command.h i18n.h mm_private.h
|
||||
kernel_img_CFLAGS = $(COMMON_CFLAGS) -DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR)
|
||||
kernel_img_ASFLAGS = $(COMMON_ASFLAGS) -DGRUB_KERNEL_MACHINE_LINK_ADDR=$(GRUB_KERNEL_MACHINE_LINK_ADDR)
|
||||
kernel_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)$(GRUB_KERNEL_MACHINE_LINK_ADDR)
|
||||
|
|
|
@ -49,9 +49,9 @@ kernel_img_SOURCES = kern/i386/efi/startup.S kern/main.c kern/device.c \
|
|||
kern/generic/rtc_get_time_ms.c \
|
||||
kern/generic/millisleep.c
|
||||
kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
||||
env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
|
||||
env.h err.h file.h fs.h kernel.h misc.h mm.h net.h parser.h \
|
||||
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
||||
efi/efi.h efi/time.h efi/disk.h i386/pit.h list.h handler.h command.h i18n.h
|
||||
efi/efi.h efi/time.h efi/disk.h i386/pit.h list.h handler.h command.h i18n.h mm_private.h
|
||||
kernel_img_CFLAGS = $(COMMON_CFLAGS)
|
||||
kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
|
||||
kernel_img_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
|
|
@ -30,10 +30,10 @@ kernel_img_SOURCES = kern/i386/ieee1275/startup.S \
|
|||
disk/ieee1275/ofdisk.c \
|
||||
symlist.c
|
||||
kernel_img_HEADERS = cache.h device.h disk.h dl.h elf.h elfload.h \
|
||||
env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
|
||||
env.h err.h file.h fs.h kernel.h misc.h mm.h net.h parser.h \
|
||||
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
||||
ieee1275/ieee1275.h machine/kernel.h machine/loader.h machine/memory.h \
|
||||
list.h handler.h command.h i18n.h
|
||||
ieee1275/ieee1275.h machine/kernel.h machine/memory.h \
|
||||
list.h handler.h command.h i18n.h mm_private.h
|
||||
kernel_img_CFLAGS = $(COMMON_CFLAGS)
|
||||
kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
|
||||
kernel_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-S,-Ttext,0x10000,-Bstatic
|
||||
|
|
|
@ -60,7 +60,7 @@ kernel_img_SOURCES = kern/i386/pc/startup.S \
|
|||
term/i386/pc/console.c term/i386/vga_common.c \
|
||||
symlist.c
|
||||
kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
||||
env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
|
||||
env.h err.h file.h fs.h kernel.h misc.h mm.h net.h parser.h \
|
||||
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
||||
machine/biosdisk.h machine/boot.h machine/console.h machine/init.h \
|
||||
machine/memory.h machine/loader.h machine/vga.h machine/vbe.h \
|
||||
|
|
|
@ -15,9 +15,9 @@ DEFSYMFILES += kernel_syms.lst
|
|||
|
||||
kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
||||
env.h err.h file.h fs.h kernel.h misc.h mm.h net.h parser.h reader.h \
|
||||
symbol.h term.h time.h types.h powerpc/libgcc.h loader.h partition.h \
|
||||
symbol.h term.h time.h types.h powerpc/libgcc.h partition.h \
|
||||
msdos_partition.h ieee1275/ieee1275.h machine/kernel.h handler.h list.h \
|
||||
command.h i18n.h
|
||||
command.h i18n.h mm_private.h
|
||||
|
||||
symlist.c: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h gensymlist.sh
|
||||
/bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
||||
|
|
|
@ -27,11 +27,11 @@ MOSTLYCLEANFILES += symlist.c kernel_syms.lst
|
|||
DEFSYMFILES += kernel_syms.lst
|
||||
|
||||
kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
||||
env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
|
||||
env.h err.h file.h fs.h kernel.h misc.h mm.h net.h parser.h \
|
||||
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
||||
list.h handler.h command.h i18n.h \
|
||||
sparc64/libgcc.h ieee1275/ieee1275.h machine/kernel.h \
|
||||
sparc64/ieee1275/ieee1275.h
|
||||
sparc64/ieee1275/ieee1275.h mm_private.h
|
||||
kernel_img_SOURCES = kern/sparc64/ieee1275/crt0.S kern/ieee1275/cmain.c \
|
||||
kern/ieee1275/ieee1275.c kern/main.c kern/device.c \
|
||||
kern/disk.c kern/dl.c kern/err.c kern/file.c kern/fs.c \
|
||||
|
|
|
@ -51,7 +51,7 @@ kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
|||
env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
|
||||
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
||||
efi/efi.h efi/time.h efi/disk.h machine/loader.h i386/pit.h list.h \
|
||||
handler.h command.h i18n.h
|
||||
handler.h command.h i18n.h mm_private.h
|
||||
kernel_img_CFLAGS = $(COMMON_CFLAGS)
|
||||
kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
|
||||
kernel_img_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
#include <grub/cpu/loader.h>
|
|
@ -1 +0,0 @@
|
|||
#include <grub/cpu/loader.h>
|
|
@ -41,9 +41,6 @@
|
|||
extern char _start[];
|
||||
extern char _end[];
|
||||
|
||||
grub_addr_t grub_os_area_addr;
|
||||
grub_size_t grub_os_area_size;
|
||||
|
||||
grub_uint32_t
|
||||
grub_get_rtc (void)
|
||||
{
|
||||
|
@ -105,20 +102,7 @@ grub_machine_init (void)
|
|||
}
|
||||
}
|
||||
|
||||
if (addr == GRUB_MEMORY_MACHINE_UPPER_START
|
||||
|| (addr >= GRUB_MEMORY_MACHINE_LOWER_SIZE
|
||||
&& addr <= GRUB_MEMORY_MACHINE_UPPER_START
|
||||
&& (addr + size > GRUB_MEMORY_MACHINE_UPPER_START)))
|
||||
{
|
||||
grub_size_t quarter = size >> 2;
|
||||
|
||||
grub_os_area_addr = addr;
|
||||
grub_os_area_size = size - quarter;
|
||||
grub_mm_init_region ((void *) (grub_os_area_addr + grub_os_area_size),
|
||||
quarter);
|
||||
}
|
||||
else
|
||||
grub_mm_init_region ((void *) (grub_addr_t) addr, (grub_size_t) size);
|
||||
grub_mm_init_region ((void *) (grub_addr_t) addr, (grub_size_t) size);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
#include <grub/loader.h>
|
||||
#include <grub/machine/memory.h>
|
||||
#include <grub/machine/loader.h>
|
||||
#include <grub/normal.h>
|
||||
#include <grub/file.h>
|
||||
#include <grub/disk.h>
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#define UNSUPPORTED_FLAGS 0x0000fff0
|
||||
|
||||
#include <grub/loader.h>
|
||||
#include <grub/machine/loader.h>
|
||||
#include <grub/multiboot.h>
|
||||
#include <grub/machine/init.h>
|
||||
#include <grub/machine/memory.h>
|
||||
|
|
Loading…
Reference in a new issue