09d842b9c6
Mmap services * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate * loader/i386/linux.c (find_mmap_size): likewise (allocate_pages): likewise * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise (grub_fill_multiboot_mmap): likewise (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition (OPENBSD_MMAP_RESERVED): likewise * include/grub/i386/pc/memory.h: include grub/memory.h (grub_lower_mem): removed (grub_upper_mem): likewise (GRUB_MACHINE_MEMORY_ACPI): new definition (GRUB_MACHINE_MEMORY_NVS): likewise (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise (GRUB_MACHINE_MEMORY_HOLE): likewise (grub_machine_mmap_register): likewise (grub_machine_mmap_unregister): likewise (grub_machine_get_upper): likewise (grub_machine_get_lower): likewise (grub_machine_get_post64): likewise * include/grub/i386/efi/memory.h: new file * include/grub/x86_64/efi/memory.h: likewise * include/grub/efi/memory.h: likewise * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod (mmap_mod_SOURCES): new variable (mmap_mod_LDFLAGS): likewise (mmap_mod_ASFLAGS): likewise * conf/i386-coreboot.rmk: likewise * conf/i386-ieee1275.rmk: likewise * conf/i386-efi.rmk: likewise * conf/x86_64-efi.rmk: likewise * include/grub/types.h (UINT_TO_PTR): new macro (PTR_TO_UINT32): likewise (PTR_TO_UINT64): likewise * include/grub/memory.h: new file * mmap/i386/pc/mmap.c: likewise * mmap/i386/pc/mmap_helper.S: likewise * mmap/i386/uppermem.c: likewise * mmap/mmap.c: likewise * mmap/efi/mmap.c: likewise * kern/i386/coreboot/init.c (grub_machine_init): don't use grub_upper_mem * kern/i386/pc/init.c (grub_lower_mem): removed variable (grub_upper_mem): likewise (grub_machine_init): don't use grub_upper_mem, make grub_lower_mem local * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower, grub_mmap_iterate and grub_mmap_get_upper (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
185 lines
6.2 KiB
Makefile
185 lines
6.2 KiB
Makefile
# -*- makefile -*-
|
|
|
|
COMMON_ASFLAGS = -nostdinc -fno-builtin -m32
|
|
COMMON_CFLAGS = -fno-builtin -m32
|
|
COMMON_LDFLAGS = -melf_i386 -nostdlib
|
|
|
|
# Used by various components. These rules need to precede them.
|
|
script/sh/lexer.c_DEPENDENCIES = grub_script.tab.h
|
|
|
|
# Utilities.
|
|
bin_UTILITIES = grub-mkimage
|
|
sbin_UTILITIES = grub-mkdevicemap
|
|
#ifeq ($(enable_grub_emu), yes)
|
|
#sbin_UTILITIES += grub-emu
|
|
#endif
|
|
|
|
# For grub-mkimage.
|
|
grub_mkimage_SOURCES = util/i386/efi/grub-mkimage.c util/misc.c \
|
|
util/resolve.c
|
|
util/i386/efi/grub-mkimage.c_DEPENDENCIES = Makefile
|
|
|
|
# For grub-setup.
|
|
#grub_setup_SOURCES = util/i386/pc/grub-setup.c util/hostdisk.c \
|
|
# util/misc.c util/getroot.c kern/device.c kern/disk.c \
|
|
# kern/err.c kern/misc.c fs/fat.c fs/ext2.c fs/xfs.c fs/affs.c \
|
|
# fs/sfs.c kern/parser.c kern/partition.c partmap/pc.c \
|
|
# fs/ufs.c fs/minix.c fs/hfs.c fs/jfs.c fs/hfsplus.c kern/file.c \
|
|
# kern/fs.c kern/env.c fs/fshelp.c
|
|
|
|
# For grub-mkdevicemap.
|
|
grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
|
|
util/devicemap.c util/misc.c
|
|
|
|
# For grub-emu.
|
|
util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
|
|
grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \
|
|
commands/configfile.c commands/help.c \
|
|
commands/handler.c commands/ls.c commands/test.c \
|
|
commands/search.c commands/hexdump.c lib/hexdump.c \
|
|
commands/halt.c commands/reboot.c \
|
|
commands/i386/cpuid.c \
|
|
disk/loopback.c \
|
|
\
|
|
fs/affs.c fs/cpio.c fs/ext2.c fs/fat.c fs/hfs.c \
|
|
fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c \
|
|
fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c \
|
|
fs/ufs.c fs/xfs.c fs/afs.c fs/tar.c \
|
|
\
|
|
io/gzio.c \
|
|
kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c \
|
|
kern/err.c kern/list.c kern/handler.c \
|
|
kern/command.c kern/corecmd.c commands/extcmd.c \
|
|
normal/execute.c kern/file.c kern/fs.c normal/lexer.c \
|
|
commands/boot.c kern/main.c kern/misc.c kern/parser.c \
|
|
grub_script.tab.c kern/partition.c kern/rescue.c kern/term.c \
|
|
lib/arg.c normal/cmdline.c normal/command.c normal/datetime.c \
|
|
normal/function.c \
|
|
normal/completion.c normal/context.c normal/main.c \
|
|
normal/menu.c normal/menu_entry.c normal/menu_viewer.c \
|
|
normal/menu_text.c \
|
|
normal/misc.c normal/script.c \
|
|
normal/color.c \
|
|
partmap/amiga.c partmap/apple.c partmap/pc.c partmap/sun.c \
|
|
partmap/acorn.c partmap/gpt.c \
|
|
util/console.c util/hostfs.c util/grub-emu.c util/misc.c \
|
|
util/hostdisk.c util/getroot.c \
|
|
util/i386/pc/misc.c \
|
|
\
|
|
disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \
|
|
disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \
|
|
commands/parttool.c parttool/pcpart.c \
|
|
grub_emu_init.c
|
|
|
|
grub_emu_LDFLAGS = $(LIBCURSES)
|
|
|
|
# Scripts.
|
|
sbin_SCRIPTS = grub-install
|
|
|
|
# For grub-install.
|
|
grub_install_SOURCES = util/i386/efi/grub-install.in
|
|
|
|
# Modules.
|
|
pkglib_MODULES = kernel.mod chain.mod appleldr.mod \
|
|
linux.mod halt.mod reboot.mod pci.mod lspci.mod \
|
|
datetime.mod date.mod datehook.mod loadbios.mod fixvideo.mod mmap.mod
|
|
|
|
# For kernel.mod.
|
|
kernel_mod_EXPORTS = no
|
|
kernel_mod_SOURCES = kern/i386/efi/startup.S kern/main.c kern/device.c \
|
|
kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \
|
|
kern/misc.c kern/mm.c kern/reader.c kern/term.c \
|
|
kern/rescue_parser.c kern/rescue_reader.c \
|
|
kern/i386/dl.c kern/i386/efi/init.c kern/parser.c kern/partition.c \
|
|
kern/env.c symlist.c kern/efi/efi.c kern/efi/init.c kern/efi/mm.c \
|
|
term/efi/console.c disk/efi/efidisk.c \
|
|
kern/time.c kern/list.c kern/handler.c kern/command.c kern/corecmd.c \
|
|
kern/i386/tsc.c kern/i386/pit.c \
|
|
kern/generic/rtc_get_time_ms.c \
|
|
kern/generic/millisleep.c
|
|
kernel_mod_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 pc_partition.h reader.h symbol.h term.h time.h types.h \
|
|
efi/efi.h efi/time.h efi/disk.h list.h handler.h command.h
|
|
kernel_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
kernel_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
|
kernel_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
MOSTLYCLEANFILES += symlist.c
|
|
MOSTLYCLEANFILES += symlist.c kernel_syms.lst
|
|
DEFSYMFILES += kernel_syms.lst
|
|
|
|
symlist.c: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h gensymlist.sh
|
|
/bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
|
|
|
kernel_syms.lst: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h genkernsyms.sh
|
|
/bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
|
|
|
# For mmap.mod.
|
|
mmap_mod_SOURCES = mmap/mmap.c mmap/i386/uppermem.c mmap/i386/mmap.c \
|
|
mmap/efi/mmap.c
|
|
mmap_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
mmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For chain.mod.
|
|
chain_mod_SOURCES = loader/efi/chainloader.c
|
|
chain_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
chain_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For appleldr.mod.
|
|
appleldr_mod_SOURCES = loader/efi/appleloader.c
|
|
appleldr_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
appleldr_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For linux.mod.
|
|
linux_mod_SOURCES = loader/i386/efi/linux.c
|
|
linux_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For halt.mod.
|
|
halt_mod_SOURCES = commands/halt.c
|
|
halt_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For reboot.mod.
|
|
reboot_mod_SOURCES = commands/reboot.c
|
|
reboot_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
reboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For pci.mod
|
|
pci_mod_SOURCES = bus/pci.c
|
|
pci_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
pci_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For lspci.mod
|
|
lspci_mod_SOURCES = commands/lspci.c
|
|
lspci_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
lspci_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For datetime.mod
|
|
datetime_mod_SOURCES = lib/efi/datetime.c
|
|
datetime_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For date.mod
|
|
date_mod_SOURCES = commands/date.c
|
|
date_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
date_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For datehook.mod
|
|
datehook_mod_SOURCES = hook/datehook.c
|
|
datehook_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For loadbios.mod
|
|
loadbios_mod_SOURCES = commands/efi/loadbios.c
|
|
loadbios_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
loadbios_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
# For fixvideo.mod
|
|
fixvideo_mod_SOURCES = commands/efi/fixvideo.c
|
|
fixvideo_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
fixvideo_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
include $(srcdir)/conf/i386.mk
|
|
include $(srcdir)/conf/common.mk
|