]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Cheery-pick grub-emu split from experimental (rev 1361)
authorRobert Millan <rmh@aybabtu.com>
Mon, 23 Nov 2009 15:31:54 +0000 (15:31 +0000)
committerRobert Millan <rmh@aybabtu.com>
Mon, 23 Nov 2009 15:31:54 +0000 (15:31 +0000)
2009-11-23  Robert Millan  <rmh.grub@aybabtu.com>

        * configure.ac: Detect all `emu' platforms.  Define
        GRUB_MACHINE_* macros in TARGET_CFLAGS.  Remove
        --enable-grub-emu logic.  Disable include/grub/machine
        symlink on `emu' platforms.

        * genkernsyms.sh.in: Use @TARGET_CFLAGS@ during symbol generation.
        * gensymlist.sh.in: Likewise.

        * include/grub/i386/coreboot/machine.h: Remove file.
        * include/grub/i386/efi/machine.h: Likewise.
        * include/grub/i386/ieee1275/machine.h: Likewise.
        * include/grub/i386/pc/machine.h: Likewise.
        * include/grub/i386/qemu/machine.h: Likewise.
        * include/grub/powerpc/ieee1275/machine.h: Likewise.
        * include/grub/sparc64/ieee1275/machine.h: Likewise.
        * include/grub/x86_64/efi/machine.h: Likewise.

        * commands/acpi.c: Remove `<grub/machine/machine.h>'.
        * commands/halt.c: Likewise.
        * commands/reboot.c: Likewise.
        * include/grub/autoefi.h: Likewise.
        * include/grub/i386/at_keyboard.h: Likewise.
        * include/grub/i386/kernel.h: Likewise.
        * include/grub/i386/loader.h: Likewise.
        * include/grub/i386/pc/memory.h: Likewise.
        * kern/dl.c: Likewise.
        * kern/i386/coreboot/init.c: Likewise.
        * loader/i386/bsd.c: Likewise.
        * loader/i386/linux.c: Likewise.
        * loader/multiboot_loader.c: Likewise.
        * term/i386/pc/serial.c: Likewise.
        * term/usb_keyboard.c: Likewise.

        * include/grub/time.h [!GRUB_MACHINE_EMU]: Remove
        `<grub/machine/machine.h>'
        [!GRUB_MACHINE_EMU] (GRUB_TICKS_PER_SECOND): New macro.
        * util/misc.c: Remove `<grub/machine/machine.h>' and
        `<grub/machine/time.h>'.

        * Makefile.in (enable_grub_emu): Remove variable.
        Include $(srcdir)/conf/any-emu.mk for the `emu' platform.

        * conf/any-emu.rmk: New file.
        * conf/common.rmk (grub_emu_init.lst, grub_emu_init.h)
        (grub_emu_init.c): Move from here ...
        * conf/any-emu.rmk: ... to here.

        * conf/i386-coreboot.rmk (sbin_UTILITIES): Remove `grub-emu'.
        (grub_emu_SOURCES, grub_emu_LDFLAGS): Move from here ...
        * conf/any-emu.rmk: ... to here.

39 files changed:
ChangeLog
Makefile.in
commands/acpi.c
commands/halt.c
commands/reboot.c
conf/any-emu.rmk [new file with mode: 0644]
conf/common.rmk
conf/i386-coreboot.rmk
conf/i386-efi.rmk
conf/i386-ieee1275.rmk
conf/i386-pc.rmk
conf/powerpc-ieee1275.rmk
conf/sparc64-ieee1275.rmk
conf/x86_64-efi.rmk
configure.ac
genkernsyms.sh.in
gensymlist.sh.in
include/grub/autoefi.h
include/grub/i386/at_keyboard.h
include/grub/i386/coreboot/machine.h [deleted file]
include/grub/i386/efi/machine.h [deleted file]
include/grub/i386/ieee1275/machine.h [deleted file]
include/grub/i386/kernel.h
include/grub/i386/loader.h
include/grub/i386/pc/machine.h [deleted file]
include/grub/i386/pc/memory.h
include/grub/i386/qemu/machine.h [deleted file]
include/grub/powerpc/ieee1275/machine.h [deleted file]
include/grub/sparc64/ieee1275/machine.h [deleted file]
include/grub/time.h
include/grub/x86_64/efi/machine.h [deleted file]
kern/dl.c
kern/i386/coreboot/init.c
loader/i386/bsd.c
loader/i386/linux.c
loader/multiboot_loader.c
term/i386/pc/serial.c
term/usb_keyboard.c
util/misc.c

index dc9b160ac10a34a43821705bd5dafc3581648368..555a702b01a094eb71832b68c4d265cd8d01d3a6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,56 @@
+2009-11-23  Robert Millan  <rmh.grub@aybabtu.com>
+
+       * configure.ac: Detect all `emu' platforms.  Define
+       GRUB_MACHINE_* macros in TARGET_CFLAGS.  Remove
+       --enable-grub-emu logic.  Disable include/grub/machine
+       symlink on `emu' platforms.
+
+       * genkernsyms.sh.in: Use @TARGET_CFLAGS@ during symbol generation.
+       * gensymlist.sh.in: Likewise.
+
+       * include/grub/i386/coreboot/machine.h: Remove file.
+       * include/grub/i386/efi/machine.h: Likewise.
+       * include/grub/i386/ieee1275/machine.h: Likewise.
+       * include/grub/i386/pc/machine.h: Likewise.
+       * include/grub/i386/qemu/machine.h: Likewise.
+       * include/grub/powerpc/ieee1275/machine.h: Likewise.
+       * include/grub/sparc64/ieee1275/machine.h: Likewise.
+       * include/grub/x86_64/efi/machine.h: Likewise.
+
+       * commands/acpi.c: Remove `<grub/machine/machine.h>'.
+       * commands/halt.c: Likewise.
+       * commands/reboot.c: Likewise.
+       * include/grub/autoefi.h: Likewise.
+       * include/grub/i386/at_keyboard.h: Likewise.
+       * include/grub/i386/kernel.h: Likewise.
+       * include/grub/i386/loader.h: Likewise.
+       * include/grub/i386/pc/memory.h: Likewise.
+        * kern/dl.c: Likewise.
+       * kern/i386/coreboot/init.c: Likewise.
+       * loader/i386/bsd.c: Likewise.
+       * loader/i386/linux.c: Likewise.
+       * loader/multiboot_loader.c: Likewise.
+       * term/i386/pc/serial.c: Likewise.
+       * term/usb_keyboard.c: Likewise.
+
+       * include/grub/time.h [!GRUB_MACHINE_EMU]: Remove
+       `<grub/machine/machine.h>'
+       [!GRUB_MACHINE_EMU] (GRUB_TICKS_PER_SECOND): New macro.
+       * util/misc.c: Remove `<grub/machine/machine.h>' and
+       `<grub/machine/time.h>'.
+
+       * Makefile.in (enable_grub_emu): Remove variable.
+       Include $(srcdir)/conf/any-emu.mk for the `emu' platform.
+
+       * conf/any-emu.rmk: New file.
+       * conf/common.rmk (grub_emu_init.lst, grub_emu_init.h)
+       (grub_emu_init.c): Move from here ...
+       * conf/any-emu.rmk: ... to here.
+
+       * conf/i386-coreboot.rmk (sbin_UTILITIES): Remove `grub-emu'.
+       (grub_emu_SOURCES, grub_emu_LDFLAGS): Move from here ...
+       * conf/any-emu.rmk: ... to here.
+
 2009-11-23  Robert Millan  <rmh.grub@aybabtu.com>
 
        * include/grub/parser.h (grub_parser_register): Document need
