commit-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[1714] 2008-07-17 Bean <address@hidden>


From: Bean
Subject: [1714] 2008-07-17 Bean <address@hidden>
Date: Thu, 17 Jul 2008 09:50:26 +0000

Revision: 1714
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=1714
Author:   bean
Date:     2008-07-17 09:50:26 +0000 (Thu, 17 Jul 2008)

Log Message:
-----------
2008-07-17  Bean  <address@hidden>

        * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
        (appleldr_mod_SOURCE): New variavle.
        (appleldr_mod_CFLAGS): Likewise.
        (appleldr_mod_LDFLAGS): Likewise.
        (pci_mod_SOURCES): Likewise.
        (pci_mod_CFLAGS): Likewise.
        (pci_mod_LDFLAGS): Likewise.
        (lspci_mod_SOURCES): Likewise.
        (lspci_mod_CFLAGS): Likewise.
        (lspci_mod_LDFLAGS): Likewise.

        * conf/x86_64-efi.rmk: New file.

        * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
        macro.
        (grub_efidisk_write): Likewise.

        * include/efi/api.h (efi_call_0): New macro.
        (efi_call_1): Likewise.
        (efi_call_2): Likewise.
        (efi_call_3): Likewise.
        (efi_call_4): Likewise.
        (efi_call_5): Likewise.
        (efi_call_6): Likewise.

        * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
        grub_rescue_cmd_chainloader.

        * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
        (grub_pe32_optional_header): Change some fields based on i386 or
        x86_64 platform.
        (GRUB_PE32_PE32_MAGIC): Likewise.

        * include/grub/efi/uga_draw.h: New file.

        * include/grub/elf.h (STN_ABS): New constant.
        (R_X86_64_NONE): Relocation constant for x86_64.
        (R_X86_64_64): Likewise.
        (R_X86_64_PC32): Likewise.
        (R_X86_64_GOT32): Likewise.
        (R_X86_64_PLT32): Likewise.
        (R_X86_64_COPY): Likewise.
        (R_X86_64_GLOB_DAT): Likewise.
        (R_X86_64_JUMP_SLOT): Likewise.
        (R_X86_64_RELATIVE): Likewise.
        (R_X86_64_GOTPCREL): Likewise.
        (R_X86_64_32): Likewise.
        (R_X86_64_32S): Likewise.
        (R_X86_64_16): Likewise.
        (R_X86_64_PC16): Likewise.
        (R_X86_64_8): Likewise.
        (R_X86_64_PC8): Likewise.

        * include/grub/i386/efi/pci.h: New file.

        * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
        Change it value based on platform.
        (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
        (GRUB_E820_RAM): Likewise.
        (GRUB_E820_RESERVED): Likewise.
        (GRUB_E820_ACPI): Likewise.
        (GRUB_E820_NVS): Likewise.
        (GRUB_E820_EXEC_CODE): Likewise.
        (GRUB_E820_MAX_ENTRY): Likewise.
        (grub_e820_mmap): New structure.
        (linux_kernel_header): Change the efi field according to different
        kernel version, also field from linux_kernel_header.

        * include/grub/kernel.h (grub_module_info): Add padding for x86_64.

        * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
        (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
        (GRUB_PCI_ADDR_SPACE_IO): Likewise.
        (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
        (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
        (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
        (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
        (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
        (GRUB_PCI_ADDR_MEM_MASK): Likewise.
        (GRUB_PCI_ADDR_IO_MASK): Likewise.

        * include/grub/x86_64/efi/kernel.h: New file.

        * include/grub/x86_64/efi/loader.h: Likewise.

        * include/grub/x86_64/efi/machine.h: Likewise.

        * include/grub/x86_64/efi/pci.h: Likewise.

        * include/grub/x86_64/efi/time.h: Likewise.

        * include/grub/x86_64/linux.h: Likewise.

        * include/grub/x86_64/setjmp.h: Likewise.

        * include/grub/x86_64/time.h: Likewise.

        * include/grub/x86_64/types.h: Likewise.

        * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
         GRUB_TARGET_SIZEOF_VOID_P.

        * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
        (grub_efi_locate_handle): Likewise.
        (grub_efi_open_protocol): Likewise.
        (grub_efi_set_text_mode): Likewise.
        (grub_efi_stall): Likewise.
        (grub_exit): Likewise.
        (grub_reboot): Likewise.
        (grub_halt): Likewise.
        (grub_efi_exit_boot_services): Likewise.
        (grub_get_rtc): Likewise.

        * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
        (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
        (grub_efi_allocate_pages): Wrap efi calls.
        (grub_efi_free_pages): Wrap efi calls.
        (grub_efi_get_memory_map): Wrap efi calls.

        * kern/x86_64/dl.c: New file.

        * kern/x86_64/efi/callwrap.S: Likewise.

        * kern/x86_64/efi/startup.S: Likewise.

        * loader/efi/appleloader.c: Likewise.

        * loader/efi/chainloader.c (cmdline): New variable.
        (grub_chainloader_unload): Wrap efi calls.
        (grub_chainloader_boot): Likewise.
        (grub_rescue_cmd_chainloader): Wrap efi calls, handle
        command line.

        * loader/efi/chainloader_normal.c (chainloader_command):
        Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
        command line.

        * loader/i386/efi/linux.c (allocate_pages): Change allocation
        method.
        (grub_e820_add_region): New function.
        (grub_linux_boot): Construct e820 map from efi map, handle x86_64
        booting.
        (grub_find_video_card): New function.
        (grub_linux_setup_video): New function.
        (grub_rescue_cmd_linux): Probe for video information.

        * normal/x86_64/setjmp.S: New file.

        * term/efi/console.c (map_char): New function.
        (grub_console_putchar): Map unicode char.
        (grub_console_checkkey): Wrap efi calls.
        (grub_console_getkey): Likewise.
        (grub_console_getwh): Likewise.
        (grub_console_gotoxy): Likewise.
        (grub_console_cls): Likewise.
        (grub_console_setcolorstate): Likewise.
        (grub_console_setcursor): Likewise.

        * util/i386/efi/grub-mkimage.c: Add support for x86_64.

Modified Paths:
--------------
    trunk/grub2/ChangeLog
    trunk/grub2/conf/i386-efi.mk
    trunk/grub2/conf/i386-efi.rmk
    trunk/grub2/configure
    trunk/grub2/configure.ac
    trunk/grub2/disk/efi/efidisk.c
    trunk/grub2/include/grub/efi/api.h
    trunk/grub2/include/grub/efi/chainloader.h
    trunk/grub2/include/grub/efi/pe32.h
    trunk/grub2/include/grub/elf.h
    trunk/grub2/include/grub/i386/linux.h
    trunk/grub2/include/grub/kernel.h
    trunk/grub2/include/grub/pci.h
    trunk/grub2/kern/dl.c
    trunk/grub2/kern/efi/efi.c
    trunk/grub2/kern/efi/mm.c
    trunk/grub2/loader/efi/chainloader.c
    trunk/grub2/loader/efi/chainloader_normal.c
    trunk/grub2/loader/i386/efi/linux.c
    trunk/grub2/term/efi/console.c
    trunk/grub2/util/i386/efi/grub-mkimage.c

Added Paths:
-----------
    trunk/grub2/conf/x86_64-efi.mk
    trunk/grub2/conf/x86_64-efi.rmk
    trunk/grub2/include/grub/efi/uga_draw.h
    trunk/grub2/include/grub/i386/efi/pci.h
    trunk/grub2/include/grub/x86_64/
    trunk/grub2/include/grub/x86_64/efi/
    trunk/grub2/include/grub/x86_64/efi/kernel.h
    trunk/grub2/include/grub/x86_64/efi/loader.h
    trunk/grub2/include/grub/x86_64/efi/machine.h
    trunk/grub2/include/grub/x86_64/efi/pci.h
    trunk/grub2/include/grub/x86_64/efi/time.h
    trunk/grub2/include/grub/x86_64/linux.h
    trunk/grub2/include/grub/x86_64/setjmp.h
    trunk/grub2/include/grub/x86_64/time.h
    trunk/grub2/include/grub/x86_64/types.h
    trunk/grub2/kern/x86_64/
    trunk/grub2/kern/x86_64/dl.c
    trunk/grub2/kern/x86_64/efi/
    trunk/grub2/kern/x86_64/efi/callwrap.S
    trunk/grub2/kern/x86_64/efi/startup.S
    trunk/grub2/loader/efi/appleloader.c
    trunk/grub2/normal/x86_64/
    trunk/grub2/normal/x86_64/setjmp.S

Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog       2008-07-16 07:06:11 UTC (rev 1713)
+++ trunk/grub2/ChangeLog       2008-07-17 09:50:26 UTC (rev 1714)
@@ -1,3 +1,165 @@
+2008-07-17  Bean  <address@hidden>
+
+       * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
+       (appleldr_mod_SOURCE): New variavle.
+       (appleldr_mod_CFLAGS): Likewise.
+       (appleldr_mod_LDFLAGS): Likewise.
+       (pci_mod_SOURCES): Likewise.
+       (pci_mod_CFLAGS): Likewise.
+       (pci_mod_LDFLAGS): Likewise.
+       (lspci_mod_SOURCES): Likewise.
+       (lspci_mod_CFLAGS): Likewise.
+       (lspci_mod_LDFLAGS): Likewise.
+
+       * conf/x86_64-efi.rmk: New file.
+
+       * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
+       macro.
+       (grub_efidisk_write): Likewise.
+
+       * include/efi/api.h (efi_call_0): New macro.
+       (efi_call_1): Likewise.
+       (efi_call_2): Likewise.
+       (efi_call_3): Likewise.
+       (efi_call_4): Likewise.
+       (efi_call_5): Likewise.
+       (efi_call_6): Likewise.
+
+       * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
+       grub_rescue_cmd_chainloader.
+
+       * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
+       (grub_pe32_optional_header): Change some fields based on i386 or
+       x86_64 platform.
+       (GRUB_PE32_PE32_MAGIC): Likewise.
+
+       * include/grub/efi/uga_draw.h: New file.
+
+       * include/grub/elf.h (STN_ABS): New constant.
+       (R_X86_64_NONE): Relocation constant for x86_64.
+       (R_X86_64_64): Likewise.
+       (R_X86_64_PC32): Likewise.
+       (R_X86_64_GOT32): Likewise.
+       (R_X86_64_PLT32): Likewise.
+       (R_X86_64_COPY): Likewise.
+       (R_X86_64_GLOB_DAT): Likewise.
+       (R_X86_64_JUMP_SLOT): Likewise.
+       (R_X86_64_RELATIVE): Likewise.
+       (R_X86_64_GOTPCREL): Likewise.
+       (R_X86_64_32): Likewise.
+       (R_X86_64_32S): Likewise.
+       (R_X86_64_16): Likewise.
+       (R_X86_64_PC16): Likewise.
+       (R_X86_64_8): Likewise.
+       (R_X86_64_PC8): Likewise.
+
+       * include/grub/i386/efi/pci.h: New file.
+
+       * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
+       Change it value based on platform.
+       (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
+       (GRUB_E820_RAM): Likewise.
+       (GRUB_E820_RESERVED): Likewise.
+       (GRUB_E820_ACPI): Likewise.
+       (GRUB_E820_NVS): Likewise.
+       (GRUB_E820_EXEC_CODE): Likewise.
+       (GRUB_E820_MAX_ENTRY): Likewise.
+       (grub_e820_mmap): New structure.
+       (linux_kernel_header): Change the efi field according to different
+       kernel version, also field from linux_kernel_header.
+
+       * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
+
+       * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
+       (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
+       (GRUB_PCI_ADDR_SPACE_IO): Likewise.
+       (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
+       (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
+       (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
+       (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
+       (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
+       (GRUB_PCI_ADDR_MEM_MASK): Likewise.
+       (GRUB_PCI_ADDR_IO_MASK): Likewise.
+
+       * include/grub/x86_64/efi/kernel.h: New file.
+
+       * include/grub/x86_64/efi/loader.h: Likewise.
+
+       * include/grub/x86_64/efi/machine.h: Likewise.
+
+       * include/grub/x86_64/efi/pci.h: Likewise.
+
+       * include/grub/x86_64/efi/time.h: Likewise.
+
+       * include/grub/x86_64/linux.h: Likewise.
+
+       * include/grub/x86_64/setjmp.h: Likewise.
+
+       * include/grub/x86_64/time.h: Likewise.
+
+       * include/grub/x86_64/types.h: Likewise.
+
+       * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
+        GRUB_TARGET_SIZEOF_VOID_P.
+
+       * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
+       (grub_efi_locate_handle): Likewise.
+       (grub_efi_open_protocol): Likewise.
+       (grub_efi_set_text_mode): Likewise.
+       (grub_efi_stall): Likewise.
+       (grub_exit): Likewise.
+       (grub_reboot): Likewise.
+       (grub_halt): Likewise.
+       (grub_efi_exit_boot_services): Likewise.
+       (grub_get_rtc): Likewise.
+
+       * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
+       (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
+       (grub_efi_allocate_pages): Wrap efi calls.
+       (grub_efi_free_pages): Wrap efi calls.
+       (grub_efi_get_memory_map): Wrap efi calls.
+
+       * kern/x86_64/dl.c: New file.
+
+       * kern/x86_64/efi/callwrap.S: Likewise.
+
+       * kern/x86_64/efi/startup.S: Likewise.
+
+       * loader/efi/appleloader.c: Likewise.
+
+       * loader/efi/chainloader.c (cmdline): New variable.
+       (grub_chainloader_unload): Wrap efi calls.
+       (grub_chainloader_boot): Likewise.
+       (grub_rescue_cmd_chainloader): Wrap efi calls, handle
+       command line.
+
+       * loader/efi/chainloader_normal.c (chainloader_command):
+       Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
+       command line.
+
+       * loader/i386/efi/linux.c (allocate_pages): Change allocation
+       method.
+       (grub_e820_add_region): New function.
+       (grub_linux_boot): Construct e820 map from efi map, handle x86_64
+       booting.
+       (grub_find_video_card): New function.
+       (grub_linux_setup_video): New function.
+       (grub_rescue_cmd_linux): Probe for video information.
+
+       * normal/x86_64/setjmp.S: New file.
+
+       * term/efi/console.c (map_char): New function.
+       (grub_console_putchar): Map unicode char.
+       (grub_console_checkkey): Wrap efi calls.
+       (grub_console_getkey): Likewise.
+       (grub_console_getwh): Likewise.
+       (grub_console_gotoxy): Likewise.
+       (grub_console_cls): Likewise.
+       (grub_console_setcolorstate): Likewise.
+       (grub_console_setcursor): Likewise.
+
+       * util/i386/efi/grub-mkimage.c: Add support for x86_64.
+
 2008-07-16  Pavel Roskin  <address@hidden>
 
        * loader/i386/efi/linux.c (allocate_pages): Fix warnings in

Modified: trunk/grub2/conf/i386-efi.mk
===================================================================
--- trunk/grub2/conf/i386-efi.mk        2008-07-16 07:06:11 UTC (rev 1713)
+++ trunk/grub2/conf/i386-efi.mk        2008-07-17 09:50:26 UTC (rev 1714)
@@ -116,8 +116,8 @@
 
 
 # Modules.
-pkglib_MODULES = kernel.mod normal.mod _chain.mod chain.mod \
-       _linux.mod linux.mod cpuid.mod halt.mod reboot.mod
+pkglib_MODULES = kernel.mod normal.mod _chain.mod chain.mod appleldr.mod \
+       _linux.mod linux.mod cpuid.mod halt.mod reboot.mod pci.mod lspci.mod
 
 # For kernel.mod.
 kernel_mod_EXPORTS = no
@@ -1072,6 +1072,62 @@
 chain_mod_CFLAGS = $(COMMON_CFLAGS)
 chain_mod_LDFLAGS = $(COMMON_LDFLAGS)
 
+# For appleldr.mod.
+appleldr_mod_SOURCES = loader/efi/appleloader.c
+CLEANFILES += appleldr.mod mod-appleldr.o mod-appleldr.c pre-appleldr.o 
appleldr_mod-loader_efi_appleloader.o und-appleldr.lst
+ifneq ($(appleldr_mod_EXPORTS),no)
+CLEANFILES += def-appleldr.lst
+DEFSYMFILES += def-appleldr.lst
+endif
+MOSTLYCLEANFILES += appleldr_mod-loader_efi_appleloader.d
+UNDSYMFILES += und-appleldr.lst
+
+appleldr.mod: pre-appleldr.o mod-appleldr.o
+       -rm -f $@
+       $(TARGET_CC) $(appleldr_mod_LDFLAGS) $(TARGET_LDFLAGS) 
$(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
+       $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R 
.comment $@
+
+pre-appleldr.o: $(appleldr_mod_DEPENDENCIES) 
appleldr_mod-loader_efi_appleloader.o
+       -rm -f $@
+       $(TARGET_CC) $(appleldr_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ 
appleldr_mod-loader_efi_appleloader.o
+
+mod-appleldr.o: mod-appleldr.c
+       $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(appleldr_mod_CFLAGS) 
-c -o $@ $<
+
+mod-appleldr.c: moddep.lst genmodsrc.sh
+       sh $(srcdir)/genmodsrc.sh 'appleldr' $< > $@ || (rm -f $@; exit 1)
+
+ifneq ($(appleldr_mod_EXPORTS),no)
+def-appleldr.lst: pre-appleldr.o
+       $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 appleldr/' > 
$@
+endif
+
+und-appleldr.lst: pre-appleldr.o
+       echo 'appleldr' > $@
+       $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
+
+appleldr_mod-loader_efi_appleloader.o: loader/efi/appleloader.c 
$(loader/efi/appleloader.c_DEPENDENCIES)
+       $(TARGET_CC) -Iloader/efi -I$(srcdir)/loader/efi $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(appleldr_mod_CFLAGS) -MD -c -o $@ $<
+-include appleldr_mod-loader_efi_appleloader.d
+
+CLEANFILES += cmd-appleldr_mod-loader_efi_appleloader.lst 
fs-appleldr_mod-loader_efi_appleloader.lst 
partmap-appleldr_mod-loader_efi_appleloader.lst
+COMMANDFILES += cmd-appleldr_mod-loader_efi_appleloader.lst
+FSFILES += fs-appleldr_mod-loader_efi_appleloader.lst
+PARTMAPFILES += partmap-appleldr_mod-loader_efi_appleloader.lst
+
+cmd-appleldr_mod-loader_efi_appleloader.lst: loader/efi/appleloader.c 
$(loader/efi/appleloader.c_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -Iloader/efi -I$(srcdir)/loader/efi 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(appleldr_mod_CFLAGS) -E $<       | sh 
$(srcdir)/gencmdlist.sh appleldr > $@ || (rm -f $@; exit 1)
+
+fs-appleldr_mod-loader_efi_appleloader.lst: loader/efi/appleloader.c 
$(loader/efi/appleloader.c_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -Iloader/efi -I$(srcdir)/loader/efi 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(appleldr_mod_CFLAGS) -E $<       | sh 
$(srcdir)/genfslist.sh appleldr > $@ || (rm -f $@; exit 1)
+
+partmap-appleldr_mod-loader_efi_appleloader.lst: loader/efi/appleloader.c 
$(loader/efi/appleloader.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Iloader/efi -I$(srcdir)/loader/efi 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(appleldr_mod_CFLAGS) -E $<       | sh 
$(srcdir)/genpartmaplist.sh appleldr > $@ || (rm -f $@; exit 1)
+
+
+appleldr_mod_CFLAGS = $(COMMON_CFLAGS)
+appleldr_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
 # For _linux.mod.
 _linux_mod_SOURCES = loader/i386/efi/linux.c
 CLEANFILES += _linux.mod mod-_linux.o mod-_linux.c pre-_linux.o 
_linux_mod-loader_i386_efi_linux.o und-_linux.lst
@@ -1352,4 +1408,116 @@
 reboot_mod_CFLAGS = $(COMMON_CFLAGS)
 reboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
 
+# For pci.mod
+pci_mod_SOURCES = bus/pci.c
+CLEANFILES += pci.mod mod-pci.o mod-pci.c pre-pci.o pci_mod-bus_pci.o 
und-pci.lst
+ifneq ($(pci_mod_EXPORTS),no)
+CLEANFILES += def-pci.lst
+DEFSYMFILES += def-pci.lst
+endif
+MOSTLYCLEANFILES += pci_mod-bus_pci.d
+UNDSYMFILES += und-pci.lst
+
+pci.mod: pre-pci.o mod-pci.o
+       -rm -f $@
+       $(TARGET_CC) $(pci_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) 
-Wl,-r,-d -o $@ $^
+       $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R 
.comment $@
+
+pre-pci.o: $(pci_mod_DEPENDENCIES) pci_mod-bus_pci.o
+       -rm -f $@
+       $(TARGET_CC) $(pci_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ 
pci_mod-bus_pci.o
+
+mod-pci.o: mod-pci.c
+       $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(pci_mod_CFLAGS) -c 
-o $@ $<
+
+mod-pci.c: moddep.lst genmodsrc.sh
+       sh $(srcdir)/genmodsrc.sh 'pci' $< > $@ || (rm -f $@; exit 1)
+
+ifneq ($(pci_mod_EXPORTS),no)
+def-pci.lst: pre-pci.o
+       $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 pci/' > $@
+endif
+
+und-pci.lst: pre-pci.o
+       echo 'pci' > $@
+       $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
+
+pci_mod-bus_pci.o: bus/pci.c $(bus/pci.c_DEPENDENCIES)
+       $(TARGET_CC) -Ibus -I$(srcdir)/bus $(TARGET_CPPFLAGS)  $(TARGET_CFLAGS) 
$(pci_mod_CFLAGS) -MD -c -o $@ $<
+-include pci_mod-bus_pci.d
+
+CLEANFILES += cmd-pci_mod-bus_pci.lst fs-pci_mod-bus_pci.lst 
partmap-pci_mod-bus_pci.lst
+COMMANDFILES += cmd-pci_mod-bus_pci.lst
+FSFILES += fs-pci_mod-bus_pci.lst
+PARTMAPFILES += partmap-pci_mod-bus_pci.lst
+
+cmd-pci_mod-bus_pci.lst: bus/pci.c $(bus/pci.c_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -Ibus -I$(srcdir)/bus $(TARGET_CPPFLAGS) 
$(TARGET_CFLAGS) $(pci_mod_CFLAGS) -E $<          | sh $(srcdir)/gencmdlist.sh 
pci > $@ || (rm -f $@; exit 1)
+
+fs-pci_mod-bus_pci.lst: bus/pci.c $(bus/pci.c_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -Ibus -I$(srcdir)/bus $(TARGET_CPPFLAGS) 
$(TARGET_CFLAGS) $(pci_mod_CFLAGS) -E $<          | sh $(srcdir)/genfslist.sh 
pci > $@ || (rm -f $@; exit 1)
+
+partmap-pci_mod-bus_pci.lst: bus/pci.c $(bus/pci.c_DEPENDENCIES) 
genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Ibus -I$(srcdir)/bus $(TARGET_CPPFLAGS) 
$(TARGET_CFLAGS) $(pci_mod_CFLAGS) -E $<          | sh 
$(srcdir)/genpartmaplist.sh pci > $@ || (rm -f $@; exit 1)
+
+
+pci_mod_CFLAGS = $(COMMON_CFLAGS)
+pci_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
+# For lspci.mod
+lspci_mod_SOURCES = commands/lspci.c
+CLEANFILES += lspci.mod mod-lspci.o mod-lspci.c pre-lspci.o 
lspci_mod-commands_lspci.o und-lspci.lst
+ifneq ($(lspci_mod_EXPORTS),no)
+CLEANFILES += def-lspci.lst
+DEFSYMFILES += def-lspci.lst
+endif
+MOSTLYCLEANFILES += lspci_mod-commands_lspci.d
+UNDSYMFILES += und-lspci.lst
+
+lspci.mod: pre-lspci.o mod-lspci.o
+       -rm -f $@
+       $(TARGET_CC) $(lspci_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) 
-Wl,-r,-d -o $@ $^
+       $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R 
.comment $@
+
+pre-lspci.o: $(lspci_mod_DEPENDENCIES) lspci_mod-commands_lspci.o
+       -rm -f $@
+       $(TARGET_CC) $(lspci_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ 
lspci_mod-commands_lspci.o
+
+mod-lspci.o: mod-lspci.c
+       $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lspci_mod_CFLAGS) -c 
-o $@ $<
+
+mod-lspci.c: moddep.lst genmodsrc.sh
+       sh $(srcdir)/genmodsrc.sh 'lspci' $< > $@ || (rm -f $@; exit 1)
+
+ifneq ($(lspci_mod_EXPORTS),no)
+def-lspci.lst: pre-lspci.o
+       $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 lspci/' > $@
+endif
+
+und-lspci.lst: pre-lspci.o
+       echo 'lspci' > $@
+       $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
+
+lspci_mod-commands_lspci.o: commands/lspci.c $(commands/lspci.c_DEPENDENCIES)
+       $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(lspci_mod_CFLAGS) -MD -c -o $@ $<
+-include lspci_mod-commands_lspci.d
+
+CLEANFILES += cmd-lspci_mod-commands_lspci.lst fs-lspci_mod-commands_lspci.lst 
partmap-lspci_mod-commands_lspci.lst
+COMMANDFILES += cmd-lspci_mod-commands_lspci.lst
+FSFILES += fs-lspci_mod-commands_lspci.lst
+PARTMAPFILES += partmap-lspci_mod-commands_lspci.lst
+
+cmd-lspci_mod-commands_lspci.lst: commands/lspci.c 
$(commands/lspci.c_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -Icommands -I$(srcdir)/commands 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lspci_mod_CFLAGS) -E $<      | sh 
$(srcdir)/gencmdlist.sh lspci > $@ || (rm -f $@; exit 1)
+
+fs-lspci_mod-commands_lspci.lst: commands/lspci.c 
$(commands/lspci.c_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -Icommands -I$(srcdir)/commands 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lspci_mod_CFLAGS) -E $<      | sh 
$(srcdir)/genfslist.sh lspci > $@ || (rm -f $@; exit 1)
+
+partmap-lspci_mod-commands_lspci.lst: commands/lspci.c 
$(commands/lspci.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Icommands -I$(srcdir)/commands 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lspci_mod_CFLAGS) -E $<      | sh 
$(srcdir)/genpartmaplist.sh lspci > $@ || (rm -f $@; exit 1)
+
+
+lspci_mod_CFLAGS = $(COMMON_CFLAGS)
+lspci_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
 include $(srcdir)/conf/common.mk

Modified: trunk/grub2/conf/i386-efi.rmk
===================================================================
--- trunk/grub2/conf/i386-efi.rmk       2008-07-16 07:06:11 UTC (rev 1713)
+++ trunk/grub2/conf/i386-efi.rmk       2008-07-17 09:50:26 UTC (rev 1714)
@@ -74,8 +74,8 @@
 grub_install_SOURCES = util/i386/efi/grub-install.in
 
 # Modules.
-pkglib_MODULES = kernel.mod normal.mod _chain.mod chain.mod \
-       _linux.mod linux.mod cpuid.mod halt.mod reboot.mod
+pkglib_MODULES = kernel.mod normal.mod _chain.mod chain.mod appleldr.mod \
+       _linux.mod linux.mod cpuid.mod halt.mod reboot.mod pci.mod lspci.mod
 
 # For kernel.mod.
 kernel_mod_EXPORTS = no
@@ -123,6 +123,11 @@
 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)
@@ -148,4 +153,14 @@
 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)
+
 include $(srcdir)/conf/common.mk

Copied: trunk/grub2/conf/x86_64-efi.mk (from rev 1713, 
trunk/grub2/conf/i386-efi.mk)
===================================================================
--- trunk/grub2/conf/x86_64-efi.mk                              (rev 0)
+++ trunk/grub2/conf/x86_64-efi.mk      2008-07-17 09:50:26 UTC (rev 1714)
@@ -0,0 +1,1527 @@
+# -*- makefile -*-
+
+COMMON_ASFLAGS = -nostdinc -fno-builtin -m64
+COMMON_CFLAGS = -fno-builtin -m64
+COMMON_LDFLAGS = -melf_x86_64 -nostdlib
+
+# Used by various components.  These rules need to precede them.
+normal/execute.c_DEPENDENCIES = grub_script.tab.h
+normal/command.c_DEPENDENCIES = grub_script.tab.h
+normal/function.c_DEPENDENCIES = grub_script.tab.h
+normal/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
+CLEANFILES += grub-mkimage grub_mkimage-util_i386_efi_grub_mkimage.o 
grub_mkimage-util_misc.o grub_mkimage-util_resolve.o
+MOSTLYCLEANFILES += grub_mkimage-util_i386_efi_grub_mkimage.d 
grub_mkimage-util_misc.d grub_mkimage-util_resolve.d
+
+grub-mkimage: $(grub_mkimage_DEPENDENCIES) 
grub_mkimage-util_i386_efi_grub_mkimage.o grub_mkimage-util_misc.o 
grub_mkimage-util_resolve.o
+       $(CC) -o $@ grub_mkimage-util_i386_efi_grub_mkimage.o 
grub_mkimage-util_misc.o grub_mkimage-util_resolve.o $(LDFLAGS) 
$(grub_mkimage_LDFLAGS)
+
+grub_mkimage-util_i386_efi_grub_mkimage.o: util/i386/efi/grub-mkimage.c 
$(util/i386/efi/grub-mkimage.c_DEPENDENCIES)
+       $(CC) -Iutil/i386/efi -I$(srcdir)/util/i386/efi $(CPPFLAGS) $(CFLAGS) 
-DGRUB_UTIL=1 $(grub_mkimage_CFLAGS) -MD -c -o $@ $<
+-include grub_mkimage-util_i386_efi_grub_mkimage.d
+
+grub_mkimage-util_misc.o: util/misc.c $(util/misc.c_DEPENDENCIES)
+       $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 
$(grub_mkimage_CFLAGS) -MD -c -o $@ $<
+-include grub_mkimage-util_misc.d
+
+grub_mkimage-util_resolve.o: util/resolve.c $(util/resolve.c_DEPENDENCIES)
+       $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 
$(grub_mkimage_CFLAGS) -MD -c -o $@ $<
+-include grub_mkimage-util_resolve.d
+
+
+# For grub-setup.
+#grub_setup_SOURCES = util/i386/pc/grub-setup.c util/biosdisk.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/misc.c         \
+       util/i386/get_disk_name.c
+
+# For grub-emu.
+util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
+grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c       \
+       commands/configfile.c commands/help.c                           \
+       commands/terminal.c commands/ls.c commands/test.c               \
+       commands/search.c commands/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                                      \
+       \
+       io/gzio.c                                                       \
+       kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c       \
+       kern/err.c                                                      \
+       normal/execute.c kern/file.c kern/fs.c normal/lexer.c           \
+       kern/loader.c kern/main.c kern/misc.c kern/parser.c             \
+       grub_script.tab.c kern/partition.c kern/rescue.c kern/term.c    \
+       normal/arg.c normal/cmdline.c normal/command.c normal/function.c\
+       normal/completion.c normal/context.c normal/main.c              \
+       normal/menu.c normal/menu_entry.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/biosdisk.c util/getroot.c                                  \
+       util/i386/pc/misc.c                                             \
+       \
+       disk/raid.c disk/lvm.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
+CLEANFILES += grub-install
+
+grub-install: util/i386/efi/grub-install.in 
$(util/i386/efi/grub-install.in_DEPENDENCIES) config.status
+       ./config.status --file=grub-install:util/i386/efi/grub-install.in
+       chmod +x $@
+
+
+# Modules.
+pkglib_MODULES = kernel.mod normal.mod _chain.mod chain.mod appleldr.mod \
+       cpuid.mod halt.mod reboot.mod _linux.mod linux.mod pci.mod lspci.mod
+
+# For kernel.mod.
+kernel_mod_EXPORTS = no
+kernel_mod_SOURCES = kern/x86_64/efi/startup.S kern/x86_64/efi/callwrap.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/loader.c kern/rescue.c kern/term.c \
+       kern/x86_64/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
+CLEANFILES += kernel.mod mod-kernel.o mod-kernel.c pre-kernel.o 
kernel_mod-kern_x86_64_efi_startup.o kernel_mod-kern_x86_64_efi_callwrap.o 
kernel_mod-kern_main.o kernel_mod-kern_device.o kernel_mod-kern_disk.o 
kernel_mod-kern_dl.o kernel_mod-kern_file.o kernel_mod-kern_fs.o 
kernel_mod-kern_err.o kernel_mod-kern_misc.o kernel_mod-kern_mm.o 
kernel_mod-kern_loader.o kernel_mod-kern_rescue.o kernel_mod-kern_term.o 
kernel_mod-kern_x86_64_dl.o kernel_mod-kern_i386_efi_init.o 
kernel_mod-kern_parser.o kernel_mod-kern_partition.o kernel_mod-kern_env.o 
kernel_mod-symlist.o kernel_mod-kern_efi_efi.o kernel_mod-kern_efi_init.o 
kernel_mod-kern_efi_mm.o kernel_mod-term_efi_console.o 
kernel_mod-disk_efi_efidisk.o und-kernel.lst
+ifneq ($(kernel_mod_EXPORTS),no)
+CLEANFILES += def-kernel.lst
+DEFSYMFILES += def-kernel.lst
+endif
+MOSTLYCLEANFILES += kernel_mod-kern_x86_64_efi_startup.d 
kernel_mod-kern_x86_64_efi_callwrap.d kernel_mod-kern_main.d 
kernel_mod-kern_device.d kernel_mod-kern_disk.d kernel_mod-kern_dl.d 
kernel_mod-kern_file.d kernel_mod-kern_fs.d kernel_mod-kern_err.d 
kernel_mod-kern_misc.d kernel_mod-kern_mm.d kernel_mod-kern_loader.d 
kernel_mod-kern_rescue.d kernel_mod-kern_term.d kernel_mod-kern_x86_64_dl.d 
kernel_mod-kern_i386_efi_init.d kernel_mod-kern_parser.d 
kernel_mod-kern_partition.d kernel_mod-kern_env.d kernel_mod-symlist.d 
kernel_mod-kern_efi_efi.d kernel_mod-kern_efi_init.d kernel_mod-kern_efi_mm.d 
kernel_mod-term_efi_console.d kernel_mod-disk_efi_efidisk.d
+UNDSYMFILES += und-kernel.lst
+
+kernel.mod: pre-kernel.o mod-kernel.o
+       -rm -f $@
+       $(TARGET_CC) $(kernel_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) 
-Wl,-r,-d -o $@ $^
+       $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R 
.comment $@
+
+pre-kernel.o: $(kernel_mod_DEPENDENCIES) kernel_mod-kern_x86_64_efi_startup.o 
kernel_mod-kern_x86_64_efi_callwrap.o kernel_mod-kern_main.o 
kernel_mod-kern_device.o kernel_mod-kern_disk.o kernel_mod-kern_dl.o 
kernel_mod-kern_file.o kernel_mod-kern_fs.o kernel_mod-kern_err.o 
kernel_mod-kern_misc.o kernel_mod-kern_mm.o kernel_mod-kern_loader.o 
kernel_mod-kern_rescue.o kernel_mod-kern_term.o kernel_mod-kern_x86_64_dl.o 
kernel_mod-kern_i386_efi_init.o kernel_mod-kern_parser.o 
kernel_mod-kern_partition.o kernel_mod-kern_env.o kernel_mod-symlist.o 
kernel_mod-kern_efi_efi.o kernel_mod-kern_efi_init.o kernel_mod-kern_efi_mm.o 
kernel_mod-term_efi_console.o kernel_mod-disk_efi_efidisk.o
+       -rm -f $@
+       $(TARGET_CC) $(kernel_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ 
kernel_mod-kern_x86_64_efi_startup.o kernel_mod-kern_x86_64_efi_callwrap.o 
kernel_mod-kern_main.o kernel_mod-kern_device.o kernel_mod-kern_disk.o 
kernel_mod-kern_dl.o kernel_mod-kern_file.o kernel_mod-kern_fs.o 
kernel_mod-kern_err.o kernel_mod-kern_misc.o kernel_mod-kern_mm.o 
kernel_mod-kern_loader.o kernel_mod-kern_rescue.o kernel_mod-kern_term.o 
kernel_mod-kern_x86_64_dl.o kernel_mod-kern_i386_efi_init.o 
kernel_mod-kern_parser.o kernel_mod-kern_partition.o kernel_mod-kern_env.o 
kernel_mod-symlist.o kernel_mod-kern_efi_efi.o kernel_mod-kern_efi_init.o 
kernel_mod-kern_efi_mm.o kernel_mod-term_efi_console.o 
kernel_mod-disk_efi_efidisk.o
+
+mod-kernel.o: mod-kernel.c
+       $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) 
-c -o $@ $<
+
+mod-kernel.c: moddep.lst genmodsrc.sh
+       sh $(srcdir)/genmodsrc.sh 'kernel' $< > $@ || (rm -f $@; exit 1)
+
+ifneq ($(kernel_mod_EXPORTS),no)
+def-kernel.lst: pre-kernel.o
+       $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 kernel/' > $@
+endif
+
+und-kernel.lst: pre-kernel.o
+       echo 'kernel' > $@
+       $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
+
+kernel_mod-kern_x86_64_efi_startup.o: kern/x86_64/efi/startup.S 
$(kern/x86_64/efi/startup.S_DEPENDENCIES)
+       $(TARGET_CC) -Ikern/x86_64/efi -I$(srcdir)/kern/x86_64/efi 
$(TARGET_CPPFLAGS) -DASM_FILE=1 $(TARGET_ASFLAGS) $(kernel_mod_ASFLAGS) -MD -c 
-o $@ $<
+-include kernel_mod-kern_x86_64_efi_startup.d
+
+CLEANFILES += cmd-kernel_mod-kern_x86_64_efi_startup.lst 
fs-kernel_mod-kern_x86_64_efi_startup.lst 
partmap-kernel_mod-kern_x86_64_efi_startup.lst
+COMMANDFILES += cmd-kernel_mod-kern_x86_64_efi_startup.lst
+FSFILES += fs-kernel_mod-kern_x86_64_efi_startup.lst
+PARTMAPFILES += partmap-kernel_mod-kern_x86_64_efi_startup.lst
+
+cmd-kernel_mod-kern_x86_64_efi_startup.lst: kern/x86_64/efi/startup.S 
$(kern/x86_64/efi/startup.S_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -Ikern/x86_64/efi 
-I$(srcdir)/kern/x86_64/efi $(TARGET_CPPFLAGS) $(TARGET_ASFLAGS) 
$(kernel_mod_ASFLAGS) -E $<     | sh $(srcdir)/gencmdlist.sh kernel > $@ || (rm 
-f $@; exit 1)
+
+fs-kernel_mod-kern_x86_64_efi_startup.lst: kern/x86_64/efi/startup.S 
$(kern/x86_64/efi/startup.S_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -Ikern/x86_64/efi 
-I$(srcdir)/kern/x86_64/efi $(TARGET_CPPFLAGS) $(TARGET_ASFLAGS) 
$(kernel_mod_ASFLAGS) -E $<     | sh $(srcdir)/genfslist.sh kernel > $@ || (rm 
-f $@; exit 1)
+
+partmap-kernel_mod-kern_x86_64_efi_startup.lst: kern/x86_64/efi/startup.S 
$(kern/x86_64/efi/startup.S_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Ikern/x86_64/efi 
-I$(srcdir)/kern/x86_64/efi $(TARGET_CPPFLAGS) $(TARGET_ASFLAGS) 
$(kernel_mod_ASFLAGS) -E $<     | sh $(srcdir)/genpartmaplist.sh kernel > $@ || 
(rm -f $@; exit 1)
+
+
+kernel_mod-kern_x86_64_efi_callwrap.o: kern/x86_64/efi/callwrap.S 
$(kern/x86_64/efi/callwrap.S_DEPENDENCIES)
+       $(TARGET_CC) -Ikern/x86_64/efi -I$(srcdir)/kern/x86_64/efi 
$(TARGET_CPPFLAGS) -DASM_FILE=1 $(TARGET_ASFLAGS) $(kernel_mod_ASFLAGS) -MD -c 
-o $@ $<
+-include kernel_mod-kern_x86_64_efi_callwrap.d
+
+CLEANFILES += cmd-kernel_mod-kern_x86_64_efi_callwrap.lst 
fs-kernel_mod-kern_x86_64_efi_callwrap.lst 
partmap-kernel_mod-kern_x86_64_efi_callwrap.lst
+COMMANDFILES += cmd-kernel_mod-kern_x86_64_efi_callwrap.lst
+FSFILES += fs-kernel_mod-kern_x86_64_efi_callwrap.lst
+PARTMAPFILES += partmap-kernel_mod-kern_x86_64_efi_callwrap.lst
+
+cmd-kernel_mod-kern_x86_64_efi_callwrap.lst: kern/x86_64/efi/callwrap.S 
$(kern/x86_64/efi/callwrap.S_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -Ikern/x86_64/efi 
-I$(srcdir)/kern/x86_64/efi $(TARGET_CPPFLAGS) $(TARGET_ASFLAGS) 
$(kernel_mod_ASFLAGS) -E $<     | sh $(srcdir)/gencmdlist.sh kernel > $@ || (rm 
-f $@; exit 1)
+
+fs-kernel_mod-kern_x86_64_efi_callwrap.lst: kern/x86_64/efi/callwrap.S 
$(kern/x86_64/efi/callwrap.S_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -Ikern/x86_64/efi 
-I$(srcdir)/kern/x86_64/efi $(TARGET_CPPFLAGS) $(TARGET_ASFLAGS) 
$(kernel_mod_ASFLAGS) -E $<     | sh $(srcdir)/genfslist.sh kernel > $@ || (rm 
-f $@; exit 1)
+
+partmap-kernel_mod-kern_x86_64_efi_callwrap.lst: kern/x86_64/efi/callwrap.S 
$(kern/x86_64/efi/callwrap.S_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Ikern/x86_64/efi 
-I$(srcdir)/kern/x86_64/efi $(TARGET_CPPFLAGS) $(TARGET_ASFLAGS) 
$(kernel_mod_ASFLAGS) -E $<     | sh $(srcdir)/genpartmaplist.sh kernel > $@ || 
(rm -f $@; exit 1)
+
+
+kernel_mod-kern_main.o: kern/main.c $(kern/main.c_DEPENDENCIES)
+       $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -MD -c -o $@ $<
+-include kernel_mod-kern_main.d
+
+CLEANFILES += cmd-kernel_mod-kern_main.lst fs-kernel_mod-kern_main.lst 
partmap-kernel_mod-kern_main.lst
+COMMANDFILES += cmd-kernel_mod-kern_main.lst
+FSFILES += fs-kernel_mod-kern_main.lst
+PARTMAPFILES += partmap-kernel_mod-kern_main.lst
+
+cmd-kernel_mod-kern_main.lst: kern/main.c $(kern/main.c_DEPENDENCIES) 
gencmdlist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/gencmdlist.sh kernel > $@ || (rm -f $@; exit 1)
+
+fs-kernel_mod-kern_main.lst: kern/main.c $(kern/main.c_DEPENDENCIES) 
genfslist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genfslist.sh kernel > $@ || (rm -f $@; exit 1)
+
+partmap-kernel_mod-kern_main.lst: kern/main.c $(kern/main.c_DEPENDENCIES) 
genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genpartmaplist.sh kernel > $@ || (rm -f $@; exit 1)
+
+
+kernel_mod-kern_device.o: kern/device.c $(kern/device.c_DEPENDENCIES)
+       $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -MD -c -o $@ $<
+-include kernel_mod-kern_device.d
+
+CLEANFILES += cmd-kernel_mod-kern_device.lst fs-kernel_mod-kern_device.lst 
partmap-kernel_mod-kern_device.lst
+COMMANDFILES += cmd-kernel_mod-kern_device.lst
+FSFILES += fs-kernel_mod-kern_device.lst
+PARTMAPFILES += partmap-kernel_mod-kern_device.lst
+
+cmd-kernel_mod-kern_device.lst: kern/device.c $(kern/device.c_DEPENDENCIES) 
gencmdlist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/gencmdlist.sh kernel > $@ || (rm -f $@; exit 1)
+
+fs-kernel_mod-kern_device.lst: kern/device.c $(kern/device.c_DEPENDENCIES) 
genfslist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genfslist.sh kernel > $@ || (rm -f $@; exit 1)
+
+partmap-kernel_mod-kern_device.lst: kern/device.c 
$(kern/device.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genpartmaplist.sh kernel > $@ || (rm -f $@; exit 1)
+
+
+kernel_mod-kern_disk.o: kern/disk.c $(kern/disk.c_DEPENDENCIES)
+       $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -MD -c -o $@ $<
+-include kernel_mod-kern_disk.d
+
+CLEANFILES += cmd-kernel_mod-kern_disk.lst fs-kernel_mod-kern_disk.lst 
partmap-kernel_mod-kern_disk.lst
+COMMANDFILES += cmd-kernel_mod-kern_disk.lst
+FSFILES += fs-kernel_mod-kern_disk.lst
+PARTMAPFILES += partmap-kernel_mod-kern_disk.lst
+
+cmd-kernel_mod-kern_disk.lst: kern/disk.c $(kern/disk.c_DEPENDENCIES) 
gencmdlist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/gencmdlist.sh kernel > $@ || (rm -f $@; exit 1)
+
+fs-kernel_mod-kern_disk.lst: kern/disk.c $(kern/disk.c_DEPENDENCIES) 
genfslist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genfslist.sh kernel > $@ || (rm -f $@; exit 1)
+
+partmap-kernel_mod-kern_disk.lst: kern/disk.c $(kern/disk.c_DEPENDENCIES) 
genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genpartmaplist.sh kernel > $@ || (rm -f $@; exit 1)
+
+
+kernel_mod-kern_dl.o: kern/dl.c $(kern/dl.c_DEPENDENCIES)
+       $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -MD -c -o $@ $<
+-include kernel_mod-kern_dl.d
+
+CLEANFILES += cmd-kernel_mod-kern_dl.lst fs-kernel_mod-kern_dl.lst 
partmap-kernel_mod-kern_dl.lst
+COMMANDFILES += cmd-kernel_mod-kern_dl.lst
+FSFILES += fs-kernel_mod-kern_dl.lst
+PARTMAPFILES += partmap-kernel_mod-kern_dl.lst
+
+cmd-kernel_mod-kern_dl.lst: kern/dl.c $(kern/dl.c_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/gencmdlist.sh kernel > $@ || (rm -f $@; exit 1)
+
+fs-kernel_mod-kern_dl.lst: kern/dl.c $(kern/dl.c_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genfslist.sh kernel > $@ || (rm -f $@; exit 1)
+
+partmap-kernel_mod-kern_dl.lst: kern/dl.c $(kern/dl.c_DEPENDENCIES) 
genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genpartmaplist.sh kernel > $@ || (rm -f $@; exit 1)
+
+
+kernel_mod-kern_file.o: kern/file.c $(kern/file.c_DEPENDENCIES)
+       $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -MD -c -o $@ $<
+-include kernel_mod-kern_file.d
+
+CLEANFILES += cmd-kernel_mod-kern_file.lst fs-kernel_mod-kern_file.lst 
partmap-kernel_mod-kern_file.lst
+COMMANDFILES += cmd-kernel_mod-kern_file.lst
+FSFILES += fs-kernel_mod-kern_file.lst
+PARTMAPFILES += partmap-kernel_mod-kern_file.lst
+
+cmd-kernel_mod-kern_file.lst: kern/file.c $(kern/file.c_DEPENDENCIES) 
gencmdlist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/gencmdlist.sh kernel > $@ || (rm -f $@; exit 1)
+
+fs-kernel_mod-kern_file.lst: kern/file.c $(kern/file.c_DEPENDENCIES) 
genfslist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genfslist.sh kernel > $@ || (rm -f $@; exit 1)
+
+partmap-kernel_mod-kern_file.lst: kern/file.c $(kern/file.c_DEPENDENCIES) 
genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genpartmaplist.sh kernel > $@ || (rm -f $@; exit 1)
+
+
+kernel_mod-kern_fs.o: kern/fs.c $(kern/fs.c_DEPENDENCIES)
+       $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -MD -c -o $@ $<
+-include kernel_mod-kern_fs.d
+
+CLEANFILES += cmd-kernel_mod-kern_fs.lst fs-kernel_mod-kern_fs.lst 
partmap-kernel_mod-kern_fs.lst
+COMMANDFILES += cmd-kernel_mod-kern_fs.lst
+FSFILES += fs-kernel_mod-kern_fs.lst
+PARTMAPFILES += partmap-kernel_mod-kern_fs.lst
+
+cmd-kernel_mod-kern_fs.lst: kern/fs.c $(kern/fs.c_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/gencmdlist.sh kernel > $@ || (rm -f $@; exit 1)
+
+fs-kernel_mod-kern_fs.lst: kern/fs.c $(kern/fs.c_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genfslist.sh kernel > $@ || (rm -f $@; exit 1)
+
+partmap-kernel_mod-kern_fs.lst: kern/fs.c $(kern/fs.c_DEPENDENCIES) 
genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genpartmaplist.sh kernel > $@ || (rm -f $@; exit 1)
+
+
+kernel_mod-kern_err.o: kern/err.c $(kern/err.c_DEPENDENCIES)
+       $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -MD -c -o $@ $<
+-include kernel_mod-kern_err.d
+
+CLEANFILES += cmd-kernel_mod-kern_err.lst fs-kernel_mod-kern_err.lst 
partmap-kernel_mod-kern_err.lst
+COMMANDFILES += cmd-kernel_mod-kern_err.lst
+FSFILES += fs-kernel_mod-kern_err.lst
+PARTMAPFILES += partmap-kernel_mod-kern_err.lst
+
+cmd-kernel_mod-kern_err.lst: kern/err.c $(kern/err.c_DEPENDENCIES) 
gencmdlist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/gencmdlist.sh kernel > $@ || (rm -f $@; exit 1)
+
+fs-kernel_mod-kern_err.lst: kern/err.c $(kern/err.c_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genfslist.sh kernel > $@ || (rm -f $@; exit 1)
+
+partmap-kernel_mod-kern_err.lst: kern/err.c $(kern/err.c_DEPENDENCIES) 
genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genpartmaplist.sh kernel > $@ || (rm -f $@; exit 1)
+
+
+kernel_mod-kern_misc.o: kern/misc.c $(kern/misc.c_DEPENDENCIES)
+       $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -MD -c -o $@ $<
+-include kernel_mod-kern_misc.d
+
+CLEANFILES += cmd-kernel_mod-kern_misc.lst fs-kernel_mod-kern_misc.lst 
partmap-kernel_mod-kern_misc.lst
+COMMANDFILES += cmd-kernel_mod-kern_misc.lst
+FSFILES += fs-kernel_mod-kern_misc.lst
+PARTMAPFILES += partmap-kernel_mod-kern_misc.lst
+
+cmd-kernel_mod-kern_misc.lst: kern/misc.c $(kern/misc.c_DEPENDENCIES) 
gencmdlist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/gencmdlist.sh kernel > $@ || (rm -f $@; exit 1)
+
+fs-kernel_mod-kern_misc.lst: kern/misc.c $(kern/misc.c_DEPENDENCIES) 
genfslist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genfslist.sh kernel > $@ || (rm -f $@; exit 1)
+
+partmap-kernel_mod-kern_misc.lst: kern/misc.c $(kern/misc.c_DEPENDENCIES) 
genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genpartmaplist.sh kernel > $@ || (rm -f $@; exit 1)
+
+
+kernel_mod-kern_mm.o: kern/mm.c $(kern/mm.c_DEPENDENCIES)
+       $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -MD -c -o $@ $<
+-include kernel_mod-kern_mm.d
+
+CLEANFILES += cmd-kernel_mod-kern_mm.lst fs-kernel_mod-kern_mm.lst 
partmap-kernel_mod-kern_mm.lst
+COMMANDFILES += cmd-kernel_mod-kern_mm.lst
+FSFILES += fs-kernel_mod-kern_mm.lst
+PARTMAPFILES += partmap-kernel_mod-kern_mm.lst
+
+cmd-kernel_mod-kern_mm.lst: kern/mm.c $(kern/mm.c_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/gencmdlist.sh kernel > $@ || (rm -f $@; exit 1)
+
+fs-kernel_mod-kern_mm.lst: kern/mm.c $(kern/mm.c_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genfslist.sh kernel > $@ || (rm -f $@; exit 1)
+
+partmap-kernel_mod-kern_mm.lst: kern/mm.c $(kern/mm.c_DEPENDENCIES) 
genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genpartmaplist.sh kernel > $@ || (rm -f $@; exit 1)
+
+
+kernel_mod-kern_loader.o: kern/loader.c $(kern/loader.c_DEPENDENCIES)
+       $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -MD -c -o $@ $<
+-include kernel_mod-kern_loader.d
+
+CLEANFILES += cmd-kernel_mod-kern_loader.lst fs-kernel_mod-kern_loader.lst 
partmap-kernel_mod-kern_loader.lst
+COMMANDFILES += cmd-kernel_mod-kern_loader.lst
+FSFILES += fs-kernel_mod-kern_loader.lst
+PARTMAPFILES += partmap-kernel_mod-kern_loader.lst
+
+cmd-kernel_mod-kern_loader.lst: kern/loader.c $(kern/loader.c_DEPENDENCIES) 
gencmdlist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/gencmdlist.sh kernel > $@ || (rm -f $@; exit 1)
+
+fs-kernel_mod-kern_loader.lst: kern/loader.c $(kern/loader.c_DEPENDENCIES) 
genfslist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genfslist.sh kernel > $@ || (rm -f $@; exit 1)
+
+partmap-kernel_mod-kern_loader.lst: kern/loader.c 
$(kern/loader.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genpartmaplist.sh kernel > $@ || (rm -f $@; exit 1)
+
+
+kernel_mod-kern_rescue.o: kern/rescue.c $(kern/rescue.c_DEPENDENCIES)
+       $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -MD -c -o $@ $<
+-include kernel_mod-kern_rescue.d
+
+CLEANFILES += cmd-kernel_mod-kern_rescue.lst fs-kernel_mod-kern_rescue.lst 
partmap-kernel_mod-kern_rescue.lst
+COMMANDFILES += cmd-kernel_mod-kern_rescue.lst
+FSFILES += fs-kernel_mod-kern_rescue.lst
+PARTMAPFILES += partmap-kernel_mod-kern_rescue.lst
+
+cmd-kernel_mod-kern_rescue.lst: kern/rescue.c $(kern/rescue.c_DEPENDENCIES) 
gencmdlist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/gencmdlist.sh kernel > $@ || (rm -f $@; exit 1)
+
+fs-kernel_mod-kern_rescue.lst: kern/rescue.c $(kern/rescue.c_DEPENDENCIES) 
genfslist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genfslist.sh kernel > $@ || (rm -f $@; exit 1)
+
+partmap-kernel_mod-kern_rescue.lst: kern/rescue.c 
$(kern/rescue.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genpartmaplist.sh kernel > $@ || (rm -f $@; exit 1)
+
+
+kernel_mod-kern_term.o: kern/term.c $(kern/term.c_DEPENDENCIES)
+       $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -MD -c -o $@ $<
+-include kernel_mod-kern_term.d
+
+CLEANFILES += cmd-kernel_mod-kern_term.lst fs-kernel_mod-kern_term.lst 
partmap-kernel_mod-kern_term.lst
+COMMANDFILES += cmd-kernel_mod-kern_term.lst
+FSFILES += fs-kernel_mod-kern_term.lst
+PARTMAPFILES += partmap-kernel_mod-kern_term.lst
+
+cmd-kernel_mod-kern_term.lst: kern/term.c $(kern/term.c_DEPENDENCIES) 
gencmdlist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/gencmdlist.sh kernel > $@ || (rm -f $@; exit 1)
+
+fs-kernel_mod-kern_term.lst: kern/term.c $(kern/term.c_DEPENDENCIES) 
genfslist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genfslist.sh kernel > $@ || (rm -f $@; exit 1)
+
+partmap-kernel_mod-kern_term.lst: kern/term.c $(kern/term.c_DEPENDENCIES) 
genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genpartmaplist.sh kernel > $@ || (rm -f $@; exit 1)
+
+
+kernel_mod-kern_x86_64_dl.o: kern/x86_64/dl.c $(kern/x86_64/dl.c_DEPENDENCIES)
+       $(TARGET_CC) -Ikern/x86_64 -I$(srcdir)/kern/x86_64 $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -MD -c -o $@ $<
+-include kernel_mod-kern_x86_64_dl.d
+
+CLEANFILES += cmd-kernel_mod-kern_x86_64_dl.lst 
fs-kernel_mod-kern_x86_64_dl.lst partmap-kernel_mod-kern_x86_64_dl.lst
+COMMANDFILES += cmd-kernel_mod-kern_x86_64_dl.lst
+FSFILES += fs-kernel_mod-kern_x86_64_dl.lst
+PARTMAPFILES += partmap-kernel_mod-kern_x86_64_dl.lst
+
+cmd-kernel_mod-kern_x86_64_dl.lst: kern/x86_64/dl.c 
$(kern/x86_64/dl.c_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -Ikern/x86_64 -I$(srcdir)/kern/x86_64 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<       | sh 
$(srcdir)/gencmdlist.sh kernel > $@ || (rm -f $@; exit 1)
+
+fs-kernel_mod-kern_x86_64_dl.lst: kern/x86_64/dl.c 
$(kern/x86_64/dl.c_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -Ikern/x86_64 -I$(srcdir)/kern/x86_64 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<       | sh 
$(srcdir)/genfslist.sh kernel > $@ || (rm -f $@; exit 1)
+
+partmap-kernel_mod-kern_x86_64_dl.lst: kern/x86_64/dl.c 
$(kern/x86_64/dl.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Ikern/x86_64 -I$(srcdir)/kern/x86_64 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<       | sh 
$(srcdir)/genpartmaplist.sh kernel > $@ || (rm -f $@; exit 1)
+
+
+kernel_mod-kern_i386_efi_init.o: kern/i386/efi/init.c 
$(kern/i386/efi/init.c_DEPENDENCIES)
+       $(TARGET_CC) -Ikern/i386/efi -I$(srcdir)/kern/i386/efi 
$(TARGET_CPPFLAGS)  $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -MD -c -o $@ $<
+-include kernel_mod-kern_i386_efi_init.d
+
+CLEANFILES += cmd-kernel_mod-kern_i386_efi_init.lst 
fs-kernel_mod-kern_i386_efi_init.lst partmap-kernel_mod-kern_i386_efi_init.lst
+COMMANDFILES += cmd-kernel_mod-kern_i386_efi_init.lst
+FSFILES += fs-kernel_mod-kern_i386_efi_init.lst
+PARTMAPFILES += partmap-kernel_mod-kern_i386_efi_init.lst
+
+cmd-kernel_mod-kern_i386_efi_init.lst: kern/i386/efi/init.c 
$(kern/i386/efi/init.c_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -Ikern/i386/efi 
-I$(srcdir)/kern/i386/efi $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) 
$(kernel_mod_CFLAGS) -E $<           | sh $(srcdir)/gencmdlist.sh kernel > $@ 
|| (rm -f $@; exit 1)
+
+fs-kernel_mod-kern_i386_efi_init.lst: kern/i386/efi/init.c 
$(kern/i386/efi/init.c_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -Ikern/i386/efi 
-I$(srcdir)/kern/i386/efi $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) 
$(kernel_mod_CFLAGS) -E $<           | sh $(srcdir)/genfslist.sh kernel > $@ || 
(rm -f $@; exit 1)
+
+partmap-kernel_mod-kern_i386_efi_init.lst: kern/i386/efi/init.c 
$(kern/i386/efi/init.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Ikern/i386/efi 
-I$(srcdir)/kern/i386/efi $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) 
$(kernel_mod_CFLAGS) -E $<           | sh $(srcdir)/genpartmaplist.sh kernel > 
$@ || (rm -f $@; exit 1)
+
+
+kernel_mod-kern_parser.o: kern/parser.c $(kern/parser.c_DEPENDENCIES)
+       $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -MD -c -o $@ $<
+-include kernel_mod-kern_parser.d
+
+CLEANFILES += cmd-kernel_mod-kern_parser.lst fs-kernel_mod-kern_parser.lst 
partmap-kernel_mod-kern_parser.lst
+COMMANDFILES += cmd-kernel_mod-kern_parser.lst
+FSFILES += fs-kernel_mod-kern_parser.lst
+PARTMAPFILES += partmap-kernel_mod-kern_parser.lst
+
+cmd-kernel_mod-kern_parser.lst: kern/parser.c $(kern/parser.c_DEPENDENCIES) 
gencmdlist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/gencmdlist.sh kernel > $@ || (rm -f $@; exit 1)
+
+fs-kernel_mod-kern_parser.lst: kern/parser.c $(kern/parser.c_DEPENDENCIES) 
genfslist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genfslist.sh kernel > $@ || (rm -f $@; exit 1)
+
+partmap-kernel_mod-kern_parser.lst: kern/parser.c 
$(kern/parser.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genpartmaplist.sh kernel > $@ || (rm -f $@; exit 1)
+
+
+kernel_mod-kern_partition.o: kern/partition.c $(kern/partition.c_DEPENDENCIES)
+       $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -MD -c -o $@ $<
+-include kernel_mod-kern_partition.d
+
+CLEANFILES += cmd-kernel_mod-kern_partition.lst 
fs-kernel_mod-kern_partition.lst partmap-kernel_mod-kern_partition.lst
+COMMANDFILES += cmd-kernel_mod-kern_partition.lst
+FSFILES += fs-kernel_mod-kern_partition.lst
+PARTMAPFILES += partmap-kernel_mod-kern_partition.lst
+
+cmd-kernel_mod-kern_partition.lst: kern/partition.c 
$(kern/partition.c_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/gencmdlist.sh kernel > $@ || (rm -f $@; exit 1)
+
+fs-kernel_mod-kern_partition.lst: kern/partition.c 
$(kern/partition.c_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genfslist.sh kernel > $@ || (rm -f $@; exit 1)
+
+partmap-kernel_mod-kern_partition.lst: kern/partition.c 
$(kern/partition.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genpartmaplist.sh kernel > $@ || (rm -f $@; exit 1)
+
+
+kernel_mod-kern_env.o: kern/env.c $(kern/env.c_DEPENDENCIES)
+       $(TARGET_CC) -Ikern -I$(srcdir)/kern $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -MD -c -o $@ $<
+-include kernel_mod-kern_env.d
+
+CLEANFILES += cmd-kernel_mod-kern_env.lst fs-kernel_mod-kern_env.lst 
partmap-kernel_mod-kern_env.lst
+COMMANDFILES += cmd-kernel_mod-kern_env.lst
+FSFILES += fs-kernel_mod-kern_env.lst
+PARTMAPFILES += partmap-kernel_mod-kern_env.lst
+
+cmd-kernel_mod-kern_env.lst: kern/env.c $(kern/env.c_DEPENDENCIES) 
gencmdlist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/gencmdlist.sh kernel > $@ || (rm -f $@; exit 1)
+
+fs-kernel_mod-kern_env.lst: kern/env.c $(kern/env.c_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genfslist.sh kernel > $@ || (rm -f $@; exit 1)
+
+partmap-kernel_mod-kern_env.lst: kern/env.c $(kern/env.c_DEPENDENCIES) 
genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Ikern -I$(srcdir)/kern 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genpartmaplist.sh kernel > $@ || (rm -f $@; exit 1)
+
+
+kernel_mod-symlist.o: symlist.c $(symlist.c_DEPENDENCIES)
+       $(TARGET_CC) -I. -I$(srcdir)/. $(TARGET_CPPFLAGS)  $(TARGET_CFLAGS) 
$(kernel_mod_CFLAGS) -MD -c -o $@ $<
+-include kernel_mod-symlist.d
+
+CLEANFILES += cmd-kernel_mod-symlist.lst fs-kernel_mod-symlist.lst 
partmap-kernel_mod-symlist.lst
+COMMANDFILES += cmd-kernel_mod-symlist.lst
+FSFILES += fs-kernel_mod-symlist.lst
+PARTMAPFILES += partmap-kernel_mod-symlist.lst
+
+cmd-kernel_mod-symlist.lst: symlist.c $(symlist.c_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -I. -I$(srcdir)/. $(TARGET_CPPFLAGS) 
$(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<           | sh 
$(srcdir)/gencmdlist.sh kernel > $@ || (rm -f $@; exit 1)
+
+fs-kernel_mod-symlist.lst: symlist.c $(symlist.c_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -I. -I$(srcdir)/. $(TARGET_CPPFLAGS) 
$(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<           | sh 
$(srcdir)/genfslist.sh kernel > $@ || (rm -f $@; exit 1)
+
+partmap-kernel_mod-symlist.lst: symlist.c $(symlist.c_DEPENDENCIES) 
genpartmaplist.sh
+       set -e;           $(TARGET_CC) -I. -I$(srcdir)/. $(TARGET_CPPFLAGS) 
$(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<           | sh 
$(srcdir)/genpartmaplist.sh kernel > $@ || (rm -f $@; exit 1)
+
+
+kernel_mod-kern_efi_efi.o: kern/efi/efi.c $(kern/efi/efi.c_DEPENDENCIES)
+       $(TARGET_CC) -Ikern/efi -I$(srcdir)/kern/efi $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -MD -c -o $@ $<
+-include kernel_mod-kern_efi_efi.d
+
+CLEANFILES += cmd-kernel_mod-kern_efi_efi.lst fs-kernel_mod-kern_efi_efi.lst 
partmap-kernel_mod-kern_efi_efi.lst
+COMMANDFILES += cmd-kernel_mod-kern_efi_efi.lst
+FSFILES += fs-kernel_mod-kern_efi_efi.lst
+PARTMAPFILES += partmap-kernel_mod-kern_efi_efi.lst
+
+cmd-kernel_mod-kern_efi_efi.lst: kern/efi/efi.c $(kern/efi/efi.c_DEPENDENCIES) 
gencmdlist.sh
+       set -e;           $(TARGET_CC) -Ikern/efi -I$(srcdir)/kern/efi 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/gencmdlist.sh kernel > $@ || (rm -f $@; exit 1)
+
+fs-kernel_mod-kern_efi_efi.lst: kern/efi/efi.c $(kern/efi/efi.c_DEPENDENCIES) 
genfslist.sh
+       set -e;           $(TARGET_CC) -Ikern/efi -I$(srcdir)/kern/efi 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genfslist.sh kernel > $@ || (rm -f $@; exit 1)
+
+partmap-kernel_mod-kern_efi_efi.lst: kern/efi/efi.c 
$(kern/efi/efi.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Ikern/efi -I$(srcdir)/kern/efi 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genpartmaplist.sh kernel > $@ || (rm -f $@; exit 1)
+
+
+kernel_mod-kern_efi_init.o: kern/efi/init.c $(kern/efi/init.c_DEPENDENCIES)
+       $(TARGET_CC) -Ikern/efi -I$(srcdir)/kern/efi $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -MD -c -o $@ $<
+-include kernel_mod-kern_efi_init.d
+
+CLEANFILES += cmd-kernel_mod-kern_efi_init.lst fs-kernel_mod-kern_efi_init.lst 
partmap-kernel_mod-kern_efi_init.lst
+COMMANDFILES += cmd-kernel_mod-kern_efi_init.lst
+FSFILES += fs-kernel_mod-kern_efi_init.lst
+PARTMAPFILES += partmap-kernel_mod-kern_efi_init.lst
+
+cmd-kernel_mod-kern_efi_init.lst: kern/efi/init.c 
$(kern/efi/init.c_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -Ikern/efi -I$(srcdir)/kern/efi 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/gencmdlist.sh kernel > $@ || (rm -f $@; exit 1)
+
+fs-kernel_mod-kern_efi_init.lst: kern/efi/init.c 
$(kern/efi/init.c_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -Ikern/efi -I$(srcdir)/kern/efi 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genfslist.sh kernel > $@ || (rm -f $@; exit 1)
+
+partmap-kernel_mod-kern_efi_init.lst: kern/efi/init.c 
$(kern/efi/init.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Ikern/efi -I$(srcdir)/kern/efi 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genpartmaplist.sh kernel > $@ || (rm -f $@; exit 1)
+
+
+kernel_mod-kern_efi_mm.o: kern/efi/mm.c $(kern/efi/mm.c_DEPENDENCIES)
+       $(TARGET_CC) -Ikern/efi -I$(srcdir)/kern/efi $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -MD -c -o $@ $<
+-include kernel_mod-kern_efi_mm.d
+
+CLEANFILES += cmd-kernel_mod-kern_efi_mm.lst fs-kernel_mod-kern_efi_mm.lst 
partmap-kernel_mod-kern_efi_mm.lst
+COMMANDFILES += cmd-kernel_mod-kern_efi_mm.lst
+FSFILES += fs-kernel_mod-kern_efi_mm.lst
+PARTMAPFILES += partmap-kernel_mod-kern_efi_mm.lst
+
+cmd-kernel_mod-kern_efi_mm.lst: kern/efi/mm.c $(kern/efi/mm.c_DEPENDENCIES) 
gencmdlist.sh
+       set -e;           $(TARGET_CC) -Ikern/efi -I$(srcdir)/kern/efi 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/gencmdlist.sh kernel > $@ || (rm -f $@; exit 1)
+
+fs-kernel_mod-kern_efi_mm.lst: kern/efi/mm.c $(kern/efi/mm.c_DEPENDENCIES) 
genfslist.sh
+       set -e;           $(TARGET_CC) -Ikern/efi -I$(srcdir)/kern/efi 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genfslist.sh kernel > $@ || (rm -f $@; exit 1)
+
+partmap-kernel_mod-kern_efi_mm.lst: kern/efi/mm.c 
$(kern/efi/mm.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Ikern/efi -I$(srcdir)/kern/efi 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genpartmaplist.sh kernel > $@ || (rm -f $@; exit 1)
+
+
+kernel_mod-term_efi_console.o: term/efi/console.c 
$(term/efi/console.c_DEPENDENCIES)
+       $(TARGET_CC) -Iterm/efi -I$(srcdir)/term/efi $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -MD -c -o $@ $<
+-include kernel_mod-term_efi_console.d
+
+CLEANFILES += cmd-kernel_mod-term_efi_console.lst 
fs-kernel_mod-term_efi_console.lst partmap-kernel_mod-term_efi_console.lst
+COMMANDFILES += cmd-kernel_mod-term_efi_console.lst
+FSFILES += fs-kernel_mod-term_efi_console.lst
+PARTMAPFILES += partmap-kernel_mod-term_efi_console.lst
+
+cmd-kernel_mod-term_efi_console.lst: term/efi/console.c 
$(term/efi/console.c_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -Iterm/efi -I$(srcdir)/term/efi 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/gencmdlist.sh kernel > $@ || (rm -f $@; exit 1)
+
+fs-kernel_mod-term_efi_console.lst: term/efi/console.c 
$(term/efi/console.c_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -Iterm/efi -I$(srcdir)/term/efi 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genfslist.sh kernel > $@ || (rm -f $@; exit 1)
+
+partmap-kernel_mod-term_efi_console.lst: term/efi/console.c 
$(term/efi/console.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Iterm/efi -I$(srcdir)/term/efi 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genpartmaplist.sh kernel > $@ || (rm -f $@; exit 1)
+
+
+kernel_mod-disk_efi_efidisk.o: disk/efi/efidisk.c 
$(disk/efi/efidisk.c_DEPENDENCIES)
+       $(TARGET_CC) -Idisk/efi -I$(srcdir)/disk/efi $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -MD -c -o $@ $<
+-include kernel_mod-disk_efi_efidisk.d
+
+CLEANFILES += cmd-kernel_mod-disk_efi_efidisk.lst 
fs-kernel_mod-disk_efi_efidisk.lst partmap-kernel_mod-disk_efi_efidisk.lst
+COMMANDFILES += cmd-kernel_mod-disk_efi_efidisk.lst
+FSFILES += fs-kernel_mod-disk_efi_efidisk.lst
+PARTMAPFILES += partmap-kernel_mod-disk_efi_efidisk.lst
+
+cmd-kernel_mod-disk_efi_efidisk.lst: disk/efi/efidisk.c 
$(disk/efi/efidisk.c_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -Idisk/efi -I$(srcdir)/disk/efi 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/gencmdlist.sh kernel > $@ || (rm -f $@; exit 1)
+
+fs-kernel_mod-disk_efi_efidisk.lst: disk/efi/efidisk.c 
$(disk/efi/efidisk.c_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -Idisk/efi -I$(srcdir)/disk/efi 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genfslist.sh kernel > $@ || (rm -f $@; exit 1)
+
+partmap-kernel_mod-disk_efi_efidisk.lst: disk/efi/efidisk.c 
$(disk/efi/efidisk.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Idisk/efi -I$(srcdir)/disk/efi 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(kernel_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genpartmaplist.sh kernel > $@ || (rm -f $@; exit 1)
+
+
+kernel_mod_HEADERS = arg.h 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 rescue.h symbol.h term.h time.h types.h \
+       efi/efi.h efi/time.h efi/disk.h machine/loader.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 normal.mod.
+normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c    \
+       normal/completion.c normal/execute.c            \
+       normal/function.c normal/lexer.c normal/main.c normal/menu.c    \
+       normal/menu_entry.c normal/misc.c grub_script.tab.c             \
+       normal/script.c normal/x86_64/setjmp.S normal/color.c
+CLEANFILES += normal.mod mod-normal.o mod-normal.c pre-normal.o 
normal_mod-normal_arg.o normal_mod-normal_cmdline.o normal_mod-normal_command.o 
normal_mod-normal_completion.o normal_mod-normal_execute.o 
normal_mod-normal_function.o normal_mod-normal_lexer.o normal_mod-normal_main.o 
normal_mod-normal_menu.o normal_mod-normal_menu_entry.o 
normal_mod-normal_misc.o normal_mod-grub_script_tab.o 
normal_mod-normal_script.o normal_mod-normal_x86_64_setjmp.o 
normal_mod-normal_color.o und-normal.lst
+ifneq ($(normal_mod_EXPORTS),no)
+CLEANFILES += def-normal.lst
+DEFSYMFILES += def-normal.lst
+endif
+MOSTLYCLEANFILES += normal_mod-normal_arg.d normal_mod-normal_cmdline.d 
normal_mod-normal_command.d normal_mod-normal_completion.d 
normal_mod-normal_execute.d normal_mod-normal_function.d 
normal_mod-normal_lexer.d normal_mod-normal_main.d normal_mod-normal_menu.d 
normal_mod-normal_menu_entry.d normal_mod-normal_misc.d 
normal_mod-grub_script_tab.d normal_mod-normal_script.d 
normal_mod-normal_x86_64_setjmp.d normal_mod-normal_color.d
+UNDSYMFILES += und-normal.lst
+
+normal.mod: pre-normal.o mod-normal.o
+       -rm -f $@
+       $(TARGET_CC) $(normal_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) 
-Wl,-r,-d -o $@ $^
+       $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R 
.comment $@
+
+pre-normal.o: $(normal_mod_DEPENDENCIES) normal_mod-normal_arg.o 
normal_mod-normal_cmdline.o normal_mod-normal_command.o 
normal_mod-normal_completion.o normal_mod-normal_execute.o 
normal_mod-normal_function.o normal_mod-normal_lexer.o normal_mod-normal_main.o 
normal_mod-normal_menu.o normal_mod-normal_menu_entry.o 
normal_mod-normal_misc.o normal_mod-grub_script_tab.o 
normal_mod-normal_script.o normal_mod-normal_x86_64_setjmp.o 
normal_mod-normal_color.o
+       -rm -f $@
+       $(TARGET_CC) $(normal_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ 
normal_mod-normal_arg.o normal_mod-normal_cmdline.o normal_mod-normal_command.o 
normal_mod-normal_completion.o normal_mod-normal_execute.o 
normal_mod-normal_function.o normal_mod-normal_lexer.o normal_mod-normal_main.o 
normal_mod-normal_menu.o normal_mod-normal_menu_entry.o 
normal_mod-normal_misc.o normal_mod-grub_script_tab.o 
normal_mod-normal_script.o normal_mod-normal_x86_64_setjmp.o 
normal_mod-normal_color.o
+
+mod-normal.o: mod-normal.c
+       $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) 
-c -o $@ $<
+
+mod-normal.c: moddep.lst genmodsrc.sh
+       sh $(srcdir)/genmodsrc.sh 'normal' $< > $@ || (rm -f $@; exit 1)
+
+ifneq ($(normal_mod_EXPORTS),no)
+def-normal.lst: pre-normal.o
+       $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 normal/' > $@
+endif
+
+und-normal.lst: pre-normal.o
+       echo 'normal' > $@
+       $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
+
+normal_mod-normal_arg.o: normal/arg.c $(normal/arg.c_DEPENDENCIES)
+       $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
+-include normal_mod-normal_arg.d
+
+CLEANFILES += cmd-normal_mod-normal_arg.lst fs-normal_mod-normal_arg.lst 
partmap-normal_mod-normal_arg.lst
+COMMANDFILES += cmd-normal_mod-normal_arg.lst
+FSFILES += fs-normal_mod-normal_arg.lst
+PARTMAPFILES += partmap-normal_mod-normal_arg.lst
+
+cmd-normal_mod-normal_arg.lst: normal/arg.c $(normal/arg.c_DEPENDENCIES) 
gencmdlist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/gencmdlist.sh normal > $@ || (rm -f $@; exit 1)
+
+fs-normal_mod-normal_arg.lst: normal/arg.c $(normal/arg.c_DEPENDENCIES) 
genfslist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/genfslist.sh normal > $@ || (rm -f $@; exit 1)
+
+partmap-normal_mod-normal_arg.lst: normal/arg.c $(normal/arg.c_DEPENDENCIES) 
genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/genpartmaplist.sh normal > $@ || (rm -f $@; exit 1)
+
+
+normal_mod-normal_cmdline.o: normal/cmdline.c $(normal/cmdline.c_DEPENDENCIES)
+       $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
+-include normal_mod-normal_cmdline.d
+
+CLEANFILES += cmd-normal_mod-normal_cmdline.lst 
fs-normal_mod-normal_cmdline.lst partmap-normal_mod-normal_cmdline.lst
+COMMANDFILES += cmd-normal_mod-normal_cmdline.lst
+FSFILES += fs-normal_mod-normal_cmdline.lst
+PARTMAPFILES += partmap-normal_mod-normal_cmdline.lst
+
+cmd-normal_mod-normal_cmdline.lst: normal/cmdline.c 
$(normal/cmdline.c_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/gencmdlist.sh normal > $@ || (rm -f $@; exit 1)
+
+fs-normal_mod-normal_cmdline.lst: normal/cmdline.c 
$(normal/cmdline.c_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/genfslist.sh normal > $@ || (rm -f $@; exit 1)
+
+partmap-normal_mod-normal_cmdline.lst: normal/cmdline.c 
$(normal/cmdline.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/genpartmaplist.sh normal > $@ || (rm -f $@; exit 1)
+
+
+normal_mod-normal_command.o: normal/command.c $(normal/command.c_DEPENDENCIES)
+       $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
+-include normal_mod-normal_command.d
+
+CLEANFILES += cmd-normal_mod-normal_command.lst 
fs-normal_mod-normal_command.lst partmap-normal_mod-normal_command.lst
+COMMANDFILES += cmd-normal_mod-normal_command.lst
+FSFILES += fs-normal_mod-normal_command.lst
+PARTMAPFILES += partmap-normal_mod-normal_command.lst
+
+cmd-normal_mod-normal_command.lst: normal/command.c 
$(normal/command.c_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/gencmdlist.sh normal > $@ || (rm -f $@; exit 1)
+
+fs-normal_mod-normal_command.lst: normal/command.c 
$(normal/command.c_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/genfslist.sh normal > $@ || (rm -f $@; exit 1)
+
+partmap-normal_mod-normal_command.lst: normal/command.c 
$(normal/command.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/genpartmaplist.sh normal > $@ || (rm -f $@; exit 1)
+
+
+normal_mod-normal_completion.o: normal/completion.c 
$(normal/completion.c_DEPENDENCIES)
+       $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
+-include normal_mod-normal_completion.d
+
+CLEANFILES += cmd-normal_mod-normal_completion.lst 
fs-normal_mod-normal_completion.lst partmap-normal_mod-normal_completion.lst
+COMMANDFILES += cmd-normal_mod-normal_completion.lst
+FSFILES += fs-normal_mod-normal_completion.lst
+PARTMAPFILES += partmap-normal_mod-normal_completion.lst
+
+cmd-normal_mod-normal_completion.lst: normal/completion.c 
$(normal/completion.c_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/gencmdlist.sh normal > $@ || (rm -f $@; exit 1)
+
+fs-normal_mod-normal_completion.lst: normal/completion.c 
$(normal/completion.c_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/genfslist.sh normal > $@ || (rm -f $@; exit 1)
+
+partmap-normal_mod-normal_completion.lst: normal/completion.c 
$(normal/completion.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/genpartmaplist.sh normal > $@ || (rm -f $@; exit 1)
+
+
+normal_mod-normal_execute.o: normal/execute.c $(normal/execute.c_DEPENDENCIES)
+       $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
+-include normal_mod-normal_execute.d
+
+CLEANFILES += cmd-normal_mod-normal_execute.lst 
fs-normal_mod-normal_execute.lst partmap-normal_mod-normal_execute.lst
+COMMANDFILES += cmd-normal_mod-normal_execute.lst
+FSFILES += fs-normal_mod-normal_execute.lst
+PARTMAPFILES += partmap-normal_mod-normal_execute.lst
+
+cmd-normal_mod-normal_execute.lst: normal/execute.c 
$(normal/execute.c_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/gencmdlist.sh normal > $@ || (rm -f $@; exit 1)
+
+fs-normal_mod-normal_execute.lst: normal/execute.c 
$(normal/execute.c_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/genfslist.sh normal > $@ || (rm -f $@; exit 1)
+
+partmap-normal_mod-normal_execute.lst: normal/execute.c 
$(normal/execute.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/genpartmaplist.sh normal > $@ || (rm -f $@; exit 1)
+
+
+normal_mod-normal_function.o: normal/function.c 
$(normal/function.c_DEPENDENCIES)
+       $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
+-include normal_mod-normal_function.d
+
+CLEANFILES += cmd-normal_mod-normal_function.lst 
fs-normal_mod-normal_function.lst partmap-normal_mod-normal_function.lst
+COMMANDFILES += cmd-normal_mod-normal_function.lst
+FSFILES += fs-normal_mod-normal_function.lst
+PARTMAPFILES += partmap-normal_mod-normal_function.lst
+
+cmd-normal_mod-normal_function.lst: normal/function.c 
$(normal/function.c_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/gencmdlist.sh normal > $@ || (rm -f $@; exit 1)
+
+fs-normal_mod-normal_function.lst: normal/function.c 
$(normal/function.c_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/genfslist.sh normal > $@ || (rm -f $@; exit 1)
+
+partmap-normal_mod-normal_function.lst: normal/function.c 
$(normal/function.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/genpartmaplist.sh normal > $@ || (rm -f $@; exit 1)
+
+
+normal_mod-normal_lexer.o: normal/lexer.c $(normal/lexer.c_DEPENDENCIES)
+       $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
+-include normal_mod-normal_lexer.d
+
+CLEANFILES += cmd-normal_mod-normal_lexer.lst fs-normal_mod-normal_lexer.lst 
partmap-normal_mod-normal_lexer.lst
+COMMANDFILES += cmd-normal_mod-normal_lexer.lst
+FSFILES += fs-normal_mod-normal_lexer.lst
+PARTMAPFILES += partmap-normal_mod-normal_lexer.lst
+
+cmd-normal_mod-normal_lexer.lst: normal/lexer.c $(normal/lexer.c_DEPENDENCIES) 
gencmdlist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/gencmdlist.sh normal > $@ || (rm -f $@; exit 1)
+
+fs-normal_mod-normal_lexer.lst: normal/lexer.c $(normal/lexer.c_DEPENDENCIES) 
genfslist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/genfslist.sh normal > $@ || (rm -f $@; exit 1)
+
+partmap-normal_mod-normal_lexer.lst: normal/lexer.c 
$(normal/lexer.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/genpartmaplist.sh normal > $@ || (rm -f $@; exit 1)
+
+
+normal_mod-normal_main.o: normal/main.c $(normal/main.c_DEPENDENCIES)
+       $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
+-include normal_mod-normal_main.d
+
+CLEANFILES += cmd-normal_mod-normal_main.lst fs-normal_mod-normal_main.lst 
partmap-normal_mod-normal_main.lst
+COMMANDFILES += cmd-normal_mod-normal_main.lst
+FSFILES += fs-normal_mod-normal_main.lst
+PARTMAPFILES += partmap-normal_mod-normal_main.lst
+
+cmd-normal_mod-normal_main.lst: normal/main.c $(normal/main.c_DEPENDENCIES) 
gencmdlist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/gencmdlist.sh normal > $@ || (rm -f $@; exit 1)
+
+fs-normal_mod-normal_main.lst: normal/main.c $(normal/main.c_DEPENDENCIES) 
genfslist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/genfslist.sh normal > $@ || (rm -f $@; exit 1)
+
+partmap-normal_mod-normal_main.lst: normal/main.c 
$(normal/main.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/genpartmaplist.sh normal > $@ || (rm -f $@; exit 1)
+
+
+normal_mod-normal_menu.o: normal/menu.c $(normal/menu.c_DEPENDENCIES)
+       $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
+-include normal_mod-normal_menu.d
+
+CLEANFILES += cmd-normal_mod-normal_menu.lst fs-normal_mod-normal_menu.lst 
partmap-normal_mod-normal_menu.lst
+COMMANDFILES += cmd-normal_mod-normal_menu.lst
+FSFILES += fs-normal_mod-normal_menu.lst
+PARTMAPFILES += partmap-normal_mod-normal_menu.lst
+
+cmd-normal_mod-normal_menu.lst: normal/menu.c $(normal/menu.c_DEPENDENCIES) 
gencmdlist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/gencmdlist.sh normal > $@ || (rm -f $@; exit 1)
+
+fs-normal_mod-normal_menu.lst: normal/menu.c $(normal/menu.c_DEPENDENCIES) 
genfslist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/genfslist.sh normal > $@ || (rm -f $@; exit 1)
+
+partmap-normal_mod-normal_menu.lst: normal/menu.c 
$(normal/menu.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/genpartmaplist.sh normal > $@ || (rm -f $@; exit 1)
+
+
+normal_mod-normal_menu_entry.o: normal/menu_entry.c 
$(normal/menu_entry.c_DEPENDENCIES)
+       $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
+-include normal_mod-normal_menu_entry.d
+
+CLEANFILES += cmd-normal_mod-normal_menu_entry.lst 
fs-normal_mod-normal_menu_entry.lst partmap-normal_mod-normal_menu_entry.lst
+COMMANDFILES += cmd-normal_mod-normal_menu_entry.lst
+FSFILES += fs-normal_mod-normal_menu_entry.lst
+PARTMAPFILES += partmap-normal_mod-normal_menu_entry.lst
+
+cmd-normal_mod-normal_menu_entry.lst: normal/menu_entry.c 
$(normal/menu_entry.c_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/gencmdlist.sh normal > $@ || (rm -f $@; exit 1)
+
+fs-normal_mod-normal_menu_entry.lst: normal/menu_entry.c 
$(normal/menu_entry.c_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/genfslist.sh normal > $@ || (rm -f $@; exit 1)
+
+partmap-normal_mod-normal_menu_entry.lst: normal/menu_entry.c 
$(normal/menu_entry.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/genpartmaplist.sh normal > $@ || (rm -f $@; exit 1)
+
+
+normal_mod-normal_misc.o: normal/misc.c $(normal/misc.c_DEPENDENCIES)
+       $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
+-include normal_mod-normal_misc.d
+
+CLEANFILES += cmd-normal_mod-normal_misc.lst fs-normal_mod-normal_misc.lst 
partmap-normal_mod-normal_misc.lst
+COMMANDFILES += cmd-normal_mod-normal_misc.lst
+FSFILES += fs-normal_mod-normal_misc.lst
+PARTMAPFILES += partmap-normal_mod-normal_misc.lst
+
+cmd-normal_mod-normal_misc.lst: normal/misc.c $(normal/misc.c_DEPENDENCIES) 
gencmdlist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/gencmdlist.sh normal > $@ || (rm -f $@; exit 1)
+
+fs-normal_mod-normal_misc.lst: normal/misc.c $(normal/misc.c_DEPENDENCIES) 
genfslist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/genfslist.sh normal > $@ || (rm -f $@; exit 1)
+
+partmap-normal_mod-normal_misc.lst: normal/misc.c 
$(normal/misc.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/genpartmaplist.sh normal > $@ || (rm -f $@; exit 1)
+
+
+normal_mod-grub_script_tab.o: grub_script.tab.c 
$(grub_script.tab.c_DEPENDENCIES)
+       $(TARGET_CC) -I. -I$(srcdir)/. $(TARGET_CPPFLAGS)  $(TARGET_CFLAGS) 
$(normal_mod_CFLAGS) -MD -c -o $@ $<
+-include normal_mod-grub_script_tab.d
+
+CLEANFILES += cmd-normal_mod-grub_script_tab.lst 
fs-normal_mod-grub_script_tab.lst partmap-normal_mod-grub_script_tab.lst
+COMMANDFILES += cmd-normal_mod-grub_script_tab.lst
+FSFILES += fs-normal_mod-grub_script_tab.lst
+PARTMAPFILES += partmap-normal_mod-grub_script_tab.lst
+
+cmd-normal_mod-grub_script_tab.lst: grub_script.tab.c 
$(grub_script.tab.c_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -I. -I$(srcdir)/. $(TARGET_CPPFLAGS) 
$(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<           | sh 
$(srcdir)/gencmdlist.sh normal > $@ || (rm -f $@; exit 1)
+
+fs-normal_mod-grub_script_tab.lst: grub_script.tab.c 
$(grub_script.tab.c_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -I. -I$(srcdir)/. $(TARGET_CPPFLAGS) 
$(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<           | sh 
$(srcdir)/genfslist.sh normal > $@ || (rm -f $@; exit 1)
+
+partmap-normal_mod-grub_script_tab.lst: grub_script.tab.c 
$(grub_script.tab.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -I. -I$(srcdir)/. $(TARGET_CPPFLAGS) 
$(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<           | sh 
$(srcdir)/genpartmaplist.sh normal > $@ || (rm -f $@; exit 1)
+
+
+normal_mod-normal_script.o: normal/script.c $(normal/script.c_DEPENDENCIES)
+       $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
+-include normal_mod-normal_script.d
+
+CLEANFILES += cmd-normal_mod-normal_script.lst fs-normal_mod-normal_script.lst 
partmap-normal_mod-normal_script.lst
+COMMANDFILES += cmd-normal_mod-normal_script.lst
+FSFILES += fs-normal_mod-normal_script.lst
+PARTMAPFILES += partmap-normal_mod-normal_script.lst
+
+cmd-normal_mod-normal_script.lst: normal/script.c 
$(normal/script.c_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/gencmdlist.sh normal > $@ || (rm -f $@; exit 1)
+
+fs-normal_mod-normal_script.lst: normal/script.c 
$(normal/script.c_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/genfslist.sh normal > $@ || (rm -f $@; exit 1)
+
+partmap-normal_mod-normal_script.lst: normal/script.c 
$(normal/script.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/genpartmaplist.sh normal > $@ || (rm -f $@; exit 1)
+
+
+normal_mod-normal_x86_64_setjmp.o: normal/x86_64/setjmp.S 
$(normal/x86_64/setjmp.S_DEPENDENCIES)
+       $(TARGET_CC) -Inormal/x86_64 -I$(srcdir)/normal/x86_64 
$(TARGET_CPPFLAGS) -DASM_FILE=1 $(TARGET_ASFLAGS) $(normal_mod_ASFLAGS) -MD -c 
-o $@ $<
+-include normal_mod-normal_x86_64_setjmp.d
+
+CLEANFILES += cmd-normal_mod-normal_x86_64_setjmp.lst 
fs-normal_mod-normal_x86_64_setjmp.lst 
partmap-normal_mod-normal_x86_64_setjmp.lst
+COMMANDFILES += cmd-normal_mod-normal_x86_64_setjmp.lst
+FSFILES += fs-normal_mod-normal_x86_64_setjmp.lst
+PARTMAPFILES += partmap-normal_mod-normal_x86_64_setjmp.lst
+
+cmd-normal_mod-normal_x86_64_setjmp.lst: normal/x86_64/setjmp.S 
$(normal/x86_64/setjmp.S_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -Inormal/x86_64 
-I$(srcdir)/normal/x86_64 $(TARGET_CPPFLAGS) $(TARGET_ASFLAGS) 
$(normal_mod_ASFLAGS) -E $<         | sh $(srcdir)/gencmdlist.sh normal > $@ || 
(rm -f $@; exit 1)
+
+fs-normal_mod-normal_x86_64_setjmp.lst: normal/x86_64/setjmp.S 
$(normal/x86_64/setjmp.S_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -Inormal/x86_64 
-I$(srcdir)/normal/x86_64 $(TARGET_CPPFLAGS) $(TARGET_ASFLAGS) 
$(normal_mod_ASFLAGS) -E $<         | sh $(srcdir)/genfslist.sh normal > $@ || 
(rm -f $@; exit 1)
+
+partmap-normal_mod-normal_x86_64_setjmp.lst: normal/x86_64/setjmp.S 
$(normal/x86_64/setjmp.S_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Inormal/x86_64 
-I$(srcdir)/normal/x86_64 $(TARGET_CPPFLAGS) $(TARGET_ASFLAGS) 
$(normal_mod_ASFLAGS) -E $<         | sh $(srcdir)/genpartmaplist.sh normal > 
$@ || (rm -f $@; exit 1)
+
+
+normal_mod-normal_color.o: normal/color.c $(normal/color.c_DEPENDENCIES)
+       $(TARGET_CC) -Inormal -I$(srcdir)/normal $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(normal_mod_CFLAGS) -MD -c -o $@ $<
+-include normal_mod-normal_color.d
+
+CLEANFILES += cmd-normal_mod-normal_color.lst fs-normal_mod-normal_color.lst 
partmap-normal_mod-normal_color.lst
+COMMANDFILES += cmd-normal_mod-normal_color.lst
+FSFILES += fs-normal_mod-normal_color.lst
+PARTMAPFILES += partmap-normal_mod-normal_color.lst
+
+cmd-normal_mod-normal_color.lst: normal/color.c $(normal/color.c_DEPENDENCIES) 
gencmdlist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/gencmdlist.sh normal > $@ || (rm -f $@; exit 1)
+
+fs-normal_mod-normal_color.lst: normal/color.c $(normal/color.c_DEPENDENCIES) 
genfslist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/genfslist.sh normal > $@ || (rm -f $@; exit 1)
+
+partmap-normal_mod-normal_color.lst: normal/color.c 
$(normal/color.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Inormal -I$(srcdir)/normal 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(normal_mod_CFLAGS) -E $<         | sh 
$(srcdir)/genpartmaplist.sh normal > $@ || (rm -f $@; exit 1)
+
+
+normal_mod_CFLAGS = $(COMMON_CFLAGS)
+normal_mod_ASFLAGS = $(COMMON_ASFLAGS)
+normal_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
+# For _chain.mod.
+_chain_mod_SOURCES = loader/efi/chainloader.c
+CLEANFILES += _chain.mod mod-_chain.o mod-_chain.c pre-_chain.o 
_chain_mod-loader_efi_chainloader.o und-_chain.lst
+ifneq ($(_chain_mod_EXPORTS),no)
+CLEANFILES += def-_chain.lst
+DEFSYMFILES += def-_chain.lst
+endif
+MOSTLYCLEANFILES += _chain_mod-loader_efi_chainloader.d
+UNDSYMFILES += und-_chain.lst
+
+_chain.mod: pre-_chain.o mod-_chain.o
+       -rm -f $@
+       $(TARGET_CC) $(_chain_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) 
-Wl,-r,-d -o $@ $^
+       $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R 
.comment $@
+
+pre-_chain.o: $(_chain_mod_DEPENDENCIES) _chain_mod-loader_efi_chainloader.o
+       -rm -f $@
+       $(TARGET_CC) $(_chain_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ 
_chain_mod-loader_efi_chainloader.o
+
+mod-_chain.o: mod-_chain.c
+       $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_chain_mod_CFLAGS) 
-c -o $@ $<
+
+mod-_chain.c: moddep.lst genmodsrc.sh
+       sh $(srcdir)/genmodsrc.sh '_chain' $< > $@ || (rm -f $@; exit 1)
+
+ifneq ($(_chain_mod_EXPORTS),no)
+def-_chain.lst: pre-_chain.o
+       $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 _chain/' > $@
+endif
+
+und-_chain.lst: pre-_chain.o
+       echo '_chain' > $@
+       $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
+
+_chain_mod-loader_efi_chainloader.o: loader/efi/chainloader.c 
$(loader/efi/chainloader.c_DEPENDENCIES)
+       $(TARGET_CC) -Iloader/efi -I$(srcdir)/loader/efi $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(_chain_mod_CFLAGS) -MD -c -o $@ $<
+-include _chain_mod-loader_efi_chainloader.d
+
+CLEANFILES += cmd-_chain_mod-loader_efi_chainloader.lst 
fs-_chain_mod-loader_efi_chainloader.lst 
partmap-_chain_mod-loader_efi_chainloader.lst
+COMMANDFILES += cmd-_chain_mod-loader_efi_chainloader.lst
+FSFILES += fs-_chain_mod-loader_efi_chainloader.lst
+PARTMAPFILES += partmap-_chain_mod-loader_efi_chainloader.lst
+
+cmd-_chain_mod-loader_efi_chainloader.lst: loader/efi/chainloader.c 
$(loader/efi/chainloader.c_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -Iloader/efi -I$(srcdir)/loader/efi 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_chain_mod_CFLAGS) -E $<         | sh 
$(srcdir)/gencmdlist.sh _chain > $@ || (rm -f $@; exit 1)
+
+fs-_chain_mod-loader_efi_chainloader.lst: loader/efi/chainloader.c 
$(loader/efi/chainloader.c_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -Iloader/efi -I$(srcdir)/loader/efi 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_chain_mod_CFLAGS) -E $<         | sh 
$(srcdir)/genfslist.sh _chain > $@ || (rm -f $@; exit 1)
+
+partmap-_chain_mod-loader_efi_chainloader.lst: loader/efi/chainloader.c 
$(loader/efi/chainloader.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Iloader/efi -I$(srcdir)/loader/efi 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_chain_mod_CFLAGS) -E $<         | sh 
$(srcdir)/genpartmaplist.sh _chain > $@ || (rm -f $@; exit 1)
+
+
+_chain_mod_CFLAGS = $(COMMON_CFLAGS)
+_chain_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
+# For chain.mod.
+chain_mod_SOURCES = loader/efi/chainloader_normal.c
+CLEANFILES += chain.mod mod-chain.o mod-chain.c pre-chain.o 
chain_mod-loader_efi_chainloader_normal.o und-chain.lst
+ifneq ($(chain_mod_EXPORTS),no)
+CLEANFILES += def-chain.lst
+DEFSYMFILES += def-chain.lst
+endif
+MOSTLYCLEANFILES += chain_mod-loader_efi_chainloader_normal.d
+UNDSYMFILES += und-chain.lst
+
+chain.mod: pre-chain.o mod-chain.o
+       -rm -f $@
+       $(TARGET_CC) $(chain_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) 
-Wl,-r,-d -o $@ $^
+       $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R 
.comment $@
+
+pre-chain.o: $(chain_mod_DEPENDENCIES) 
chain_mod-loader_efi_chainloader_normal.o
+       -rm -f $@
+       $(TARGET_CC) $(chain_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ 
chain_mod-loader_efi_chainloader_normal.o
+
+mod-chain.o: mod-chain.c
+       $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(chain_mod_CFLAGS) -c 
-o $@ $<
+
+mod-chain.c: moddep.lst genmodsrc.sh
+       sh $(srcdir)/genmodsrc.sh 'chain' $< > $@ || (rm -f $@; exit 1)
+
+ifneq ($(chain_mod_EXPORTS),no)
+def-chain.lst: pre-chain.o
+       $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 chain/' > $@
+endif
+
+und-chain.lst: pre-chain.o
+       echo 'chain' > $@
+       $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
+
+chain_mod-loader_efi_chainloader_normal.o: loader/efi/chainloader_normal.c 
$(loader/efi/chainloader_normal.c_DEPENDENCIES)
+       $(TARGET_CC) -Iloader/efi -I$(srcdir)/loader/efi $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(chain_mod_CFLAGS) -MD -c -o $@ $<
+-include chain_mod-loader_efi_chainloader_normal.d
+
+CLEANFILES += cmd-chain_mod-loader_efi_chainloader_normal.lst 
fs-chain_mod-loader_efi_chainloader_normal.lst 
partmap-chain_mod-loader_efi_chainloader_normal.lst
+COMMANDFILES += cmd-chain_mod-loader_efi_chainloader_normal.lst
+FSFILES += fs-chain_mod-loader_efi_chainloader_normal.lst
+PARTMAPFILES += partmap-chain_mod-loader_efi_chainloader_normal.lst
+
+cmd-chain_mod-loader_efi_chainloader_normal.lst: 
loader/efi/chainloader_normal.c $(loader/efi/chainloader_normal.c_DEPENDENCIES) 
gencmdlist.sh
+       set -e;           $(TARGET_CC) -Iloader/efi -I$(srcdir)/loader/efi 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(chain_mod_CFLAGS) -E $<          | sh 
$(srcdir)/gencmdlist.sh chain > $@ || (rm -f $@; exit 1)
+
+fs-chain_mod-loader_efi_chainloader_normal.lst: 
loader/efi/chainloader_normal.c $(loader/efi/chainloader_normal.c_DEPENDENCIES) 
genfslist.sh
+       set -e;           $(TARGET_CC) -Iloader/efi -I$(srcdir)/loader/efi 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(chain_mod_CFLAGS) -E $<          | sh 
$(srcdir)/genfslist.sh chain > $@ || (rm -f $@; exit 1)
+
+partmap-chain_mod-loader_efi_chainloader_normal.lst: 
loader/efi/chainloader_normal.c $(loader/efi/chainloader_normal.c_DEPENDENCIES) 
genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Iloader/efi -I$(srcdir)/loader/efi 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(chain_mod_CFLAGS) -E $<          | sh 
$(srcdir)/genpartmaplist.sh chain > $@ || (rm -f $@; exit 1)
+
+
+chain_mod_CFLAGS = $(COMMON_CFLAGS)
+chain_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
+# For appleldr.mod.
+appleldr_mod_SOURCES = loader/efi/appleloader.c
+CLEANFILES += appleldr.mod mod-appleldr.o mod-appleldr.c pre-appleldr.o 
appleldr_mod-loader_efi_appleloader.o und-appleldr.lst
+ifneq ($(appleldr_mod_EXPORTS),no)
+CLEANFILES += def-appleldr.lst
+DEFSYMFILES += def-appleldr.lst
+endif
+MOSTLYCLEANFILES += appleldr_mod-loader_efi_appleloader.d
+UNDSYMFILES += und-appleldr.lst
+
+appleldr.mod: pre-appleldr.o mod-appleldr.o
+       -rm -f $@
+       $(TARGET_CC) $(appleldr_mod_LDFLAGS) $(TARGET_LDFLAGS) 
$(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
+       $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R 
.comment $@
+
+pre-appleldr.o: $(appleldr_mod_DEPENDENCIES) 
appleldr_mod-loader_efi_appleloader.o
+       -rm -f $@
+       $(TARGET_CC) $(appleldr_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ 
appleldr_mod-loader_efi_appleloader.o
+
+mod-appleldr.o: mod-appleldr.c
+       $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(appleldr_mod_CFLAGS) 
-c -o $@ $<
+
+mod-appleldr.c: moddep.lst genmodsrc.sh
+       sh $(srcdir)/genmodsrc.sh 'appleldr' $< > $@ || (rm -f $@; exit 1)
+
+ifneq ($(appleldr_mod_EXPORTS),no)
+def-appleldr.lst: pre-appleldr.o
+       $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 appleldr/' > 
$@
+endif
+
+und-appleldr.lst: pre-appleldr.o
+       echo 'appleldr' > $@
+       $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
+
+appleldr_mod-loader_efi_appleloader.o: loader/efi/appleloader.c 
$(loader/efi/appleloader.c_DEPENDENCIES)
+       $(TARGET_CC) -Iloader/efi -I$(srcdir)/loader/efi $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(appleldr_mod_CFLAGS) -MD -c -o $@ $<
+-include appleldr_mod-loader_efi_appleloader.d
+
+CLEANFILES += cmd-appleldr_mod-loader_efi_appleloader.lst 
fs-appleldr_mod-loader_efi_appleloader.lst 
partmap-appleldr_mod-loader_efi_appleloader.lst
+COMMANDFILES += cmd-appleldr_mod-loader_efi_appleloader.lst
+FSFILES += fs-appleldr_mod-loader_efi_appleloader.lst
+PARTMAPFILES += partmap-appleldr_mod-loader_efi_appleloader.lst
+
+cmd-appleldr_mod-loader_efi_appleloader.lst: loader/efi/appleloader.c 
$(loader/efi/appleloader.c_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -Iloader/efi -I$(srcdir)/loader/efi 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(appleldr_mod_CFLAGS) -E $<       | sh 
$(srcdir)/gencmdlist.sh appleldr > $@ || (rm -f $@; exit 1)
+
+fs-appleldr_mod-loader_efi_appleloader.lst: loader/efi/appleloader.c 
$(loader/efi/appleloader.c_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -Iloader/efi -I$(srcdir)/loader/efi 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(appleldr_mod_CFLAGS) -E $<       | sh 
$(srcdir)/genfslist.sh appleldr > $@ || (rm -f $@; exit 1)
+
+partmap-appleldr_mod-loader_efi_appleloader.lst: loader/efi/appleloader.c 
$(loader/efi/appleloader.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Iloader/efi -I$(srcdir)/loader/efi 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(appleldr_mod_CFLAGS) -E $<       | sh 
$(srcdir)/genpartmaplist.sh appleldr > $@ || (rm -f $@; exit 1)
+
+
+appleldr_mod_CFLAGS = $(COMMON_CFLAGS)
+appleldr_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
+# For _linux.mod.
+_linux_mod_SOURCES = loader/i386/efi/linux.c
+CLEANFILES += _linux.mod mod-_linux.o mod-_linux.c pre-_linux.o 
_linux_mod-loader_i386_efi_linux.o und-_linux.lst
+ifneq ($(_linux_mod_EXPORTS),no)
+CLEANFILES += def-_linux.lst
+DEFSYMFILES += def-_linux.lst
+endif
+MOSTLYCLEANFILES += _linux_mod-loader_i386_efi_linux.d
+UNDSYMFILES += und-_linux.lst
+
+_linux.mod: pre-_linux.o mod-_linux.o
+       -rm -f $@
+       $(TARGET_CC) $(_linux_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) 
-Wl,-r,-d -o $@ $^
+       $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R 
.comment $@
+
+pre-_linux.o: $(_linux_mod_DEPENDENCIES) _linux_mod-loader_i386_efi_linux.o
+       -rm -f $@
+       $(TARGET_CC) $(_linux_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ 
_linux_mod-loader_i386_efi_linux.o
+
+mod-_linux.o: mod-_linux.c
+       $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(_linux_mod_CFLAGS) 
-c -o $@ $<
+
+mod-_linux.c: moddep.lst genmodsrc.sh
+       sh $(srcdir)/genmodsrc.sh '_linux' $< > $@ || (rm -f $@; exit 1)
+
+ifneq ($(_linux_mod_EXPORTS),no)
+def-_linux.lst: pre-_linux.o
+       $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 _linux/' > $@
+endif
+
+und-_linux.lst: pre-_linux.o
+       echo '_linux' > $@
+       $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
+
+_linux_mod-loader_i386_efi_linux.o: loader/i386/efi/linux.c 
$(loader/i386/efi/linux.c_DEPENDENCIES)
+       $(TARGET_CC) -Iloader/i386/efi -I$(srcdir)/loader/i386/efi 
$(TARGET_CPPFLAGS)  $(TARGET_CFLAGS) $(_linux_mod_CFLAGS) -MD -c -o $@ $<
+-include _linux_mod-loader_i386_efi_linux.d
+
+CLEANFILES += cmd-_linux_mod-loader_i386_efi_linux.lst 
fs-_linux_mod-loader_i386_efi_linux.lst 
partmap-_linux_mod-loader_i386_efi_linux.lst
+COMMANDFILES += cmd-_linux_mod-loader_i386_efi_linux.lst
+FSFILES += fs-_linux_mod-loader_i386_efi_linux.lst
+PARTMAPFILES += partmap-_linux_mod-loader_i386_efi_linux.lst
+
+cmd-_linux_mod-loader_i386_efi_linux.lst: loader/i386/efi/linux.c 
$(loader/i386/efi/linux.c_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -Iloader/i386/efi 
-I$(srcdir)/loader/i386/efi $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) 
$(_linux_mod_CFLAGS) -E $<       | sh $(srcdir)/gencmdlist.sh _linux > $@ || 
(rm -f $@; exit 1)
+
+fs-_linux_mod-loader_i386_efi_linux.lst: loader/i386/efi/linux.c 
$(loader/i386/efi/linux.c_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -Iloader/i386/efi 
-I$(srcdir)/loader/i386/efi $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) 
$(_linux_mod_CFLAGS) -E $<       | sh $(srcdir)/genfslist.sh _linux > $@ || (rm 
-f $@; exit 1)
+
+partmap-_linux_mod-loader_i386_efi_linux.lst: loader/i386/efi/linux.c 
$(loader/i386/efi/linux.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Iloader/i386/efi 
-I$(srcdir)/loader/i386/efi $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) 
$(_linux_mod_CFLAGS) -E $<       | sh $(srcdir)/genpartmaplist.sh _linux > $@ 
|| (rm -f $@; exit 1)
+
+
+_linux_mod_CFLAGS = $(COMMON_CFLAGS)
+_linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
+# For linux.mod.
+linux_mod_SOURCES = loader/i386/efi/linux_normal.c
+CLEANFILES += linux.mod mod-linux.o mod-linux.c pre-linux.o 
linux_mod-loader_i386_efi_linux_normal.o und-linux.lst
+ifneq ($(linux_mod_EXPORTS),no)
+CLEANFILES += def-linux.lst
+DEFSYMFILES += def-linux.lst
+endif
+MOSTLYCLEANFILES += linux_mod-loader_i386_efi_linux_normal.d
+UNDSYMFILES += und-linux.lst
+
+linux.mod: pre-linux.o mod-linux.o
+       -rm -f $@
+       $(TARGET_CC) $(linux_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) 
-Wl,-r,-d -o $@ $^
+       $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R 
.comment $@
+
+pre-linux.o: $(linux_mod_DEPENDENCIES) linux_mod-loader_i386_efi_linux_normal.o
+       -rm -f $@
+       $(TARGET_CC) $(linux_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ 
linux_mod-loader_i386_efi_linux_normal.o
+
+mod-linux.o: mod-linux.c
+       $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(linux_mod_CFLAGS) -c 
-o $@ $<
+
+mod-linux.c: moddep.lst genmodsrc.sh
+       sh $(srcdir)/genmodsrc.sh 'linux' $< > $@ || (rm -f $@; exit 1)
+
+ifneq ($(linux_mod_EXPORTS),no)
+def-linux.lst: pre-linux.o
+       $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 linux/' > $@
+endif
+
+und-linux.lst: pre-linux.o
+       echo 'linux' > $@
+       $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
+
+linux_mod-loader_i386_efi_linux_normal.o: loader/i386/efi/linux_normal.c 
$(loader/i386/efi/linux_normal.c_DEPENDENCIES)
+       $(TARGET_CC) -Iloader/i386/efi -I$(srcdir)/loader/i386/efi 
$(TARGET_CPPFLAGS)  $(TARGET_CFLAGS) $(linux_mod_CFLAGS) -MD -c -o $@ $<
+-include linux_mod-loader_i386_efi_linux_normal.d
+
+CLEANFILES += cmd-linux_mod-loader_i386_efi_linux_normal.lst 
fs-linux_mod-loader_i386_efi_linux_normal.lst 
partmap-linux_mod-loader_i386_efi_linux_normal.lst
+COMMANDFILES += cmd-linux_mod-loader_i386_efi_linux_normal.lst
+FSFILES += fs-linux_mod-loader_i386_efi_linux_normal.lst
+PARTMAPFILES += partmap-linux_mod-loader_i386_efi_linux_normal.lst
+
+cmd-linux_mod-loader_i386_efi_linux_normal.lst: loader/i386/efi/linux_normal.c 
$(loader/i386/efi/linux_normal.c_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -Iloader/i386/efi 
-I$(srcdir)/loader/i386/efi $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) 
$(linux_mod_CFLAGS) -E $<        | sh $(srcdir)/gencmdlist.sh linux > $@ || (rm 
-f $@; exit 1)
+
+fs-linux_mod-loader_i386_efi_linux_normal.lst: loader/i386/efi/linux_normal.c 
$(loader/i386/efi/linux_normal.c_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -Iloader/i386/efi 
-I$(srcdir)/loader/i386/efi $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) 
$(linux_mod_CFLAGS) -E $<        | sh $(srcdir)/genfslist.sh linux > $@ || (rm 
-f $@; exit 1)
+
+partmap-linux_mod-loader_i386_efi_linux_normal.lst: 
loader/i386/efi/linux_normal.c $(loader/i386/efi/linux_normal.c_DEPENDENCIES) 
genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Iloader/i386/efi 
-I$(srcdir)/loader/i386/efi $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) 
$(linux_mod_CFLAGS) -E $<        | sh $(srcdir)/genpartmaplist.sh linux > $@ || 
(rm -f $@; exit 1)
+
+
+linux_mod_CFLAGS = $(COMMON_CFLAGS)
+linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
+# For cpuid.mod.
+cpuid_mod_SOURCES = commands/i386/cpuid.c
+CLEANFILES += cpuid.mod mod-cpuid.o mod-cpuid.c pre-cpuid.o 
cpuid_mod-commands_i386_cpuid.o und-cpuid.lst
+ifneq ($(cpuid_mod_EXPORTS),no)
+CLEANFILES += def-cpuid.lst
+DEFSYMFILES += def-cpuid.lst
+endif
+MOSTLYCLEANFILES += cpuid_mod-commands_i386_cpuid.d
+UNDSYMFILES += und-cpuid.lst
+
+cpuid.mod: pre-cpuid.o mod-cpuid.o
+       -rm -f $@
+       $(TARGET_CC) $(cpuid_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) 
-Wl,-r,-d -o $@ $^
+       $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R 
.comment $@
+
+pre-cpuid.o: $(cpuid_mod_DEPENDENCIES) cpuid_mod-commands_i386_cpuid.o
+       -rm -f $@
+       $(TARGET_CC) $(cpuid_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ 
cpuid_mod-commands_i386_cpuid.o
+
+mod-cpuid.o: mod-cpuid.c
+       $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(cpuid_mod_CFLAGS) -c 
-o $@ $<
+
+mod-cpuid.c: moddep.lst genmodsrc.sh
+       sh $(srcdir)/genmodsrc.sh 'cpuid' $< > $@ || (rm -f $@; exit 1)
+
+ifneq ($(cpuid_mod_EXPORTS),no)
+def-cpuid.lst: pre-cpuid.o
+       $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 cpuid/' > $@
+endif
+
+und-cpuid.lst: pre-cpuid.o
+       echo 'cpuid' > $@
+       $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
+
+cpuid_mod-commands_i386_cpuid.o: commands/i386/cpuid.c 
$(commands/i386/cpuid.c_DEPENDENCIES)
+       $(TARGET_CC) -Icommands/i386 -I$(srcdir)/commands/i386 
$(TARGET_CPPFLAGS)  $(TARGET_CFLAGS) $(cpuid_mod_CFLAGS) -MD -c -o $@ $<
+-include cpuid_mod-commands_i386_cpuid.d
+
+CLEANFILES += cmd-cpuid_mod-commands_i386_cpuid.lst 
fs-cpuid_mod-commands_i386_cpuid.lst partmap-cpuid_mod-commands_i386_cpuid.lst
+COMMANDFILES += cmd-cpuid_mod-commands_i386_cpuid.lst
+FSFILES += fs-cpuid_mod-commands_i386_cpuid.lst
+PARTMAPFILES += partmap-cpuid_mod-commands_i386_cpuid.lst
+
+cmd-cpuid_mod-commands_i386_cpuid.lst: commands/i386/cpuid.c 
$(commands/i386/cpuid.c_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -Icommands/i386 
-I$(srcdir)/commands/i386 $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) 
$(cpuid_mod_CFLAGS) -E $<    | sh $(srcdir)/gencmdlist.sh cpuid > $@ || (rm -f 
$@; exit 1)
+
+fs-cpuid_mod-commands_i386_cpuid.lst: commands/i386/cpuid.c 
$(commands/i386/cpuid.c_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -Icommands/i386 
-I$(srcdir)/commands/i386 $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) 
$(cpuid_mod_CFLAGS) -E $<    | sh $(srcdir)/genfslist.sh cpuid > $@ || (rm -f 
$@; exit 1)
+
+partmap-cpuid_mod-commands_i386_cpuid.lst: commands/i386/cpuid.c 
$(commands/i386/cpuid.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Icommands/i386 
-I$(srcdir)/commands/i386 $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) 
$(cpuid_mod_CFLAGS) -E $<    | sh $(srcdir)/genpartmaplist.sh cpuid > $@ || (rm 
-f $@; exit 1)
+
+
+cpuid_mod_CFLAGS = $(COMMON_CFLAGS)
+cpuid_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
+# For halt.mod.
+halt_mod_SOURCES = commands/halt.c
+CLEANFILES += halt.mod mod-halt.o mod-halt.c pre-halt.o 
halt_mod-commands_halt.o und-halt.lst
+ifneq ($(halt_mod_EXPORTS),no)
+CLEANFILES += def-halt.lst
+DEFSYMFILES += def-halt.lst
+endif
+MOSTLYCLEANFILES += halt_mod-commands_halt.d
+UNDSYMFILES += und-halt.lst
+
+halt.mod: pre-halt.o mod-halt.o
+       -rm -f $@
+       $(TARGET_CC) $(halt_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) 
-Wl,-r,-d -o $@ $^
+       $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R 
.comment $@
+
+pre-halt.o: $(halt_mod_DEPENDENCIES) halt_mod-commands_halt.o
+       -rm -f $@
+       $(TARGET_CC) $(halt_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ 
halt_mod-commands_halt.o
+
+mod-halt.o: mod-halt.c
+       $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(halt_mod_CFLAGS) -c 
-o $@ $<
+
+mod-halt.c: moddep.lst genmodsrc.sh
+       sh $(srcdir)/genmodsrc.sh 'halt' $< > $@ || (rm -f $@; exit 1)
+
+ifneq ($(halt_mod_EXPORTS),no)
+def-halt.lst: pre-halt.o
+       $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 halt/' > $@
+endif
+
+und-halt.lst: pre-halt.o
+       echo 'halt' > $@
+       $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
+
+halt_mod-commands_halt.o: commands/halt.c $(commands/halt.c_DEPENDENCIES)
+       $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(halt_mod_CFLAGS) -MD -c -o $@ $<
+-include halt_mod-commands_halt.d
+
+CLEANFILES += cmd-halt_mod-commands_halt.lst fs-halt_mod-commands_halt.lst 
partmap-halt_mod-commands_halt.lst
+COMMANDFILES += cmd-halt_mod-commands_halt.lst
+FSFILES += fs-halt_mod-commands_halt.lst
+PARTMAPFILES += partmap-halt_mod-commands_halt.lst
+
+cmd-halt_mod-commands_halt.lst: commands/halt.c 
$(commands/halt.c_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -Icommands -I$(srcdir)/commands 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(halt_mod_CFLAGS) -E $<       | sh 
$(srcdir)/gencmdlist.sh halt > $@ || (rm -f $@; exit 1)
+
+fs-halt_mod-commands_halt.lst: commands/halt.c $(commands/halt.c_DEPENDENCIES) 
genfslist.sh
+       set -e;           $(TARGET_CC) -Icommands -I$(srcdir)/commands 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(halt_mod_CFLAGS) -E $<       | sh 
$(srcdir)/genfslist.sh halt > $@ || (rm -f $@; exit 1)
+
+partmap-halt_mod-commands_halt.lst: commands/halt.c 
$(commands/halt.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Icommands -I$(srcdir)/commands 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(halt_mod_CFLAGS) -E $<       | sh 
$(srcdir)/genpartmaplist.sh halt > $@ || (rm -f $@; exit 1)
+
+
+halt_mod_CFLAGS = $(COMMON_CFLAGS)
+halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
+# For reboot.mod.
+reboot_mod_SOURCES = commands/reboot.c
+CLEANFILES += reboot.mod mod-reboot.o mod-reboot.c pre-reboot.o 
reboot_mod-commands_reboot.o und-reboot.lst
+ifneq ($(reboot_mod_EXPORTS),no)
+CLEANFILES += def-reboot.lst
+DEFSYMFILES += def-reboot.lst
+endif
+MOSTLYCLEANFILES += reboot_mod-commands_reboot.d
+UNDSYMFILES += und-reboot.lst
+
+reboot.mod: pre-reboot.o mod-reboot.o
+       -rm -f $@
+       $(TARGET_CC) $(reboot_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) 
-Wl,-r,-d -o $@ $^
+       $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R 
.comment $@
+
+pre-reboot.o: $(reboot_mod_DEPENDENCIES) reboot_mod-commands_reboot.o
+       -rm -f $@
+       $(TARGET_CC) $(reboot_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ 
reboot_mod-commands_reboot.o
+
+mod-reboot.o: mod-reboot.c
+       $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(reboot_mod_CFLAGS) 
-c -o $@ $<
+
+mod-reboot.c: moddep.lst genmodsrc.sh
+       sh $(srcdir)/genmodsrc.sh 'reboot' $< > $@ || (rm -f $@; exit 1)
+
+ifneq ($(reboot_mod_EXPORTS),no)
+def-reboot.lst: pre-reboot.o
+       $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 reboot/' > $@
+endif
+
+und-reboot.lst: pre-reboot.o
+       echo 'reboot' > $@
+       $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
+
+reboot_mod-commands_reboot.o: commands/reboot.c 
$(commands/reboot.c_DEPENDENCIES)
+       $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(reboot_mod_CFLAGS) -MD -c -o $@ $<
+-include reboot_mod-commands_reboot.d
+
+CLEANFILES += cmd-reboot_mod-commands_reboot.lst 
fs-reboot_mod-commands_reboot.lst partmap-reboot_mod-commands_reboot.lst
+COMMANDFILES += cmd-reboot_mod-commands_reboot.lst
+FSFILES += fs-reboot_mod-commands_reboot.lst
+PARTMAPFILES += partmap-reboot_mod-commands_reboot.lst
+
+cmd-reboot_mod-commands_reboot.lst: commands/reboot.c 
$(commands/reboot.c_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -Icommands -I$(srcdir)/commands 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(reboot_mod_CFLAGS) -E $<     | sh 
$(srcdir)/gencmdlist.sh reboot > $@ || (rm -f $@; exit 1)
+
+fs-reboot_mod-commands_reboot.lst: commands/reboot.c 
$(commands/reboot.c_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -Icommands -I$(srcdir)/commands 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(reboot_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genfslist.sh reboot > $@ || (rm -f $@; exit 1)
+
+partmap-reboot_mod-commands_reboot.lst: commands/reboot.c 
$(commands/reboot.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Icommands -I$(srcdir)/commands 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(reboot_mod_CFLAGS) -E $<     | sh 
$(srcdir)/genpartmaplist.sh reboot > $@ || (rm -f $@; exit 1)
+
+
+reboot_mod_CFLAGS = $(COMMON_CFLAGS)
+reboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
+# For pci.mod
+pci_mod_SOURCES = bus/pci.c
+CLEANFILES += pci.mod mod-pci.o mod-pci.c pre-pci.o pci_mod-bus_pci.o 
und-pci.lst
+ifneq ($(pci_mod_EXPORTS),no)
+CLEANFILES += def-pci.lst
+DEFSYMFILES += def-pci.lst
+endif
+MOSTLYCLEANFILES += pci_mod-bus_pci.d
+UNDSYMFILES += und-pci.lst
+
+pci.mod: pre-pci.o mod-pci.o
+       -rm -f $@
+       $(TARGET_CC) $(pci_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) 
-Wl,-r,-d -o $@ $^
+       $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R 
.comment $@
+
+pre-pci.o: $(pci_mod_DEPENDENCIES) pci_mod-bus_pci.o
+       -rm -f $@
+       $(TARGET_CC) $(pci_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ 
pci_mod-bus_pci.o
+
+mod-pci.o: mod-pci.c
+       $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(pci_mod_CFLAGS) -c 
-o $@ $<
+
+mod-pci.c: moddep.lst genmodsrc.sh
+       sh $(srcdir)/genmodsrc.sh 'pci' $< > $@ || (rm -f $@; exit 1)
+
+ifneq ($(pci_mod_EXPORTS),no)
+def-pci.lst: pre-pci.o
+       $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 pci/' > $@
+endif
+
+und-pci.lst: pre-pci.o
+       echo 'pci' > $@
+       $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
+
+pci_mod-bus_pci.o: bus/pci.c $(bus/pci.c_DEPENDENCIES)
+       $(TARGET_CC) -Ibus -I$(srcdir)/bus $(TARGET_CPPFLAGS)  $(TARGET_CFLAGS) 
$(pci_mod_CFLAGS) -MD -c -o $@ $<
+-include pci_mod-bus_pci.d
+
+CLEANFILES += cmd-pci_mod-bus_pci.lst fs-pci_mod-bus_pci.lst 
partmap-pci_mod-bus_pci.lst
+COMMANDFILES += cmd-pci_mod-bus_pci.lst
+FSFILES += fs-pci_mod-bus_pci.lst
+PARTMAPFILES += partmap-pci_mod-bus_pci.lst
+
+cmd-pci_mod-bus_pci.lst: bus/pci.c $(bus/pci.c_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -Ibus -I$(srcdir)/bus $(TARGET_CPPFLAGS) 
$(TARGET_CFLAGS) $(pci_mod_CFLAGS) -E $<          | sh $(srcdir)/gencmdlist.sh 
pci > $@ || (rm -f $@; exit 1)
+
+fs-pci_mod-bus_pci.lst: bus/pci.c $(bus/pci.c_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -Ibus -I$(srcdir)/bus $(TARGET_CPPFLAGS) 
$(TARGET_CFLAGS) $(pci_mod_CFLAGS) -E $<          | sh $(srcdir)/genfslist.sh 
pci > $@ || (rm -f $@; exit 1)
+
+partmap-pci_mod-bus_pci.lst: bus/pci.c $(bus/pci.c_DEPENDENCIES) 
genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Ibus -I$(srcdir)/bus $(TARGET_CPPFLAGS) 
$(TARGET_CFLAGS) $(pci_mod_CFLAGS) -E $<          | sh 
$(srcdir)/genpartmaplist.sh pci > $@ || (rm -f $@; exit 1)
+
+
+pci_mod_CFLAGS = $(COMMON_CFLAGS)
+pci_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
+# For lspci.mod
+lspci_mod_SOURCES = commands/lspci.c
+CLEANFILES += lspci.mod mod-lspci.o mod-lspci.c pre-lspci.o 
lspci_mod-commands_lspci.o und-lspci.lst
+ifneq ($(lspci_mod_EXPORTS),no)
+CLEANFILES += def-lspci.lst
+DEFSYMFILES += def-lspci.lst
+endif
+MOSTLYCLEANFILES += lspci_mod-commands_lspci.d
+UNDSYMFILES += und-lspci.lst
+
+lspci.mod: pre-lspci.o mod-lspci.o
+       -rm -f $@
+       $(TARGET_CC) $(lspci_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) 
-Wl,-r,-d -o $@ $^
+       $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R 
.comment $@
+
+pre-lspci.o: $(lspci_mod_DEPENDENCIES) lspci_mod-commands_lspci.o
+       -rm -f $@
+       $(TARGET_CC) $(lspci_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ 
lspci_mod-commands_lspci.o
+
+mod-lspci.o: mod-lspci.c
+       $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lspci_mod_CFLAGS) -c 
-o $@ $<
+
+mod-lspci.c: moddep.lst genmodsrc.sh
+       sh $(srcdir)/genmodsrc.sh 'lspci' $< > $@ || (rm -f $@; exit 1)
+
+ifneq ($(lspci_mod_EXPORTS),no)
+def-lspci.lst: pre-lspci.o
+       $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 lspci/' > $@
+endif
+
+und-lspci.lst: pre-lspci.o
+       echo 'lspci' > $@
+       $(NM) -u -P -p $< | cut -f1 -d' ' >> $@
+
+lspci_mod-commands_lspci.o: commands/lspci.c $(commands/lspci.c_DEPENDENCIES)
+       $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS)  
$(TARGET_CFLAGS) $(lspci_mod_CFLAGS) -MD -c -o $@ $<
+-include lspci_mod-commands_lspci.d
+
+CLEANFILES += cmd-lspci_mod-commands_lspci.lst fs-lspci_mod-commands_lspci.lst 
partmap-lspci_mod-commands_lspci.lst
+COMMANDFILES += cmd-lspci_mod-commands_lspci.lst
+FSFILES += fs-lspci_mod-commands_lspci.lst
+PARTMAPFILES += partmap-lspci_mod-commands_lspci.lst
+
+cmd-lspci_mod-commands_lspci.lst: commands/lspci.c 
$(commands/lspci.c_DEPENDENCIES) gencmdlist.sh
+       set -e;           $(TARGET_CC) -Icommands -I$(srcdir)/commands 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lspci_mod_CFLAGS) -E $<      | sh 
$(srcdir)/gencmdlist.sh lspci > $@ || (rm -f $@; exit 1)
+
+fs-lspci_mod-commands_lspci.lst: commands/lspci.c 
$(commands/lspci.c_DEPENDENCIES) genfslist.sh
+       set -e;           $(TARGET_CC) -Icommands -I$(srcdir)/commands 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lspci_mod_CFLAGS) -E $<      | sh 
$(srcdir)/genfslist.sh lspci > $@ || (rm -f $@; exit 1)
+
+partmap-lspci_mod-commands_lspci.lst: commands/lspci.c 
$(commands/lspci.c_DEPENDENCIES) genpartmaplist.sh
+       set -e;           $(TARGET_CC) -Icommands -I$(srcdir)/commands 
$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lspci_mod_CFLAGS) -E $<      | sh 
$(srcdir)/genpartmaplist.sh lspci > $@ || (rm -f $@; exit 1)
+
+
+lspci_mod_CFLAGS = $(COMMON_CFLAGS)
+lspci_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
+include $(srcdir)/conf/common.mk

Copied: trunk/grub2/conf/x86_64-efi.rmk (from rev 1713, 
trunk/grub2/conf/i386-efi.rmk)
===================================================================
--- trunk/grub2/conf/x86_64-efi.rmk                             (rev 0)
+++ trunk/grub2/conf/x86_64-efi.rmk     2008-07-17 09:50:26 UTC (rev 1714)
@@ -0,0 +1,169 @@
+# -*- makefile -*-
+
+COMMON_ASFLAGS = -nostdinc -fno-builtin -m64
+COMMON_CFLAGS = -fno-builtin -m64
+COMMON_LDFLAGS = -melf_x86_64 -nostdlib
+
+# Used by various components.  These rules need to precede them.
+normal/execute.c_DEPENDENCIES = grub_script.tab.h
+normal/command.c_DEPENDENCIES = grub_script.tab.h
+normal/function.c_DEPENDENCIES = grub_script.tab.h
+normal/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
+
+# For grub-setup.
+#grub_setup_SOURCES = util/i386/pc/grub-setup.c util/biosdisk.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/misc.c         \
+       util/i386/get_disk_name.c
+
+# For grub-emu.
+util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
+grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c       \
+       commands/configfile.c commands/help.c                           \
+       commands/terminal.c commands/ls.c commands/test.c               \
+       commands/search.c commands/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                                      \
+       \
+       io/gzio.c                                                       \
+       kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c       \
+       kern/err.c                                                      \
+       normal/execute.c kern/file.c kern/fs.c normal/lexer.c           \
+       kern/loader.c kern/main.c kern/misc.c kern/parser.c             \
+       grub_script.tab.c kern/partition.c kern/rescue.c kern/term.c    \
+       normal/arg.c normal/cmdline.c normal/command.c normal/function.c\
+       normal/completion.c normal/context.c normal/main.c              \
+       normal/menu.c normal/menu_entry.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/biosdisk.c util/getroot.c                                  \
+       util/i386/pc/misc.c                                             \
+       \
+       disk/raid.c disk/lvm.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 normal.mod _chain.mod chain.mod appleldr.mod \
+       cpuid.mod halt.mod reboot.mod _linux.mod linux.mod pci.mod lspci.mod
+
+# For kernel.mod.
+kernel_mod_EXPORTS = no
+kernel_mod_SOURCES = kern/x86_64/efi/startup.S kern/x86_64/efi/callwrap.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/loader.c kern/rescue.c kern/term.c \
+       kern/x86_64/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
+kernel_mod_HEADERS = arg.h 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 rescue.h symbol.h term.h time.h types.h \
+       efi/efi.h efi/time.h efi/disk.h machine/loader.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 normal.mod.
+normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c    \
+       normal/completion.c normal/execute.c            \
+       normal/function.c normal/lexer.c normal/main.c normal/menu.c    \
+       normal/menu_entry.c normal/misc.c grub_script.tab.c             \
+       normal/script.c normal/x86_64/setjmp.S normal/color.c
+normal_mod_CFLAGS = $(COMMON_CFLAGS)
+normal_mod_ASFLAGS = $(COMMON_ASFLAGS)
+normal_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 chain.mod.
+chain_mod_SOURCES = loader/efi/chainloader_normal.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 linux.mod.
+linux_mod_SOURCES = loader/i386/efi/linux_normal.c
+linux_mod_CFLAGS = $(COMMON_CFLAGS)
+linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
+# For cpuid.mod.
+cpuid_mod_SOURCES = commands/i386/cpuid.c
+cpuid_mod_CFLAGS = $(COMMON_CFLAGS)
+cpuid_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)
+
+include $(srcdir)/conf/common.mk

Modified: trunk/grub2/configure
===================================================================
--- trunk/grub2/configure       2008-07-16 07:06:11 UTC (rev 1713)
+++ trunk/grub2/configure       2008-07-17 09:50:26 UTC (rev 1714)
@@ -1930,13 +1930,6 @@
 
 case "$target_cpu" in
   i[3456]86) target_cpu=i386 ;;
-  x86_64) target_cpu=i386 target_m32=1 ;;
-  powerpc) ;;
-  powerpc64) target_cpu=powerpc target_m32=1;;
-  sparc64) ;;
-  *) { { echo "$as_me:$LINENO: error: unsupported CPU type" >&5
-echo "$as_me: error: unsupported CPU type" >&2;}
-   { (exit 1); exit 1; }; } ;;
 esac
 
 # Specify the platform (such as firmware).
@@ -1962,9 +1955,31 @@
   platform="$with_platform"
 fi
 
+if test "x$platform" = "xefi" ; then
+  case "$target_cpu" in
+    i386) ;;
+    x86_64) target_m64=1 ;;
+    *) { { echo "$as_me:$LINENO: error: unsupported CPU type for EFI" >&5
+echo "$as_me: error: unsupported CPU type for EFI" >&2;}
+   { (exit 1); exit 1; }; } ;;
+  esac
+else
+  case "$target_cpu" in
+    i386) ;;
+    x86_64) target_cpu=i386 target_m32=1 ;;
+    powerpc) ;;
+    powerpc64) target_cpu=powerpc target_m32=1;;
+    sparc64) ;;
+    *) { { echo "$as_me:$LINENO: error: unsupported CPU type" >&5
+echo "$as_me: error: unsupported CPU type" >&2;}
+   { (exit 1); exit 1; }; } ;;
+  esac
+fi
+
 # Sanity check.
 case "$target_cpu"-"$platform" in
   i386-efi) ;;
+  x86_64-efi) ;;
   i386-pc) ;;
   i386-linuxbios) ;;
   i386-ieee1275) ;;
@@ -6708,6 +6723,12 @@
   TARGET_LDFLAGS="$TARGET_LDFLAGS -m32"
 fi
 
+if test "x$target_m64" = x1; then
+  # Force 64-bit mode.
+  TARGET_CFLAGS="$TARGET_CFLAGS -m64"
+  TARGET_LDFLAGS="$TARGET_LDFLAGS -m64"
+fi
+
 #
 # Compiler features.
 #

Modified: trunk/grub2/configure.ac
===================================================================
--- trunk/grub2/configure.ac    2008-07-16 07:06:11 UTC (rev 1713)
+++ trunk/grub2/configure.ac    2008-07-17 09:50:26 UTC (rev 1714)
@@ -49,11 +49,6 @@
 
 case "$target_cpu" in
   i[[3456]]86) target_cpu=i386 ;;
-  x86_64) target_cpu=i386 target_m32=1 ;;
-  powerpc) ;;
-  powerpc64) target_cpu=powerpc target_m32=1;;
-  sparc64) ;;
-  *) AC_MSG_ERROR([unsupported CPU type]) ;;
 esac
 
 # Specify the platform (such as firmware).
@@ -74,9 +69,27 @@
   platform="$with_platform"
 fi
 
+if test "x$platform" = "xefi" ; then
+  case "$target_cpu" in
+    i386) ;;
+    x86_64) target_m64=1 ;;
+    *) AC_MSG_ERROR([unsupported CPU type for EFI]) ;;
+  esac
+else
+  case "$target_cpu" in
+    i386) ;;
+    x86_64) target_cpu=i386 target_m32=1 ;;
+    powerpc) ;;
+    powerpc64) target_cpu=powerpc target_m32=1;;
+    sparc64) ;;
+    *) AC_MSG_ERROR([unsupported CPU type]) ;;
+  esac
+fi
+
 # Sanity check.
 case "$target_cpu"-"$platform" in
   i386-efi) ;;
+  x86_64-efi) ;;
   i386-pc) ;;
   i386-linuxbios) ;;
   i386-ieee1275) ;;
@@ -247,6 +260,12 @@
   TARGET_LDFLAGS="$TARGET_LDFLAGS -m32"
 fi
 
+if test "x$target_m64" = x1; then
+  # Force 64-bit mode.
+  TARGET_CFLAGS="$TARGET_CFLAGS -m64"
+  TARGET_LDFLAGS="$TARGET_LDFLAGS -m64"
+fi
+
 #
 # Compiler features.
 #

Modified: trunk/grub2/disk/efi/efidisk.c
===================================================================
--- trunk/grub2/disk/efi/efidisk.c      2008-07-16 07:06:11 UTC (rev 1713)
+++ trunk/grub2/disk/efi/efidisk.c      2008-07-17 09:50:26 UTC (rev 1714)
@@ -574,7 +574,7 @@
                "reading 0x%x sectors at the sector 0x%llx from %s\n",
                size, sector, disk->name);
   
-  status = dio->read (dio, bio->media->media_id,
+  status = efi_call_5 (dio->read, dio, bio->media->media_id,
                      (grub_efi_uint64_t) sector << GRUB_DISK_SECTOR_BITS,
                      (grub_efi_uintn_t) size << GRUB_DISK_SECTOR_BITS,
                      buf);
@@ -602,7 +602,7 @@
                "writing 0x%x sectors at the sector 0x%llx to %s\n",
                size, sector, disk->name);
   
-  status = dio->write (dio, bio->media->media_id,
+  status = efi_call_5 (dio->write, dio, bio->media->media_id,
                       (grub_efi_uint64_t) sector << GRUB_DISK_SECTOR_BITS,
                       (grub_efi_uintn_t) size << GRUB_DISK_SECTOR_BITS,
                       (void *) buf);

Modified: trunk/grub2/include/grub/efi/api.h
===================================================================
--- trunk/grub2/include/grub/efi/api.h  2008-07-16 07:06:11 UTC (rev 1713)
+++ trunk/grub2/include/grub/efi/api.h  2008-07-17 09:50:26 UTC (rev 1714)
@@ -1095,4 +1095,42 @@
 };
 typedef struct grub_efi_block_io grub_efi_block_io_t;
 
+#if GRUB_TARGET_SIZEOF_VOID_P == 4
+
+#define efi_call_0(func)               func()
+#define efi_call_1(func, a)            func(a)
+#define efi_call_2(func, a, b)         func(a, b)
+#define efi_call_3(func, a, b, c)      func(a, b, c)
+#define efi_call_4(func, a, b, c, d)   func(a, b, c, d)
+#define efi_call_5(func, a, b, c, d, e)        func(a, b, c, d, e)
+#define efi_call_6(func, a, b, c, d, e, f) func(a, b, c, d, e, f)
+
+#else
+
+#define efi_call_0(func)               efi_wrap_0(func)
+#define efi_call_1(func, a)            efi_wrap_1(func, (grub_uint64_t) a)
+#define efi_call_2(func, a, b)         efi_wrap_2(func, (grub_uint64_t) a, 
(grub_uint64_t) b)
+#define efi_call_3(func, a, b, c)      efi_wrap_3(func, (grub_uint64_t) a, 
(grub_uint64_t) b, (grub_uint64_t) c)
+#define efi_call_4(func, a, b, c, d)   efi_wrap_4(func, (grub_uint64_t) a, 
(grub_uint64_t) b, (grub_uint64_t) c, (grub_uint64_t) d)
+#define efi_call_5(func, a, b, c, d, e)        efi_wrap_5(func, 
(grub_uint64_t) a, (grub_uint64_t) b, (grub_uint64_t) c, (grub_uint64_t) d, 
(grub_uint64_t) e)
+#define efi_call_6(func, a, b, c, d, e, f) efi_wrap_6(func, (grub_uint64_t) a, 
(grub_uint64_t) b, (grub_uint64_t) c, (grub_uint64_t) d, (grub_uint64_t) e, 
(grub_uint64_t) f)
+
+grub_uint64_t EXPORT_FUNC(efi_wrap_0) (void *func);
+grub_uint64_t EXPORT_FUNC(efi_wrap_1) (void *func, grub_uint64_t arg1);
+grub_uint64_t EXPORT_FUNC(efi_wrap_2) (void *func, grub_uint64_t arg1,
+                                       grub_uint64_t arg2);
+grub_uint64_t EXPORT_FUNC(efi_wrap_3) (void *func, grub_uint64_t arg1,
+                                       grub_uint64_t arg2, grub_uint64_t arg3);
+grub_uint64_t EXPORT_FUNC(efi_wrap_4) (void *func, grub_uint64_t arg1,
+                                       grub_uint64_t arg2, grub_uint64_t arg3,
+                                       grub_uint64_t arg4);
+grub_uint64_t EXPORT_FUNC(efi_wrap_5) (void *func, grub_uint64_t arg1,
+                                       grub_uint64_t arg2, grub_uint64_t arg3,
+                                       grub_uint64_t arg4, grub_uint64_t arg5);
+grub_uint64_t EXPORT_FUNC(efi_wrap_6) (void *func, grub_uint64_t arg1,
+                                       grub_uint64_t arg2, grub_uint64_t arg3,
+                                       grub_uint64_t arg4, grub_uint64_t arg5,
+                                       grub_uint64_t arg6);
+#endif
+
 #endif /* ! GRUB_EFI_API_HEADER */

Modified: trunk/grub2/include/grub/efi/chainloader.h
===================================================================
--- trunk/grub2/include/grub/efi/chainloader.h  2008-07-16 07:06:11 UTC (rev 
1713)
+++ trunk/grub2/include/grub/efi/chainloader.h  2008-07-17 09:50:26 UTC (rev 
1714)
@@ -19,6 +19,6 @@
 #ifndef GRUB_EFI_CHAINLOADER_HEADER
 #define GRUB_EFI_CHAINLOADER_HEADER    1
 
-void grub_chainloader_cmd (const char *filename);
+void grub_rescue_cmd_chainloader (int argc, char *argv[]);
 
 #endif /* ! GRUB_EFI_CHAINLOADER_HEADER */

Modified: trunk/grub2/include/grub/efi/pe32.h
===================================================================
--- trunk/grub2/include/grub/efi/pe32.h 2008-07-16 07:06:11 UTC (rev 1713)
+++ trunk/grub2/include/grub/efi/pe32.h 2008-07-17 09:50:26 UTC (rev 1714)
@@ -64,6 +64,7 @@
 };
 
 #define GRUB_PE32_MACHINE_I386         0x14c
+#define GRUB_PE32_MACHINE_X86_64       0x8664
 
 #define GRUB_PE32_RELOCS_STRIPPED              0x0001
 #define GRUB_PE32_EXECUTABLE_IMAGE             0x0002
@@ -98,9 +99,13 @@
   grub_uint32_t entry_addr;
   grub_uint32_t code_base;
   
+#if GRUB_TARGET_SIZEOF_VOID_P == 4
   grub_uint32_t data_base;
+  grub_uint32_t image_base;
+#else
+  grub_uint64_t image_base;
+#endif
 
-  grub_uint32_t image_base;
   grub_uint32_t section_alignment;
   grub_uint32_t file_alignment;
   grub_uint16_t major_os_version;
@@ -115,10 +120,23 @@
   grub_uint32_t checksum;
   grub_uint16_t subsystem;
   grub_uint16_t dll_characteristics;
+
+#if GRUB_TARGET_SIZEOF_VOID_P == 4
+
   grub_uint32_t stack_reserve_size;
   grub_uint32_t stack_commit_size;
   grub_uint32_t heap_reserve_size;
   grub_uint32_t heap_commit_size;
+
+#else
+
+  grub_uint64_t stack_reserve_size;
+  grub_uint64_t stack_commit_size;
+  grub_uint64_t heap_reserve_size;
+  grub_uint64_t heap_commit_size;
+
+#endif
+
   grub_uint32_t loader_flags;
   grub_uint32_t num_data_directories;
   
@@ -141,8 +159,16 @@
   struct grub_pe32_data_directory reserved_entry;
 };
 
+#if GRUB_TARGET_SIZEOF_VOID_P == 4
+
 #define GRUB_PE32_PE32_MAGIC   0x10b
 
+#else
+
+#define GRUB_PE32_PE32_MAGIC   0x20b
+
+#endif
+
 #define GRUB_PE32_SUBSYSTEM_EFI_APPLICATION    10
 
 #define GRUB_PE32_NUM_DATA_DIRECTORIES 16

Added: trunk/grub2/include/grub/efi/uga_draw.h
===================================================================
--- trunk/grub2/include/grub/efi/uga_draw.h                             (rev 0)
+++ trunk/grub2/include/grub/efi/uga_draw.h     2008-07-17 09:50:26 UTC (rev 
1714)
@@ -0,0 +1,76 @@
+/* uga_draw.h - definitions of the uga draw protocol */
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 2008  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/>.
+ */
+
+/* The console control protocol is not a part of the EFI spec,
+   but defined in Intel's Sample Implementation.  */
+
+#ifndef GRUB_EFI_UGA_DRAW_HEADER
+#define GRUB_EFI_UGA_DRAW_HEADER       1
+
+#define GRUB_EFI_UGA_DRAW_GUID \
+  { 0x982c298b, 0xf4fa, 0x41cb, { 0xb8, 0x38, 0x77, 0xaa, 0x68, 0x8f, 0xb8, 
0x39 }}
+
+enum grub_efi_uga_blt_operation
+{
+  GRUB_EFI_UGA_VIDEO_FILL,
+  GRUB_EFI_UGA_VIDEO_TO_BLT,
+  GRUB_EFI_UGA_BLT_TO_VIDEO,
+  GRUB_EFI_UGA_VIDEO_TO_VIDEO,
+  GRUB_EFI_UGA_GLT_MAX
+};
+
+struct grub_efi_uga_pixel
+{
+  grub_uint8_t Blue;
+  grub_uint8_t Green;
+  grub_uint8_t Red;
+  grub_uint8_t Reserved;
+};
+
+struct grub_efi_uga_draw_protocol
+{
+  grub_efi_status_t
+  (*get_mode) (struct grub_efi_uga_draw_protocol *this,
+              grub_uint32_t *width,
+              grub_uint32_t *height,
+              grub_uint32_t *depth,
+              grub_uint32_t *refresh_rate);
+
+  grub_efi_status_t
+  (*set_mode) (struct grub_efi_uga_draw_protocol *this,
+              grub_uint32_t width,
+              grub_uint32_t height,
+              grub_uint32_t depth,
+              grub_uint32_t refresh_rate);
+
+  grub_efi_status_t
+  (*blt) (struct grub_efi_uga_draw_protocol *this,
+         struct grub_efi_uga_pixel *blt_buffer,
+         enum grub_efi_uga_blt_operation blt_operation,
+         grub_efi_uintn_t src_x,
+         grub_efi_uintn_t src_y,
+         grub_efi_uintn_t dest_x,
+         grub_efi_uintn_t dest_y,
+         grub_efi_uintn_t width,
+         grub_efi_uintn_t height,
+         grub_efi_uintn_t delta);
+};
+typedef struct grub_efi_uga_draw_protocol grub_efi_uga_draw_protocol_t;
+
+#endif /* ! GRUB_EFI_UGA_DRAW_HEADER */

Modified: trunk/grub2/include/grub/elf.h
===================================================================
--- trunk/grub2/include/grub/elf.h      2008-07-16 07:06:11 UTC (rev 1713)
+++ trunk/grub2/include/grub/elf.h      2008-07-17 09:50:26 UTC (rev 1714)
@@ -454,6 +454,7 @@
    the end of a chain, meaning no further symbols are found in that bucket.  */
 
 #define STN_UNDEF      0               /* End of a chain.  */
+#define STN_ABS                65521
 
 
 /* How to extract and insert information held in the st_other field.  */
@@ -1108,8 +1109,27 @@
 /* Keep this the last entry.  */
 #define R_386_NUM         38
 
+
 /* SUN SPARC specific definitions.  */
 
+/* x86_64 specific definitions.  */
+#define R_X86_64_NONE          0
+#define R_X86_64_64            1
+#define R_X86_64_PC32          2
+#define R_X86_64_GOT32         3
+#define R_X86_64_PLT32         4
+#define R_X86_64_COPY          5
+#define R_X86_64_GLOB_DAT      6
+#define R_X86_64_JUMP_SLOT     7
+#define R_X86_64_RELATIVE      8
+#define R_X86_64_GOTPCREL      9
+#define R_X86_64_32            10
+#define R_X86_64_32S           11
+#define R_X86_64_16            12
+#define R_X86_64_PC16          13
+#define R_X86_64_8             14
+#define R_X86_64_PC8           15
+
 /* Legal values for ST_TYPE subfield of st_info (symbol type).  */
 
 #define STT_REGISTER   13              /* Global register reserved to app. */

Copied: trunk/grub2/include/grub/i386/efi/pci.h (from rev 1713, 
trunk/grub2/include/grub/efi/chainloader.h)
===================================================================
--- trunk/grub2/include/grub/i386/efi/pci.h                             (rev 0)
+++ trunk/grub2/include/grub/i386/efi/pci.h     2008-07-17 09:50:26 UTC (rev 
1714)
@@ -0,0 +1,19 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 2008  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/>.
+ */
+
+#include <grub/i386/pc/pci.h>

Modified: trunk/grub2/include/grub/i386/linux.h
===================================================================
--- trunk/grub2/include/grub/i386/linux.h       2008-07-16 07:06:11 UTC (rev 
1713)
+++ trunk/grub2/include/grub/i386/linux.h       2008-07-17 09:50:26 UTC (rev 
1714)
@@ -44,14 +44,44 @@
 #define GRUB_LINUX_SETUP_MOVE_SIZE     0x9100
 #define GRUB_LINUX_CL_MAGIC            0xA33F
 
+#ifdef __x86_64__
+
 #define GRUB_LINUX_EFI_SIGNATURE       \
-  ('E' << 24 | 'F' << 16 | 'I' << 8 | 'L')
+  ('4' << 24 | '6' << 16 | 'L' << 8 | 'E')
 
+#else
+
+#define GRUB_LINUX_EFI_SIGNATURE       \
+  ('2' << 24 | '3' << 16 | 'L' << 8 | 'E')
+
+#endif
+
+#define GRUB_LINUX_EFI_SIGNATURE_0204  \
+  ('L' << 24 | 'I' << 16 | 'F' << 8 | 'E')
+
 #define GRUB_LINUX_OFW_SIGNATURE       \
   (' ' << 24 | 'W' << 16 | 'F' << 8 | 'O')
 
 #ifndef ASM_FILE
 
+#define GRUB_E820_RAM        1
+#define GRUB_E820_RESERVED   2
+#define GRUB_E820_ACPI       3
+#define GRUB_E820_NVS        4
+#define GRUB_E820_EXEC_CODE  5
+
+#define GRUB_E820_MAX_ENTRY  128
+
+struct grub_e820_mmap
+{
+  grub_uint64_t addr;
+  grub_uint64_t size;
+  grub_uint32_t type;
+} __attribute__((packed));
+
+#define GRUB_VIDEO_TYPE_VLFB   0x23    /* VESA VGA in graphic mode     */
+#define GRUB_VIDEO_TYPE_EFI    0x70
+
 /* For the Linux/i386 boot protocol version 2.03.  */
 struct linux_kernel_header
 { 
@@ -164,26 +194,74 @@
   grub_uint32_t ofw_cif_handler;       /* b8 */
   grub_uint32_t ofw_idt;               /* bc */
 
-  grub_uint8_t padding7[0x1c0 - 0xc0];
+  grub_uint8_t padding7[0x1b8 - 0xc0];
+
+  union
+    {
+      struct
+        {
+          grub_uint32_t efi_system_table;      /* 1b8 */
+          grub_uint32_t padding7_1;            /* 1bc */
+          grub_uint32_t efi_signature;         /* 1c0 */
+          grub_uint32_t efi_mem_desc_size;     /* 1c4 */
+          grub_uint32_t efi_mem_desc_version;  /* 1c8 */
+          grub_uint32_t efi_mmap_size;         /* 1cc */
+          grub_uint32_t efi_mmap;              /* 1d0 */
+        } v0204;
+      struct
+        {
+          grub_uint32_t padding7_1;            /* 1b8 */
+          grub_uint32_t padding7_2;            /* 1bc */
+          grub_uint32_t efi_signature;         /* 1c0 */
+          grub_uint32_t efi_system_table;      /* 1c4 */
+          grub_uint32_t efi_mem_desc_size;     /* 1c8 */
+          grub_uint32_t efi_mem_desc_version;  /* 1cc */
+          grub_uint32_t efi_mmap;              /* 1d0 */
+          grub_uint32_t efi_mmap_size;         /* 1d4 */
+          grub_uint32_t efi_system_table_hi;   /* 1d8 */
+          grub_uint32_t efi_mmap_hi;           /* 1dc */
+        } v0206;
+    };
   
-  grub_uint32_t efi_signature;         /* 1c0 */
-  grub_uint32_t efi_system_table;      /* 1c4 */
-  grub_uint32_t efi_mem_desc_size;     /* 1c8 */
-  grub_uint32_t efi_mem_desc_version;  /* 1cc */
-  grub_uint32_t efi_mmap;              /* 1d0 */
-  grub_uint32_t efi_mmap_size;         /* 1d4 */
-  
-  grub_uint8_t padding8[0x1e0 - 0x1d8];
-  
   grub_uint32_t alt_mem;               /* 1e0 */
   
-  grub_uint8_t padding9[0x1e8 - 0x1e4];
+  grub_uint8_t padding8[0x1e8 - 0x1e4];
   
   grub_uint32_t mmap_size;             /* 1e8 */
 
-  grub_uint8_t padding10[0x1ff - 0x1ec];
+  grub_uint8_t padding9[0x1f1 - 0x1ec];
   
+  grub_uint8_t setup_sects;            /* The size of the setup in sectors */
+  grub_uint16_t root_flags;            /* If the root is mounted readonly */
+  grub_uint16_t syssize;               /* obsolete */
+  grub_uint16_t swap_dev;              /* obsolete */
+  grub_uint16_t ram_size;              /* obsolete */
+  grub_uint16_t vid_mode;              /* Video mode control */
+  grub_uint16_t root_dev;              /* Default root device number */
+
+  grub_uint8_t padding10;              /* 1fe */
   grub_uint8_t ps_mouse;               /* 1ff */
+
+  grub_uint16_t jump;                  /* Jump instruction */
+  grub_uint32_t header;                        /* Magic signature "HdrS" */
+  grub_uint16_t version;               /* Boot protocol version supported */
+  grub_uint32_t realmode_swtch;                /* Boot loader hook */
+  grub_uint16_t start_sys;             /* The load-low segment (obsolete) */
+  grub_uint16_t kernel_version;                /* Points to kernel version 
string */
+  grub_uint8_t type_of_loader;         /* Boot loader identifier */
+  grub_uint8_t loadflags;              /* Boot protocol option flags */
+  grub_uint16_t setup_move_size;       /* Move to high memory size */
+  grub_uint32_t code32_start;          /* Boot loader hook */
+  grub_uint32_t ramdisk_image;         /* initrd load address */
+  grub_uint32_t ramdisk_size;          /* initrd size */
+  grub_uint32_t bootsect_kludge;       /* obsolete */
+  grub_uint16_t heap_end_ptr;          /* Free memory after setup end */
+  grub_uint16_t pad1;                  /* Unused */
+  grub_uint32_t cmd_line_ptr;          /* Points to the kernel command line */
+
+  grub_uint8_t pad2[164];              /* 22c */
+  struct grub_e820_mmap e820_map[GRUB_E820_MAX_ENTRY]; /* 2d0 */
+
 } __attribute__ ((packed));
 #endif /* ! ASM_FILE */
 

Modified: trunk/grub2/include/grub/kernel.h
===================================================================
--- trunk/grub2/include/grub/kernel.h   2008-07-16 07:06:11 UTC (rev 1713)
+++ trunk/grub2/include/grub/kernel.h   2008-07-17 09:50:26 UTC (rev 1714)
@@ -38,6 +38,9 @@
 {
   /* Magic number so we know we have modules present.  */
   grub_uint32_t magic;
+#if GRUB_TARGET_SIZEOF_VOID_P == 8
+  grub_uint32_t padding;
+#endif
   /* The offset of the modules.  */
   grub_target_off_t offset;
   /* The size of all modules plus this header.  */

Modified: trunk/grub2/include/grub/pci.h
===================================================================
--- trunk/grub2/include/grub/pci.h      2008-07-16 07:06:11 UTC (rev 1713)
+++ trunk/grub2/include/grub/pci.h      2008-07-17 09:50:26 UTC (rev 1714)
@@ -22,6 +22,19 @@
 #include <grub/types.h>
 #include <grub/symbol.h>
 
+#define  GRUB_PCI_ADDR_SPACE_MASK      0x01
+#define  GRUB_PCI_ADDR_SPACE_MEMORY    0x00
+#define  GRUB_PCI_ADDR_SPACE_IO                0x01
+
+#define  GRUB_PCI_ADDR_MEM_TYPE_MASK   0x06
+#define  GRUB_PCI_ADDR_MEM_TYPE_32     0x00    /* 32 bit address */
+#define  GRUB_PCI_ADDR_MEM_TYPE_1M     0x02    /* Below 1M [obsolete] */
+#define  GRUB_PCI_ADDR_MEM_TYPE_64     0x04    /* 64 bit address */
+#define  GRUB_PCI_ADDR_MEM_PREFETCH    0x08    /* prefetchable */
+
+#define  GRUB_PCI_ADDR_MEM_MASK                ~0xf
+#define  GRUB_PCI_ADDR_IO_MASK         ~0x03
+
 typedef grub_uint32_t grub_pci_id_t;
 typedef int (*grub_pci_iteratefunc_t) (int bus, int device, int func,
                                       grub_pci_id_t pciid);

Copied: trunk/grub2/include/grub/x86_64/efi/kernel.h (from rev 1713, 
trunk/grub2/include/grub/efi/chainloader.h)
===================================================================
--- trunk/grub2/include/grub/x86_64/efi/kernel.h                                
(rev 0)
+++ trunk/grub2/include/grub/x86_64/efi/kernel.h        2008-07-17 09:50:26 UTC 
(rev 1714)
@@ -0,0 +1,33 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 2002,2003,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_MACHINE_KERNEL_HEADER
+#define GRUB_MACHINE_KERNEL_HEADER   1
+
+/* The prefix which points to the directory where GRUB modules and its
+   configuration file are located.  */
+extern char grub_prefix[];
+
+/* The offset of GRUB_PREFIX.  */
+#define GRUB_KERNEL_MACHINE_PREFIX             0x8
+
+/* End of the data section. */
+#define GRUB_KERNEL_MACHINE_DATA_END           0x50
+
+#endif /* ! GRUB_MACHINE_KERNEL_HEADER */
+

Copied: trunk/grub2/include/grub/x86_64/efi/loader.h (from rev 1713, 
trunk/grub2/include/grub/pci.h)
===================================================================
--- trunk/grub2/include/grub/x86_64/efi/loader.h                                
(rev 0)
+++ trunk/grub2/include/grub/x86_64/efi/loader.h        2008-07-17 09:50:26 UTC 
(rev 1714)
@@ -0,0 +1,32 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 2002,2003,2004,2006,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_LOADER_MACHINE_HEADER
+#define GRUB_LOADER_MACHINE_HEADER     1
+
+#include <grub/types.h>
+#include <grub/symbol.h>
+
+/* It is necessary to export these functions, because normal mode commands
+   reuse rescue mode commands.  */
+void grub_rescue_cmd_linux (int argc, char *argv[]);
+void grub_rescue_cmd_initrd (int argc, char *argv[]);
+
+void EXPORT_FUNC(grub_linux_real_boot) (void);
+
+#endif /* ! GRUB_LOADER_MACHINE_HEADER */

Copied: trunk/grub2/include/grub/x86_64/efi/machine.h (from rev 1713, 
trunk/grub2/include/grub/efi/chainloader.h)
===================================================================
--- trunk/grub2/include/grub/x86_64/efi/machine.h                               
(rev 0)
+++ trunk/grub2/include/grub/x86_64/efi/machine.h       2008-07-17 09:50:26 UTC 
(rev 1714)
@@ -0,0 +1,24 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 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_MACHINE_MACHINE_HEADER
+#define GRUB_MACHINE_MACHINE_HEADER    1
+
+#define GRUB_MACHINE_EFI       1
+
+#endif /* ! GRUB_MACHINE_MACHINE_HEADER */

Copied: trunk/grub2/include/grub/x86_64/efi/pci.h (from rev 1713, 
trunk/grub2/include/grub/efi/chainloader.h)
===================================================================
--- trunk/grub2/include/grub/x86_64/efi/pci.h                           (rev 0)
+++ trunk/grub2/include/grub/x86_64/efi/pci.h   2008-07-17 09:50:26 UTC (rev 
1714)
@@ -0,0 +1,19 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 2008  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/>.
+ */
+
+#include <grub/i386/pc/pci.h>

Copied: trunk/grub2/include/grub/x86_64/efi/time.h (from rev 1713, 
trunk/grub2/include/grub/efi/chainloader.h)
===================================================================
--- trunk/grub2/include/grub/x86_64/efi/time.h                          (rev 0)
+++ trunk/grub2/include/grub/x86_64/efi/time.h  2008-07-17 09:50:26 UTC (rev 
1714)
@@ -0,0 +1,24 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 2006,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_MACHINE_TIME_HEADER
+#define GRUB_MACHINE_TIME_HEADER       1
+
+#include <grub/efi/time.h>
+
+#endif /* ! GRUB_MACHINE_TIME_HEADER */

Copied: trunk/grub2/include/grub/x86_64/linux.h (from rev 1713, 
trunk/grub2/include/grub/efi/chainloader.h)
===================================================================
--- trunk/grub2/include/grub/x86_64/linux.h                             (rev 0)
+++ trunk/grub2/include/grub/x86_64/linux.h     2008-07-17 09:50:26 UTC (rev 
1714)
@@ -0,0 +1,19 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 2008  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/>.
+ */
+
+#include <grub/i386/linux.h>

Copied: trunk/grub2/include/grub/x86_64/setjmp.h (from rev 1713, 
trunk/grub2/include/grub/efi/chainloader.h)
===================================================================
--- trunk/grub2/include/grub/x86_64/setjmp.h                            (rev 0)
+++ trunk/grub2/include/grub/x86_64/setjmp.h    2008-07-17 09:50:26 UTC (rev 
1714)
@@ -0,0 +1,27 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 2003,2006,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_SETJMP_CPU_HEADER
+#define GRUB_SETJMP_CPU_HEADER 1
+
+typedef unsigned long grub_jmp_buf[8];
+
+int grub_setjmp (grub_jmp_buf env);
+void grub_longjmp (grub_jmp_buf env, int val) __attribute__ ((noreturn));
+
+#endif /* ! GRUB_SETJMP_CPU_HEADER */

Copied: trunk/grub2/include/grub/x86_64/time.h (from rev 1713, 
trunk/grub2/include/grub/efi/chainloader.h)
===================================================================
--- trunk/grub2/include/grub/x86_64/time.h                              (rev 0)
+++ trunk/grub2/include/grub/x86_64/time.h      2008-07-17 09:50:26 UTC (rev 
1714)
@@ -0,0 +1,29 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 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 KERNEL_CPU_TIME_HEADER
+#define KERNEL_CPU_TIME_HEADER 1
+
+static __inline void
+grub_cpu_idle (void)
+{
+  /* FIXME: this can't work until we handle interrupts.  */
+/*  __asm__ __volatile__ ("hlt"); */
+}
+
+#endif /* ! KERNEL_CPU_TIME_HEADER */

Copied: trunk/grub2/include/grub/x86_64/types.h (from rev 1713, 
trunk/grub2/include/grub/efi/chainloader.h)
===================================================================
--- trunk/grub2/include/grub/x86_64/types.h                             (rev 0)
+++ trunk/grub2/include/grub/x86_64/types.h     2008-07-17 09:50:26 UTC (rev 
1714)
@@ -0,0 +1,31 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 2008  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_TYPES_CPU_HEADER
+#define GRUB_TYPES_CPU_HEADER  1
+
+/* The size of void *.  */
+#define GRUB_TARGET_SIZEOF_VOID_P      8
+
+/* The size of long.  */
+#define GRUB_TARGET_SIZEOF_LONG                8
+
+/* x86_64 is little-endian.  */
+#undef GRUB_TARGET_WORDS_BIGENDIAN
+
+#endif /* ! GRUB_TYPES_CPU_HEADER */

Modified: trunk/grub2/kern/dl.c
===================================================================
--- trunk/grub2/kern/dl.c       2008-07-16 07:06:11 UTC (rev 1713)
+++ trunk/grub2/kern/dl.c       2008-07-17 09:50:26 UTC (rev 1714)
@@ -29,7 +29,7 @@
 #include <grub/env.h>
 #include <grub/cache.h>
 
-#if GRUB_CPU_SIZEOF_VOID_P == 4
+#if GRUB_TARGET_SIZEOF_VOID_P == 4
 
 typedef Elf32_Word Elf_Word;
 typedef Elf32_Addr Elf_Addr;
@@ -40,7 +40,7 @@
 # define ELF_ST_BIND(val)      ELF32_ST_BIND (val)
 # define ELF_ST_TYPE(val)      ELF32_ST_TYPE (val)
 
-#elif GRUB_CPU_SIZEOF_VOID_P == 8
+#elif GRUB_TARGET_SIZEOF_VOID_P == 8
 
 typedef Elf64_Word Elf_Word;
 typedef Elf64_Addr Elf_Addr;

Modified: trunk/grub2/kern/efi/efi.c
===================================================================
--- trunk/grub2/kern/efi/efi.c  2008-07-16 07:06:11 UTC (rev 1713)
+++ trunk/grub2/kern/efi/efi.c  2008-07-17 09:50:26 UTC (rev 1714)
@@ -43,9 +43,8 @@
   void *interface;
   grub_efi_status_t status;
   
-  status = grub_efi_system_table->boot_services->locate_protocol (protocol,
-                                                                 registration,
-                                                                 &interface);
+  status = efi_call_3 (grub_efi_system_table->boot_services->locate_protocol,
+                       protocol, registration, &interface);
   if (status != GRUB_EFI_SUCCESS)
     return 0;
   
@@ -71,7 +70,7 @@
     return 0;
   
   b = grub_efi_system_table->boot_services;
-  status = b->locate_handle (search_type, protocol, search_key,
+  status = efi_call_5 (b->locate_handle, search_type, protocol, search_key,
                             &buffer_size, buffer);
   if (status == GRUB_EFI_BUFFER_TOO_SMALL)
     {
@@ -80,7 +79,7 @@
       if (! buffer)
        return 0;
       
-      status = b->locate_handle (search_type, protocol, search_key,
+      status = efi_call_5 (b->locate_handle, search_type, protocol, search_key,
                                 &buffer_size, buffer);
     }
 
@@ -104,12 +103,12 @@
   void *interface;
   
   b = grub_efi_system_table->boot_services;
-  status = b->open_protocol (handle,
-                            protocol,
-                            &interface,
-                            grub_efi_image_handle,
-                            0,
-                            attributes);
+  status = efi_call_6 (b->open_protocol, handle,
+                      protocol,
+                      &interface,
+                      grub_efi_image_handle,
+                      0,
+                      attributes);
   if (status != GRUB_EFI_SUCCESS)
     return 0;
 
@@ -128,12 +127,12 @@
        already in text mode. */
     return 1;
   
-  if (c->get_mode (c, &mode, 0, 0) != GRUB_EFI_SUCCESS)
+  if (efi_call_4 (c->get_mode, c, &mode, 0, 0) != GRUB_EFI_SUCCESS)
     return 0;
 
   new_mode = on ? GRUB_EFI_SCREEN_TEXT : GRUB_EFI_SCREEN_GRAPHICS;
   if (mode != new_mode)
-    if (c->set_mode (c, new_mode) != GRUB_EFI_SUCCESS)
+    if (efi_call_2 (c->set_mode, c, new_mode) != GRUB_EFI_SUCCESS)
       return 0;
 
   return 1;
@@ -142,7 +141,7 @@
 void
 grub_efi_stall (grub_efi_uintn_t microseconds)
 {
-  grub_efi_system_table->boot_services->stall (microseconds);
+  efi_call_1 (grub_efi_system_table->boot_services->stall, microseconds);
 }
 
 grub_efi_loaded_image_t *
@@ -157,25 +156,24 @@
 grub_exit (void)
 {
   grub_efi_fini ();
-  grub_efi_system_table->boot_services->exit (grub_efi_image_handle,
-                                             GRUB_EFI_SUCCESS,
-                                             0, 0);
+  efi_call_4 (grub_efi_system_table->boot_services->exit,
+              grub_efi_image_handle, GRUB_EFI_SUCCESS, 0, 0);
 }
 
 void
 grub_reboot (void)
 {
   grub_efi_fini ();
-  grub_efi_system_table->runtime_services->
-    reset_system (GRUB_EFI_RESET_COLD, GRUB_EFI_SUCCESS, 0, NULL);
+  efi_call_4 (grub_efi_system_table->runtime_services->reset_system,
+              GRUB_EFI_RESET_COLD, GRUB_EFI_SUCCESS, 0, NULL);
 }
 
 void
 grub_halt (void)
 {
   grub_efi_fini ();
-  grub_efi_system_table->runtime_services->
-    reset_system (GRUB_EFI_RESET_SHUTDOWN, GRUB_EFI_SUCCESS, 0, NULL);
+  efi_call_4 (grub_efi_system_table->runtime_services->reset_system,
+              GRUB_EFI_RESET_SHUTDOWN, GRUB_EFI_SUCCESS, 0, NULL);
 }
 
 int
@@ -185,7 +183,7 @@
   grub_efi_status_t status;
   
   b = grub_efi_system_table->boot_services;
-  status = b->exit_boot_services (grub_efi_image_handle, map_key);
+  status = efi_call_2 (b->exit_boot_services, grub_efi_image_handle, map_key);
   return status == GRUB_EFI_SUCCESS;
 }
 
@@ -196,7 +194,7 @@
   grub_efi_runtime_services_t *r;
 
   r = grub_efi_system_table->runtime_services;
-  if (r->get_time (&time, 0) != GRUB_EFI_SUCCESS)
+  if (efi_call_2 (r->get_time, &time, 0) != GRUB_EFI_SUCCESS)
     /* What is possible in this case?  */
     return 0;
 

Modified: trunk/grub2/kern/efi/mm.c
===================================================================
--- trunk/grub2/kern/efi/mm.c   2008-07-16 07:06:11 UTC (rev 1713)
+++ trunk/grub2/kern/efi/mm.c   2008-07-17 09:50:26 UTC (rev 1714)
@@ -30,7 +30,7 @@
 
 /* The size of a memory map obtained from the firmware. This must be
    a multiplier of 4KB.  */
-#define MEMORY_MAP_SIZE        0x1000
+#define MEMORY_MAP_SIZE        0x3000
 
 /* Maintain the list of allocated pages.  */
 struct allocated_page
@@ -59,7 +59,7 @@
   grub_efi_status_t status;
   grub_efi_boot_services_t *b;
 
-#if GRUB_CPU_SIZEOF_VOID_P < 8
+#if GRUB_TARGET_SIZEOF_VOID_P < 8
   /* Limit the memory access to less than 4GB for 32-bit platforms.  */
   if (address > 0xffffffff)
     return 0;
@@ -79,7 +79,7 @@
 #endif
 
   b = grub_efi_system_table->boot_services;
-  status = b->allocate_pages (type, GRUB_EFI_LOADER_DATA, pages, &address);
+  status = efi_call_4 (b->allocate_pages, type, GRUB_EFI_LOADER_DATA, pages, 
&address);
   if (status != GRUB_EFI_SUCCESS)
     return 0;
 
@@ -88,7 +88,7 @@
       /* Uggh, the address 0 was allocated... This is too annoying,
         so reallocate another one.  */
       address = 0xffffffff;
-      status = b->allocate_pages (type, GRUB_EFI_LOADER_DATA, pages, &address);
+      status = efi_call_4 (b->allocate_pages, type, GRUB_EFI_LOADER_DATA, 
pages, &address);
       grub_efi_free_pages (0, pages);
       if (status != GRUB_EFI_SUCCESS)
        return 0;
@@ -135,7 +135,7 @@
     }
   
   b = grub_efi_system_table->boot_services;
-  b->free_pages (address, pages);
+  efi_call_2 (b->free_pages, address, pages);
 }
 
 /* Get the memory map as defined in the EFI spec. Return 1 if successful,
@@ -159,7 +159,7 @@
     descriptor_version = &version;
   
   b = grub_efi_system_table->boot_services;
-  status = b->get_memory_map (memory_map_size, memory_map, map_key,
+  status = efi_call_5 (b->get_memory_map, memory_map_size, memory_map, map_key,
                              descriptor_size, descriptor_version);
   if (status == GRUB_EFI_SUCCESS)
     return 1;
@@ -218,7 +218,7 @@
        desc = NEXT_MEMORY_DESCRIPTOR (desc, desc_size))
     {
       if (desc->type == GRUB_EFI_CONVENTIONAL_MEMORY
-#if GRUB_CPU_SIZEOF_VOID_P < 8
+#if GRUB_TARGET_SIZEOF_VOID_P < 8
          && desc->physical_start <= 0xffffffff
 #endif
          && desc->physical_start + PAGES_TO_BYTES (desc->num_pages) > 0x100000
@@ -234,7 +234,7 @@
              desc->physical_start = 0x100000;
            }
          
-#if GRUB_CPU_SIZEOF_VOID_P < 8
+#if GRUB_TARGET_SIZEOF_VOID_P < 8
          if (BYTES_TO_PAGES (filtered_desc->physical_start)
              + filtered_desc->num_pages
              > BYTES_TO_PAGES (0x100000000LL))

Added: trunk/grub2/kern/x86_64/dl.c
===================================================================
--- trunk/grub2/kern/x86_64/dl.c                                (rev 0)
+++ trunk/grub2/kern/x86_64/dl.c        2008-07-17 09:50:26 UTC (rev 1714)
@@ -0,0 +1,121 @@
+/* dl-x86_64.c - arch-dependent part of loadable module support */
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 2002,2005,2007  Free Software Foundation, Inc.
+ *
+ *  GRUB is free software: you can redistribute it and/or modify

@@ Diff output truncated at 153600 characters. @@





reply via email to

[Prev in Thread] Current Thread [Next in Thread]