index 17cf6209fa153210dfa1cf36ff931d3afcdb1d87..adab7ec0af32a3aec06d3a50df7f17c8d6e2fcb1 100644 (file)
@@ -111,7 +111,6 @@ YACC = @YACC@
 FONT_SOURCE = @FONT_SOURCE@
 
 # Options.
-enable_grub_emu = @enable_grub_emu@
 enable_grub_emu_usb = @enable_grub_emu_usb@
 enable_grub_fstest = @enable_grub_fstest@
 enable_grub_pe2elf = @enable_grub_pe2elf@
@@ -153,7 +152,11 @@ $(addprefix $(srcdir)/,$(MKFILES)): %.mk: %.rmk genmk.rb
          $(RUBY) $(srcdir)/genmk.rb < $< > $@; \
        fi
 
+ifeq ($(platform), emu)
+include $(srcdir)/conf/any-emu.mk
+else
 include $(srcdir)/conf/$(target_cpu)-$(platform).mk
+endif
 
 # For external modules.
 -include $(wildcard $(GRUB_CONTRIB)/*/conf/common.mk)
index 9cfd8ef106e35bddfc6064b1991101605842f645..1a7bf80180d029709c93687f61f6373ded185b7b 100644 (file)
@@ -26,7 +26,6 @@
 #include <grub/gzio.h>
 #include <grub/acpi.h>
 #include <grub/mm.h>
-#include <grub/machine/machine.h>
 #include <grub/machine/memory.h>
 #include <grub/memory.h>
 
index b902418a8d53d51e1ba0210e09ccfb389c624cbe..9a42938b4c0217e26fca10c454d476911c1961ad 100644 (file)
@@ -18,7 +18,6 @@
  */
 
 #include <grub/dl.h>
-#include <grub/machine/machine.h>
 #include <grub/command.h>
 
 #if defined(GRUB_MACHINE_IEEE1275)
index 11bceeb31e9adbe1b19d3712ba7a1bd1093023ac..0b553b710e0d65557c6e05fd3e6f964ab4d94025 100644 (file)
@@ -18,7 +18,6 @@
  */
 
 #include <grub/dl.h>
-#include <grub/machine/machine.h>
 #include <grub/command.h>
 
 #if defined(GRUB_MACHINE_IEEE1275)
diff --git a/conf/any-emu.rmk b/conf/any-emu.rmk
new file mode 100644 (file)
index 0000000..e8172b0
--- /dev/null
@@ -0,0 +1,89 @@
+# -*- makefile -*-
+
+# Used by various components.  These rules need to precede them.
+script/sh/lexer.c_DEPENDENCIES = grub_script.tab.h
+
+sbin_UTILITIES += grub-emu
+util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
+grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c    \
+       commands/configfile.c commands/echo.c commands/help.c           \
+       commands/handler.c commands/ls.c commands/test.c                \
+       commands/search.c commands/blocklist.c commands/hexdump.c       \
+       lib/hexdump.c commands/halt.c commands/reboot.c                 \
+       lib/envblk.c commands/loadenv.c                                 \
+       commands/gptsync.c commands/probe.c commands/xnu_uuid.c         \
+       commands/password.c commands/keystatus.c                        \
+       disk/host.c disk/loopback.c disk/scsi.c                         \
+       fs/fshelp.c     \
+       \
+       io/gzio.c                                                       \
+       kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c       \
+       kern/err.c kern/list.c kern/handler.c                           \
+       kern/command.c kern/corecmd.c commands/extcmd.c kern/file.c     \
+       kern/fs.c commands/boot.c kern/main.c kern/misc.c kern/parser.c \
+       kern/partition.c kern/reader.c kern/term.c                      \
+       kern/rescue_reader.c kern/rescue_parser.c                       \
+       lib/arg.c normal/cmdline.c normal/datetime.c normal/misc.c      \
+       normal/handler.c normal/auth.c normal/autofs.c                  \
+       normal/completion.c normal/main.c normal/color.c                \
+       normal/menu.c normal/menu_entry.c normal/menu_viewer.c          \
+       normal/menu_text.c                                              \
+       script/sh/main.c script/sh/execute.c script/sh/function.c       \
+       script/sh/lexer.c script/sh/script.c grub_script.tab.c          \
+       partmap/amiga.c partmap/apple.c partmap/msdos.c partmap/sun.c   \
+       partmap/acorn.c partmap/gpt.c                                   \
+       \
+       fs/affs.c fs/cpio.c  fs/fat.c fs/ext2.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/ufs2.c fs/xfs.c fs/afs.c fs/afs_be.c                \
+       fs/befs.c fs/befs_be.c fs/tar.c                         \
+       \
+       util/console.c util/hostfs.c util/grub-emu.c util/misc.c        \
+       util/hostdisk.c util/getroot.c                                  \
+       \
+       disk/raid.c disk/raid5_recover.c disk/raid6_recover.c           \
+       disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c             \
+       commands/parttool.c parttool/msdospart.c                        \
+       grub_emu_init.c
+
+ifeq ($(target_cpu), i386)
+grub_emu_SOURCES += commands/i386/cpuid.c
+endif
+
+grub_emu_LDFLAGS = $(LIBCURSES)
+
+ifeq ($(enable_grub_emu_usb), yes)
+grub_emu_SOURCES += disk/usbms.c util/usb.c bus/usb/usb.c      \
+               commands/usbtest.c
+grub_emu_LDFLAGS += $(LIBCURSES) $(LIBUSB)
+endif
+
+grub_emu_init.lst: geninit.sh $(filter-out grub_emu_init.c,$(grub_emu_SOURCES))
+       rm -f $@; grep GRUB_MOD_INIT $(filter %.c,$^) /dev/null > $@
+DISTCLEANFILES += grub_emu_init.lst
+
+grub_emu_init.h: grub_emu_init.lst $(filter-out grub_emu_init.c,$(grub_emu_SOURCES)) geninitheader.sh
+       rm -f $@; sh $(srcdir)/geninitheader.sh $< > $@
+DISTCLEANFILES += grub_emu_init.h
+
+grub_emu_init.c: grub_emu_init.lst $(filter-out grub_emu_init.c,$(grub_emu_SOURCES)) geninit.sh grub_emu_init.h
+       rm -f $@; sh $(srcdir)/geninit.sh $< $(filter %.c,$^) > $@
+DISTCLEANFILES += grub_emu_init.c
+
+
+
+
+# FIXME: this could be shared with common.rmk
+
+# For grub-mkfont.
+ifeq ($(enable_grub_mkfont), yes)
+bin_UTILITIES += grub-mkfont
+grub_mkfont_SOURCES = util/grub-mkfont.c util/misc.c
+grub_mkfont_CFLAGS = $(freetype_cflags)
+grub_mkfont_LDFLAGS = $(freetype_libs)
+endif
+
+grub_script.tab.c grub_script.tab.h: script/sh/parser.y
+       $(YACC) -d -p grub_script_yy -b grub_script $(srcdir)/script/sh/parser.y
+DISTCLEANFILES += grub_script.tab.c grub_script.tab.h
index 173f24b62ab6109c6d544ef1af5c760e704a9e24..dc6d44d65379e1bb38ac6955f4291022984d7d14 100644 (file)
@@ -76,19 +76,6 @@ grub_script.tab.c grub_script.tab.h: script/sh/parser.y
        $(YACC) -d -p grub_script_yy -b grub_script $(srcdir)/script/sh/parser.y
 DISTCLEANFILES += grub_script.tab.c grub_script.tab.h
 
-# For grub-emu.
-grub_emu_init.lst: geninit.sh $(filter-out grub_emu_init.c,$(grub_emu_SOURCES))
-       rm -f $@; grep GRUB_MOD_INIT $(filter %.c,$^) /dev/null > $@
-DISTCLEANFILES += grub_emu_init.lst
-
-grub_emu_init.h: grub_emu_init.lst $(filter-out grub_emu_init.c,$(grub_emu_SOURCES)) geninitheader.sh
-       rm -f $@; sh $(srcdir)/geninitheader.sh $< > $@
-DISTCLEANFILES += grub_emu_init.h
-
-grub_emu_init.c: grub_emu_init.lst $(filter-out grub_emu_init.c,$(grub_emu_SOURCES)) geninit.sh grub_emu_init.h
-       rm -f $@; sh $(srcdir)/geninit.sh $< $(filter %.c,$^) > $@
-DISTCLEANFILES += grub_emu_init.c
-
 # For grub-probe.
 grub_probe_init.lst: geninit.sh $(filter-out grub_probe_init.c,$(grub_probe_SOURCES))
        rm -f $@; grep GRUB_MOD_INIT $(filter %.c,$^) /dev/null > $@
index c506e4153f1137e36afd95f6f5fb6b2fe6bc1161..74a7cc9c868a1d40e8be035a97b4a91e50b3f924 100644 (file)
@@ -95,60 +95,11 @@ kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genke
 
 # Utilities.
 sbin_UTILITIES = grub-mkdevicemap
-ifeq ($(enable_grub_emu), yes)
-sbin_UTILITIES += grub-emu
-endif
 
 # For grub-mkdevicemap.
 grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
        util/devicemap.c util/misc.c
 
-# For grub-emu.
-util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
-grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c    \
-       commands/configfile.c commands/echo.c commands/help.c           \
-       commands/handler.c commands/ls.c commands/test.c                \
-       commands/search.c commands/blocklist.c commands/hexdump.c       \
-       commands/gptsync.c commands/probe.c commands/xnu_uuid.c         \
-       commands/password.c commands/keystatus.c                        \
-       lib/hexdump.c commands/i386/cpuid.c                             \
-       lib/envblk.c commands/loadenv.c                                 \
-       disk/host.c disk/loopback.c                                     \
-       \
-       fs/affs.c fs/cpio.c fs/fat.c fs/ext2.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/ufs2.c fs/xfs.c fs/afs.c fs/afs_be.c                \
-       fs/befs.c fs/befs_be.c fs/tar.c                         \
-       \
-       fs/fshelp.c                                                     \
-       io/gzio.c                                                       \
-       kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c       \
-       kern/err.c kern/list.c kern/handler.c                           \
-       kern/command.c kern/corecmd.c commands/extcmd.c kern/file.c     \
-       kern/fs.c commands/boot.c kern/main.c kern/misc.c kern/parser.c \
-       kern/partition.c kern/reader.c kern/term.c                      \
-       kern/rescue_reader.c kern/rescue_parser.c                       \
-       lib/arg.c normal/cmdline.c normal/misc.c                        \
-       normal/handler.c normal/auth.c normal/autofs.c                  \
-       normal/completion.c normal/datetime.c normal/main.c             \
-       normal/menu_text.c                                              \
-       normal/menu.c normal/menu_entry.c normal/menu_viewer.c          \
-       normal/color.c                                                  \
-       script/sh/main.c script/sh/execute.c script/sh/function.c       \
-       script/sh/lexer.c script/sh/script.c grub_script.tab.c          \
-       partmap/amiga.c partmap/apple.c partmap/msdos.c partmap/sun.c   \
-       partmap/acorn.c partmap/gpt.c                                   \
-       util/console.c util/hostfs.c util/grub-emu.c util/misc.c        \
-       util/hostdisk.c util/getroot.c                                  \
-       \
-       disk/raid.c disk/raid5_recover.c disk/raid6_recover.c           \
-       disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c             \
-       commands/parttool.c parttool/msdospart.c                                \
-       grub_emu_init.c
-
-grub_emu_LDFLAGS = $(LIBCURSES)
-
 sbin_SCRIPTS += grub-install
 grub_install_SOURCES = util/grub-install.in
 
index 39613d18684e1e6fac734337ec6cf2951ce69f5f..13c3a5731dde83ff063eeaf491017eb06560bd14 100644 (file)
@@ -10,9 +10,6 @@ script/sh/lexer.c_DEPENDENCIES = grub_script.tab.h
 # Utilities.
 bin_UTILITIES = grub-mkimage
 sbin_UTILITIES = grub-mkdevicemap
-#ifeq ($(enable_grub_emu), yes)
-#sbin_UTILITIES += grub-emu
-#endif
 
 # For grub-mkimage.
 grub_mkimage_SOURCES = util/i386/efi/grub-mkimage.c util/misc.c \
@@ -31,51 +28,6 @@ util/i386/efi/grub-mkimage.c_DEPENDENCIES = Makefile
 grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
        util/devicemap.c util/misc.c
 
-# For grub-emu.
-util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
-grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c    \
-       commands/configfile.c commands/help.c                           \
-       commands/handler.c commands/ls.c commands/test.c                \
-       commands/search.c commands/hexdump.c lib/hexdump.c              \
-       commands/halt.c commands/reboot.c commands/keystatus.c          \
-       commands/i386/cpuid.c                                           \
-       commands/password.c                                             \
-       lib/envblk.c commands/loadenv.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/ufs2.c fs/xfs.c fs/afs.c fs/afs_be.c                \
-       fs/befs.c fs/befs_be.c fs/tar.c                         \
-       \
-       io/gzio.c                                                       \
-       kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c       \
-       kern/err.c kern/list.c kern/handler.c                           \
-       kern/command.c kern/corecmd.c commands/extcmd.c kern/file.c     \
-       kern/fs.c commands/boot.c kern/main.c kern/misc.c kern/parser.c \
-       kern/partition.c kern/reader.c kern/term.c                      \
-       kern/rescue_reader.c kern/rescue_parser.c                       \
-       lib/arg.c normal/cmdline.c normal/command.c normal/datetime.c   \
-       normal/auth.c normal/autofs.c                                   \
-       normal/completion.c normal/context.c normal/main.c              \
-       normal/menu.c normal/menu_entry.c normal/menu_viewer.c          \
-       normal/menu_text.c                                              \
-       normal/color.c                                                  \
-       script/sh/main.c script/sh/execute.c script/sh/function.c       \
-       script/sh/lexer.c script/sh/script.c grub_script.tab.c          \
-       partmap/amiga.c partmap/apple.c partmap/msdos.c partmap/sun.c   \
-       partmap/acorn.c partmap/gpt.c                                   \
-       util/console.c util/hostfs.c util/grub-emu.c util/misc.c        \
-       util/hostdisk.c util/getroot.c                                  \
-       \
-       disk/raid.c disk/raid5_recover.c disk/raid6_recover.c           \
-       disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c             \
-       commands/parttool.c parttool/msdospart.c                                \
-       grub_emu_init.c
-
-grub_emu_LDFLAGS = $(LIBCURSES)
-
 # Scripts.
 sbin_SCRIPTS = grub-install
 
index 1eeba3af552bd02d691b5b545af75c33ae7c0771..2d9532380233def514ca5282cc0e50fe0ee1b980 100644 (file)
@@ -49,59 +49,11 @@ kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genke
 
 # Utilities.
 sbin_UTILITIES = grub-mkdevicemap
-ifeq ($(enable_grub_emu), yes)
-sbin_UTILITIES += grub-emu
-endif
 
 # For grub-mkdevicemap.
 grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
        util/devicemap.c util/misc.c
 
-# For grub-emu.
-util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
-grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c    \
-       commands/configfile.c commands/echo.c commands/help.c           \
-       commands/handler.c commands/ls.c commands/test.c                \
-       commands/search.c commands/blocklist.c commands/hexdump.c       \
-       lib/hexdump.c commands/halt.c commands/reboot.c                 \
-       lib/envblk.c commands/loadenv.c                                 \
-       commands/gptsync.c commands/probe.c  commands/xnu_uuid.c        \
-       commands/i386/cpuid.c   \
-       commands/password.c commands/keystatus.c                        \
-       disk/host.c disk/loopback.c                                     \
-       \
-       fs/affs.c fs/cpio.c fs/fat.c fs/ext2.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/ufs2.c fs/xfs.c fs/afs.c fs/afs_be.c fs/befs.c      \
-       fs/befs_be.c fs/tar.c                           \
-       \
-       fs/fshelp.c                                                     \
-       io/gzio.c                                                       \
-       kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c       \
-       kern/err.c kern/list.c kern/handler.c                           \
-       kern/command.c kern/corecmd.c commands/extcmd.c kern/file.c     \
-       kern/fs.c commands/boot.c kern/main.c kern/misc.c kern/parser.c \
-       kern/partition.c kern/reader.c kern/term.c                      \
-       kern/rescue_reader.c kern/rescue_parser.c                       \
-       lib/arg.c normal/cmdline.c normal/datetime.c normal/misc.c      \
-       normal/handler.c normal/auth.c normal/autofs.c                  \
-       normal/completion.c normal/main.c normal/menu_text.c            \
-       normal/menu.c normal/menu_entry.c normal/menu_viewer.c          \
-       normal/color.c                                                  \
-       script/sh/main.c script/sh/execute.c script/sh/function.c       \
-       script/sh/lexer.c script/sh/script.c grub_script.tab.c          \
-       partmap/amiga.c partmap/apple.c partmap/msdos.c partmap/sun.c   \
-       partmap/acorn.c partmap/gpt.c                                   \
-       util/console.c util/hostfs.c util/grub-emu.c util/misc.c        \
-       util/hostdisk.c util/getroot.c                                  \
-       \
-       disk/raid.c disk/raid5_recover.c disk/raid6_recover.c           \
-       disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c             \
-       grub_emu_init.c
-
-grub_emu_LDFLAGS = $(LIBCURSES)
-
 # Scripts.
 sbin_SCRIPTS = grub-install
 
index e1688ccd5d14a66d97119bb25dafa9234d599375..d4118526bed34677d8a63442a8a638726b679096 100644 (file)
@@ -82,9 +82,6 @@ kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genke
 # Utilities.
 bin_UTILITIES = grub-mkimage
 sbin_UTILITIES = grub-setup grub-mkdevicemap
-ifeq ($(enable_grub_emu), yes)
-sbin_UTILITIES += grub-emu
-endif
 
 # For grub-mkimage.
 grub_mkimage_SOURCES = gnulib/progname.c util/i386/pc/grub-mkimage.c util/misc.c \
@@ -116,59 +113,6 @@ grub_setup_SOURCES = gnulib/progname.c \
 grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
        util/devicemap.c util/misc.c
 
-# For grub-emu.
-util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
-grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c    \
-       commands/configfile.c commands/echo.c commands/help.c           \
-       commands/handler.c commands/ls.c commands/test.c                \
-       commands/search.c commands/blocklist.c commands/hexdump.c       \
-       lib/hexdump.c commands/i386/pc/halt.c commands/reboot.c         \
-       lib/envblk.c commands/loadenv.c                                 \
-       commands/gptsync.c commands/probe.c commands/xnu_uuid.c         \
-       commands/i386/cpuid.c   \
-       commands/password.c commands/keystatus.c                        \
-       disk/host.c disk/loopback.c disk/scsi.c                         \
-       fs/fshelp.c     \
-       \
-       io/gzio.c                                                       \
-       kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c       \
-       kern/err.c kern/list.c kern/handler.c                           \
-       kern/command.c kern/corecmd.c commands/extcmd.c kern/file.c     \
-       kern/fs.c commands/boot.c kern/main.c kern/misc.c kern/parser.c \
-       kern/partition.c kern/reader.c kern/term.c                      \
-       kern/rescue_reader.c kern/rescue_parser.c                       \
-       lib/arg.c normal/cmdline.c normal/datetime.c normal/misc.c      \
-       normal/handler.c normal/auth.c normal/autofs.c                          \
-       normal/completion.c normal/main.c normal/color.c                \
-       normal/menu.c normal/menu_entry.c normal/menu_viewer.c          \
-       normal/menu_text.c                                              \
-       script/sh/main.c script/sh/execute.c script/sh/function.c       \
-       script/sh/lexer.c script/sh/script.c grub_script.tab.c          \
-       partmap/amiga.c partmap/apple.c partmap/msdos.c partmap/sun.c   \
-       partmap/acorn.c partmap/gpt.c                                   \
-       \
-       fs/affs.c fs/cpio.c  fs/fat.c fs/ext2.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/ufs2.c fs/xfs.c fs/afs.c fs/afs_be.c                \
-       fs/befs.c fs/befs_be.c fs/tar.c                         \
-       \
-       util/console.c util/hostfs.c util/grub-emu.c util/misc.c        \
-       util/hostdisk.c util/getroot.c                                  \
-       \
-       disk/raid.c disk/raid5_recover.c disk/raid6_recover.c           \
-       disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c             \
-       commands/parttool.c parttool/msdospart.c                                \
-       grub_emu_init.c
-
-grub_emu_LDFLAGS = $(LIBCURSES)
-
-ifeq ($(enable_grub_emu_usb), yes)
-grub_emu_SOURCES += disk/usbms.c util/usb.c bus/usb/usb.c      \
-               commands/usbtest.c
-grub_emu_LDFLAGS += $(LIBCURSES) $(LIBUSB)
-endif
-
 sbin_SCRIPTS += grub-install
 grub_install_SOURCES = util/grub-install.in
 
index ee7f9ec27e65b0648dca4c3f9a86168332cbc5aa..b8c62711b7e417458b024912c04b0b18cb005bc1 100644 (file)
@@ -30,60 +30,11 @@ pkglib_PROGRAMS = kernel.img
 
 # Utilities.
 sbin_UTILITIES = grub-mkdevicemap
-ifeq ($(enable_grub_emu), yes)
-sbin_UTILITIES += grub-emu
-endif
 
 # For grub-mkdevicemap.
 grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
        util/devicemap.c util/misc.c
 
-# For grub-emu
-util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
-grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c    \
-       commands/configfile.c commands/help.c                           \
-       commands/search.c commands/handler.c commands/test.c            \
-       commands/ls.c commands/blocklist.c commands/hexdump.c           \
-       lib/hexdump.c commands/halt.c commands/reboot.c                 \
-       lib/envblk.c commands/loadenv.c                                 \
-       commands/gptsync.c commands/probe.c commands/xnu_uuid.c         \
-       commands/password.c commands/keystatus.c                        \
-       disk/loopback.c                                                 \
-       \
-       fs/affs.c fs/cpio.c fs/fat.c fs/ext2.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/ufs2.c fs/xfs.c fs/afs.c fs/afs_be.c                \
-       fs/befs.c fs/befs_be.c fs/tar.c                         \
-       \
-       io/gzio.c                                                       \
-       kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c       \
-       kern/err.c kern/file.c kern/fs.c commands/boot.c kern/main.c    \
-       kern/misc.c kern/parser.c kern/partition.c kern/reader.c        \
-       kern/rescue_reader.c kern/rescue_parser.c                       \
-       kern/term.c kern/list.c kern/handler.c fs/fshelp.c              \
-       kern/command.c kern/corecmd.c commands/extcmd.c                 \
-       lib/arg.c normal/cmdline.c normal/datetime.c                    \
-       normal/completion.c normal/misc.c                               \
-       normal/handler.c normal/auth.c normal/autofs.c normal/main.c    \
-       normal/menu.c                                                   \
-       normal/menu_text.c                                              \
-       normal/menu_entry.c normal/menu_viewer.c                        \
-       normal/color.c                                                  \
-       script/sh/main.c script/sh/execute.c script/sh/function.c       \
-       script/sh/lexer.c script/sh/script.c                            \
-       partmap/amiga.c partmap/apple.c partmap/msdos.c partmap/sun.c   \
-       partmap/acorn.c                                                 \
-       util/console.c util/hostfs.c util/grub-emu.c util/misc.c        \
-       util/hostdisk.c util/getroot.c                                  \
-       \
-       disk/raid.c disk/raid5_recover.c disk/raid6_recover.c           \
-       disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c             \
-       commands/parttool.c parttool/msdospart.c                                \
-       grub_script.tab.c grub_emu_init.c
-
-grub_emu_LDFLAGS = $(LIBCURSES)
-
 kernel_img_SOURCES = kern/powerpc/ieee1275/startup.S kern/ieee1275/cmain.c \
        kern/ieee1275/ieee1275.c kern/main.c kern/device.c              \
        kern/disk.c kern/dl.c kern/err.c kern/file.c kern/fs.c          \
index 62e951a5e5843d6026f88673462921f8ddc2a061..945a33d3f5e32746a8fad6a7c8520c7b40e9cee3 100644 (file)
@@ -60,9 +60,6 @@ kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genke
 # Utilities.
 bin_UTILITIES = grub-mkimage
 sbin_UTILITIES = grub-setup grub-mkdevicemap grub-ofpathname
-ifeq ($(enable_grub_emu), yes)
-sbin_UTILITIES += grub-emu
-endif
 
 # For grub-mkimage.
 grub_mkimage_SOURCES = util/sparc64/ieee1275/grub-mkimage.c util/misc.c \
@@ -96,52 +93,6 @@ grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
 grub_ofpathname_SOURCES = util/sparc64/ieee1275/grub-ofpathname.c \
        util/ieee1275/ofpath.c util/misc.c
 
-# For grub-emu
-util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
-grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c    \
-       commands/configfile.c commands/help.c                           \
-       commands/search.c commands/handler.c commands/test.c            \
-       commands/ls.c commands/blocklist.c commands/hexdump.c           \
-       lib/hexdump.c commands/halt.c commands/reboot.c                 \
-       lib/envblk.c commands/loadenv.c                                 \
-       commands/gptsync.c commands/probe.c commands/xnu_uuid.c         \
-       commands/password.c commands/keystatus.c                        \
-       disk/loopback.c                                                 \
-       \
-       fs/affs.c fs/cpio.c fs/fat.c fs/ext2.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/ufs2.c fs/xfs.c fs/afs.c fs/afs_be.c                \
-       fs/befs.c fs/befs_be.c fs/tar.c                         \
-       \
-       io/gzio.c                                                       \
-       kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c       \
-       kern/err.c kern/file.c kern/fs.c commands/boot.c kern/main.c    \
-       kern/misc.c kern/parser.c kern/partition.c kern/reader.c        \
-       kern/rescue_reader.c kern/rescue_parser.c                       \
-       kern/term.c kern/list.c kern/handler.c fs/fshelp.c              \
-       kern/command.c kern/corecmd.c commands/extcmd.c                 \
-       lib/arg.c normal/cmdline.c normal/datetime.c                    \
-       normal/completion.c normal/misc.c                               \
-       normal/handler.c normal/auth.c normal/autofs.c normal/main.c    \
-       normal/menu.c                                                   \
-       normal/menu_text.c                                              \
-       normal/menu_entry.c normal/menu_viewer.c                        \
-       normal/color.c                                                  \
-       script/sh/main.c script/sh/execute.c script/sh/function.c       \
-       script/sh/lexer.c script/sh/script.c                            \
-       partmap/amiga.c partmap/apple.c partmap/msdos.c partmap/sun.c   \
-       partmap/acorn.c                                                 \
-       util/console.c util/hostfs.c util/grub-emu.c util/misc.c        \
-       util/hostdisk.c util/getroot.c                                  \
-       \
-       disk/raid.c disk/raid5_recover.c disk/raid6_recover.c           \
-       disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c             \
-       commands/parttool.c parttool/msdospart.c                                \
-       grub_script.tab.c grub_emu_init.c
-
-grub_emu_LDFLAGS = $(LIBCURSES)
-
 # Scripts.
 sbin_SCRIPTS = grub-install
 
index 2e90dc4284c636f4a3b64c4727767890cc7fa5e5..df32b0a5fcc813709bc1be817d0256af1b67da63 100644 (file)
@@ -10,9 +10,6 @@ script/sh/lexer.c_DEPENDENCIES = grub_script.tab.h
 # Utilities.
 bin_UTILITIES = grub-mkimage
 sbin_UTILITIES = grub-mkdevicemap
-#ifeq ($(enable_grub_emu), yes)
-#sbin_UTILITIES += grub-emu
-#endif
 
 # For grub-mkimage.
 grub_mkimage_SOURCES = util/i386/efi/grub-mkimage.c util/misc.c \
@@ -30,50 +27,6 @@ grub_mkimage_SOURCES = util/i386/efi/grub-mkimage.c util/misc.c \
 grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
        util/devicemap.c util/misc.c
 
-# For grub-emu.
-util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
-grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c    \
-       commands/configfile.c commands/help.c                           \
-       commands/handler.c commands/ls.c commands/test.c                \
-       commands/search.c commands/hexdump.c lib/hexdump.c              \
-       commands/halt.c commands/reboot.c                               \
-       commands/i386/cpuid.c                                           \
-       commands/password.c commands/keystatus.c                        \
-       lib/envblk.c commands/loadenv.c                                 \
-       disk/loopback.c                                                 \
-       \
-       fs/affs.c fs/cpio.c fs/fat.c fs/ext2.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/ufs2.c fs/xfs.c fs/afs.c fs/afs_be.c                                        \
-       \
-       io/gzio.c                                                       \
-       kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c       \
-       kern/err.c kern/list.c kern/handler.c                           \
-       kern/command.c kern/corecmd.c commands/extcmd.c kern/file.c     \
-       kern/fs.c commands/boot.c kern/main.c kern/misc.c kern/parser.c \
-       kern/partition.c kern/readerescue.c kern/term.c                 \
-       lib/arg.c normal/cmdline.c normal/misc.c normal/auth.c          \
-       normal/autofs.c \
-       normal/completion.c normal/datetime.c normal/context.c          \
-       normal/main.c           \
-       normal/menu.c normal/menu_entry.c normal/menu_viewer.c          \
-       normal/menu_text.c                                              \
-       normal/color.c                                                  \
-       script/sh/main.c script/sh/execute.c script/sh/function.c       \
-       script/sh/lexer.c script/sh/script.c grub_script.tab.c          \
-       partmap/amiga.c partmap/apple.c partmap/msdos.c partmap/sun.c   \
-       partmap/acorn.c partmap/gpt.c                                   \
-       util/console.c util/hostfs.c util/grub-emu.c util/misc.c        \
-       util/hostdisk.c util/getroot.c                                  \
-       \
-       disk/raid.c disk/raid5_recover.c disk/raid6_recover.c           \
-       disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c             \
-       commands/parttool.c parttool/msdospart.c                                \
-       grub_emu_init.c
-
-grub_emu_LDFLAGS = $(LIBCURSES)
-
 # Scripts.
 sbin_SCRIPTS = grub-install
 
index 383cb67a383cd2b798b2620e04f06e4929c279f9..58b291d4f6501cfa5be9267b7cabd7050793294c 100644 (file)
@@ -91,6 +91,7 @@ case "$target_cpu"-"$platform" in
   i386-qemu) ;;
   powerpc-ieee1275) ;;
   sparc64-ieee1275) ;;
+  *-emu) ;;
   *) AC_MSG_ERROR([platform "$platform" is not supported for target CPU "$target_cpu"]) ;;
 esac
 
@@ -113,6 +114,17 @@ case "$host_os" in
   cygwin)                      host_kernel=windows ;;
 esac
 
+case "$platform" in
+  coreboot)    machine_CFLAGS="-DGRUB_MACHINE_COREBOOT=1" ;;
+  efi)         machine_CFLAGS="-DGRUB_MACHINE_EFI=1" ;;
+  ieee1275)    machine_CFLAGS="-DGRUB_MACHINE_IEEE1275=1" ;;
+  qemu)                machine_CFLAGS="-DGRUB_MACHINE_QEMU=1" ;;
+  pc)          machine_CFLAGS="-DGRUB_MACHINE_PCBIOS=1" ;;
+  emu)         machine_CFLAGS="-DGRUB_MACHINE_EMU=1" ;;
+esac
+CFLAGS="$CFLAGS $machine_CFLAGS"
+TARGET_CFLAGS="$TARGET_CFLAGS $machine_CFLAGS"
+
 AC_SUBST(host_cpu)
 AC_SUBST(host_os)
 AC_SUBST(host_kernel)
@@ -509,40 +521,28 @@ AC_ARG_ENABLE([mm-debug],
               [AC_DEFINE([MM_DEBUG], [1],
                          [Define to 1 if you enable memory manager debugging.])])
 
-AC_ARG_ENABLE([grub-emu],
-             [AS_HELP_STRING([--enable-grub-emu],
-                             [build and install the `grub-emu' debugging utility (default=guessed)])])
 AC_ARG_ENABLE([grub-emu-usb],
              [AS_HELP_STRING([--enable-grub-emu-usb],
                              [build and install the `grub-emu' debugging utility with USB support (default=guessed)])])
-if test x"$enable_grub_emu" = xno ; then
-  grub_emu_excuse="explicitly disabled"
-fi
 
-  [# Check for curses libraries.]
-[if [ x"$grub_emu_excuse" = x ]; then ]
+if test "$platform" = emu; then
+  missing_ncurses=
+[# Check for curses libraries.]
   AC_CHECK_LIB([ncurses], [wgetch], [LIBCURSES="-lncurses"],
     [AC_CHECK_LIB([curses], [wgetch], [LIBCURSES="-lcurses"],
-      [grub_emu_excuse=["need (n)curses libraries"]])])
+      [missing_ncurses=[true]])])
   AC_SUBST([LIBCURSES])
-[fi]
-[if [ x"$grub_emu_excuse" = x ]; then ]
+[if [ x"$missing_ncurses" = x ]; then ]
   [# Check for headers.]
   AC_CHECK_HEADERS([ncurses/curses.h], [],
     [AC_CHECK_HEADERS([ncurses.h], [],
       [AC_CHECK_HEADERS([curses.h], [],
-       [grub_emu_excuse=["need (n)curses headers"]])])])
+       [missing_ncurses=[true]])])])
 [fi]
-
-if test x"$enable_grub_emu" = xyes && test x"$grub_emu_excuse" != x ; then
-  AC_MSG_ERROR([grub-emu was explicitly requested but can't be compiled])
-fi
-if test x"$grub_emu_excuse" = x ; then
-enable_grub_emu=yes
-else
-enable_grub_emu=no
-grub_emu_usb_excuse="grub-emu isn't built"
+if test x"$missing_ncurses" = xtrue ; then
+  AC_MSG_ERROR([grub-emu can't be compiled without ncurses])
 fi
+
 if test x"$enable_grub_emu_usb" = xno ; then
   grub_emu_usb_excuse="explicitly disabled"
 fi
@@ -565,9 +565,8 @@ enable_grub_emu_usb=yes
 else
 enable_grub_emu_usb=no
 fi
-
-AC_SUBST([enable_grub_emu])
 AC_SUBST([enable_grub_emu_usb])
+fi
 
 AC_ARG_ENABLE([grub-fstest],
              [AS_HELP_STRING([--enable-grub-fstest],
@@ -615,14 +614,18 @@ AC_SUBST(ASFLAGS)
 # Output files.
 grub_CHECK_LINK_DIR
 if test x"$link_dir" = xyes ; then
-  AC_CONFIG_LINKS([include/grub/cpu:include/grub/$target_cpu
-       include/grub/machine:include/grub/$target_cpu/$platform])
+  AC_CONFIG_LINKS([include/grub/cpu:include/grub/$target_cpu])
+  if test "$platform" != emu ; then
+    AC_CONFIG_LINKS([include/grub/machine:include/grub/$target_cpu/$platform])
+  fi
 else
   mkdir -p include/grub 2>/dev/null
   rm -rf include/grub/cpu
   cp -rp $srcdir/include/grub/$target_cpu include/grub/cpu 2>/dev/null
-  rm -rf include/grub/machine
-  cp -rp $srcdir/include/grub/$target_cpu/$platform include/grub/machine 2>/dev/null
+  if test "$platform" != emu ; then
+    rm -rf include/grub/machine
+    cp -rp $srcdir/include/grub/$target_cpu/$platform include/grub/machine 2>/dev/null
+  fi
 fi
 AC_CONFIG_FILES([Makefile gensymlist.sh genkernsyms.sh])
 AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
@@ -631,16 +634,13 @@ AC_OUTPUT
 echo "*******************************************************"
 echo GRUB2 will be compiled with following components:
 echo Platform: "$target_cpu"-"$platform"
-if [ x"$grub_emu_excuse" = x ]; then
-echo grub-emu: Yes
-else
-echo grub-emu: No "($grub_emu_excuse)"
-fi
+if [ x"$platform" = xemu ]; then
 if [ x"$grub_emu_usb_excuse" = x ]; then
 echo USB support for grub-emu: Yes
 else
 echo USB support for grub-emu: No "($grub_emu_usb_excuse)"
 fi
+fi
 if [ x"$enable_mm_debug" = xyes ]; then
 echo With memory debugging: Yes
 else
index 3dec5828d5478531cddcabd82c096f3be1362c3e..b2f3f7af96bf9dbe2b6f102954737e2f18249978 100644 (file)
@@ -19,7 +19,7 @@
 u=
 grep "^#define HAVE_ASM_USCORE" config.h >/dev/null 2>&1 && u="_"
 
-$CC -DGRUB_SYMBOL_GENERATOR=1 -E -I. -Iinclude -I"$srcdir/include" $* \
+$CC @TARGET_CFLAGS@ -DGRUB_SYMBOL_GENERATOR=1 -E -I. -Iinclude -I"$srcdir/include" $* \
   | grep -v '^#' \
   | sed -n \
         -e '/EXPORT_FUNC *([a-zA-Z0-9_]*)/{s/.*EXPORT_FUNC *(\([a-zA-Z0-9_]*\)).*/'"$u"'\1 kernel/;p;}' \
index 8f50b99ea5683ab1194b9305eb058ac24645df61..27fc5e61a749af32b59c86629ec88d3f3149981f 100644 (file)
@@ -59,7 +59,7 @@ cat <<EOF
     {
 EOF
 
-$CC -DGRUB_SYMBOL_GENERATOR=1 -E -I. -Iinclude -I"$srcdir/include" $* \
+$CC @TARGET_CFLAGS@ -DGRUB_SYMBOL_GENERATOR=1 -E -I. -Iinclude -I"$srcdir/include" $* \
   | grep -v '^#' \
   | sed -n \
         -e '/EXPORT_FUNC *([a-zA-Z0-9_]*)/{s/.*EXPORT_FUNC *(\([a-zA-Z0-9_]*\)).*/      {"\1", \1},/;p;}' \
index 4acd43965b46c1f6b36ded8775e9d61b218c5767..b151cfc3748161665c00d7f241c4f57953162f57 100644 (file)
@@ -21,7 +21,6 @@
 #ifndef GRUB_AUTOEFI_HEADER
 #define GRUB_AUTOEFI_HEADER    1
 
-#include <grub/machine/machine.h>
 
 #ifdef GRUB_MACHINE_EFI
 # include <grub/efi/efi.h>
index 96b21627f9ef4655b00488be1d164282e60ccb18..12d61608e1516a1842cadfc780a4e856821a2108 100644 (file)
@@ -19,7 +19,6 @@
 #ifndef GRUB_CPU_AT_KEYBOARD_HEADER
 #define GRUB_CPU_AT_KEYBOARD_HEADER    1
 
-#include <grub/machine/machine.h>
 
 #define SHIFT_L                0x2a
 #define SHIFT_R                0x36
diff --git a/include/grub/i386/coreboot/machine.h b/include/grub/i386/coreboot/machine.h
deleted file mode 100644 (file)
index 8b70590..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- *  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_COREBOOT  1
-
-#endif /* ! GRUB_MACHINE_MACHINE_HEADER */
diff --git a/include/grub/i386/efi/machine.h b/include/grub/i386/efi/machine.h
deleted file mode 100644 (file)
index 1600768..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- *  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 */
diff --git a/include/grub/i386/ieee1275/machine.h b/include/grub/i386/ieee1275/machine.h
deleted file mode 100644 (file)
index 755eb33..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- *  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_MACHINE_MACHINE_HEADER
-#define GRUB_MACHINE_MACHINE_HEADER    1
-
-#define GRUB_MACHINE_IEEE1275  1
-
-#endif /* ! GRUB_MACHINE_MACHINE_HEADER */
index 74715e178ac1960a81c7a6ae47e4b781ee44b8b3..5514c8ccff1d94acb4678fc5828557b3890b198b 100644 (file)
@@ -19,7 +19,6 @@
 #ifndef GRUB_KERNEL_CPU_HEADER
 #define GRUB_KERNEL_CPU_HEADER 1
 
-#include <grub/machine/machine.h>
 
 #ifdef GRUB_MACHINE_IEEE1275
 #define GRUB_MOD_ALIGN 0x1000
index b7fa413f148adf920a09eab8acedcb4ae72c4de8..0df5f757f8c4189e994578f653bc5f07ccfc704e 100644 (file)
@@ -22,7 +22,6 @@
 #include <grub/types.h>
 #include <grub/err.h>
 #include <grub/symbol.h>
-#include <grub/machine/machine.h>
 
 extern grub_addr_t EXPORT_VAR(grub_os_area_addr);
 extern grub_size_t EXPORT_VAR(grub_os_area_size);
diff --git a/include/grub/i386/pc/machine.h b/include/grub/i386/pc/machine.h
deleted file mode 100644 (file)
index e6de728..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- *  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_PCBIOS    1
-
-#endif /* ! GRUB_MACHINE_MACHINE_HEADER */
index 8153904822bdfda7d638da9190fe86f9f25f29be..4ce3a6283f0ece01da62f10b716c284c4e46c256 100644 (file)
@@ -21,7 +21,6 @@
 #define GRUB_MEMORY_MACHINE_HEADER     1
 
 #include <grub/symbol.h>
-#include <grub/machine/machine.h>
 #ifndef ASM_FILE
 #include <grub/types.h>
 #include <grub/err.h>
diff --git a/include/grub/i386/qemu/machine.h b/include/grub/i386/qemu/machine.h
deleted file mode 100644 (file)
index b57932b..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2009  Free Software Foundation, Inc.
- *
- *  GRUB is free software: you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  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_QEMU      1
-
-#endif /* ! GRUB_MACHINE_MACHINE_HEADER */
diff --git a/include/grub/powerpc/ieee1275/machine.h b/include/grub/powerpc/ieee1275/machine.h
deleted file mode 100644 (file)
index 66da1d9..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- *  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_IEEE1275  1
-
-#endif /* ! GRUB_MACHINE_MACHINE_HEADER */
diff --git a/include/grub/sparc64/ieee1275/machine.h b/include/grub/sparc64/ieee1275/machine.h
deleted file mode 100644 (file)
index 66da1d9..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- *  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_IEEE1275  1
-
-#endif /* ! GRUB_MACHINE_MACHINE_HEADER */
index 4dcd843de6e39816fd428f537ef141dedaa7e987..115fbd95e869197de92c9620c72817e16dfad5fd 100644 (file)
 
 #include <grub/types.h>
 #include <grub/symbol.h>
-#include <grub/machine/time.h>
 #include <grub/cpu/time.h>
 
+#ifdef GRUB_MACHINE_EMU
+#define GRUB_TICKS_PER_SECOND 100000
+#else
+#include <grub/machine/time.h>
+#endif
+
 void EXPORT_FUNC(grub_millisleep) (grub_uint32_t ms);
 grub_uint64_t EXPORT_FUNC(grub_get_time_ms) (void);
 
diff --git a/include/grub/x86_64/efi/machine.h b/include/grub/x86_64/efi/machine.h
deleted file mode 100644 (file)
index 1600768..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- *  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 */
index 78ebc1e385ff56deb3a5d6a634bd290ca788e860..20ab1c5c244aeb769635e6dfe3a95eadf5924c5a 100644 (file)
--- a/kern/dl.c
+++ b/kern/dl.c
@@ -31,7 +31,6 @@
 #include <grub/file.h>
 #include <grub/env.h>
 #include <grub/cache.h>
-#include <grub/machine/machine.h>
 
 /* Platforms where modules are in a readonly area of memory.  */
 #if defined(GRUB_MACHINE_QEMU)
index 0bf4934fbf52e40ae4ee40ab5e67830704b0749a..550a2a60ad3e32bac097d35e4aff8848187ca636 100644 (file)
@@ -23,7 +23,6 @@
 #include <grub/machine/memory.h>
 #include <grub/machine/console.h>
 #include <grub/machine/kernel.h>
-#include <grub/machine/machine.h>
 #include <grub/types.h>
 #include <grub/err.h>
 #include <grub/dl.h>
index acc653c9eb89180a439d97edc85d40fdeee164aa..6f2202a671ab5fc5dc21be84945df78a12b10393 100644 (file)
@@ -23,7 +23,6 @@
 #include <grub/machine/init.h>
 #include <grub/machine/memory.h>
 #include <grub/memory.h>
-#include <grub/machine/machine.h>
 #include <grub/file.h>
 #include <grub/err.h>
 #include <grub/dl.h>
index 4bdb09b240b15f63115e64165918117a50d2fad5..82bfd6b9549a4b3b0a79a0d0038f7a807190f038 100644 (file)
@@ -17,7 +17,6 @@
  */
 
 #include <grub/loader.h>
-#include <grub/machine/machine.h>
 #include <grub/machine/memory.h>
 #include <grub/machine/loader.h>
 #include <grub/normal.h>
index 168e821c723e9e84ba956a01d4d1ba609fc32856..9078d0622df61dc4663d2a69c3316f022042198d 100644 (file)
@@ -17,7 +17,6 @@
  *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <grub/machine/machine.h>
 #include <grub/multiboot.h>
 #include <grub/multiboot2.h>
 #include <multiboot2.h>
index 1d74dbbc8e20377607ec70bd3b52f37086137d16..3f1c6d062e5c8abd684eb4cd480dc4923ae3a3b1 100644 (file)
@@ -16,7 +16,6 @@
  *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <grub/machine/machine.h>
 #include <grub/machine/memory.h>
 #include <grub/machine/serial.h>
 #include <grub/machine/console.h>
index 76b9bc3d4119ad375bc586448278e95f15cbd420..5d76c5e02a760ef7b3448dd8f0bea77b1d6dfcb6 100644 (file)
@@ -18,7 +18,6 @@
  */
 
 #include <grub/term.h>
-#include <grub/machine/machine.h>
 #include <grub/machine/console.h>
 #include <grub/time.h>
 #include <grub/cpu/io.h>
index 37e75311e54e7c44b604a09294b7e23c48b9702f..799ffbf857e6b9d012a6a4ab18eb01185899b285 100644 (file)
@@ -36,8 +36,6 @@
 #include <grub/mm.h>
 #include <grub/term.h>
 #include <grub/time.h>
-#include <grub/machine/time.h>
-#include <grub/machine/machine.h>
 
 /* Include malloc.h, only if memalign is available. It is known that
    memalign is declared in malloc.h in all systems, if present.  */