]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Merge emu-mod into emu-modload
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sun, 7 Feb 2010 16:52:11 +0000 (17:52 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sun, 7 Feb 2010 16:52:11 +0000 (17:52 +0100)
1  2 
Makefile.in
conf/any-emu.rmk
util/grub-emu.c
util/hostdisk.c
util/misc.c

diff --cc Makefile.in
Simple merge
index ad71f06bde6e1a8885e7cddefa49fea020144ec9,a4ee9b755b461128fb7164711a700af332728d96..48d1035b308c1a65b296605678b05bdb6353e52f
@@@ -6,7 -6,7 +6,6 @@@ COMMON_CFLAGS += -nostdinc -isystem $(s
  # Used by various components.  These rules need to precede them.
  script/lexer.c_DEPENDENCIES = grub_script.tab.h
  
- #sbin_UTILITIES += grub-emu
 -util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
  kernel_img_RELOCATABLE = yes
  pkglib_PROGRAMS = kernel.img
  kernel_img_SOURCES = kern/device.c kern/disk.c kern/dl.c  kern/env.c  \
        kern/rescue_reader.c kern/rescue_parser.c                       \
        \
        util/console.c  util/grub-emu.c util/misc.c                     \
 -      util/hostdisk.c util/getroot.c                                  \
 +      util/hostdisk.c util/getroot.c util/mm.c                        \
        \
 -      grub_emu_init.c gnulib/progname.c util/hostfs.c disk/host.c
 -kernel_img_CFLAGS = $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -Wno-undef -I$(srcdir)/gnulib
 +      gnulib/progname.c util/hostfs.c disk/host.c
 +kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
 +      env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
 +      partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
 +      list.h handler.h command.h i18n.h env_private.h
 +kernel_img_CFLAGS = $(CPPFLAGS) $(CFLAGS) -Wno-undef
  kernel_img_LDFLAGS = $(COMMON_LDFLAGS)
  TARGET_NO_STRIP = yes
 -TARGET_NO_DYNAMIC_MODULES = yes
 +
 +ifneq ($(TARGET_NO_MODULES), yes)
 +kernel_img_SOURCES += symlist.c kern/$(target_cpu)/dl.c
 +ifneq ($(target_cpu), i386)
 +ifneq ($(target_cpu), x86_64)
 +kernel_img_SOURCES += kern/$(target_cpu)/cache.S
 +endif
 +endif
 +else
 +kernel_img_SOURCES += grub_emu_init.c
- grub_emu_init.c_DEPENDENCIES = grub_emu_init.h
 +endif
 +
 +# For boot.mod.
 +pkglib_MODULES += boot.mod
 +boot_mod_SOURCES = commands/boot.c lib/i386/pc/biosnum.c
 +boot_mod_CFLAGS = $(COMMON_CFLAGS)
 +boot_mod_LDFLAGS = $(COMMON_LDFLAGS)
  
  # For reboot.mod.
  pkglib_MODULES += reboot.mod
@@@ -79,10 -58,9 +77,10 @@@ endi
  ifeq ($(enable_grub_emu_sdl), yes)
  pkglib_MODULES += sdl.mod
  sdl_mod_SOURCES = util/sdl.c
- sdl_mod_CFLAGS = $(COMMON_CFLAGS)
+ sdl_mod_CFLAGS = 
  sdl_mod_LDFLAGS = $(COMMON_LDFLAGS)
  grub_emu_LDFLAGS += $(LIBSDL)
 +kernel_img_HEADERS += sdl.h
  endif
  
  ifeq ($(enable_grub_emu_pci), yes)
@@@ -106,7 -76,7 +104,7 @@@ grub_emu_init.h: genemuinitheader.sh $(
        rm -f $@; echo $(pkglib_MODULES) | sh $(srcdir)/genemuinitheader.sh $(NM)  > $@
  DISTCLEANFILES += grub_emu_init.h
  
--grub_emu_init.c: genemuinit.sh $(pkglib_MODULES)
++grub_emu_init.c: genemuinit.sh $(pkglib_MODULES) grub_emu_init.h
        rm -f $@; echo $(pkglib_MODULES) | sh $(srcdir)/genemuinit.sh $(NM) > $@
  DISTCLEANFILES += grub_emu_init.c
  
diff --cc util/grub-emu.c
index fadb7938558a65d67b9801c6e8d72b23731f1c5a,7d4544509a36d6030e26fa9d0a780ff57bd1eb78..8660f0aa006a85b660fefff02be4bb0bc3806595
@@@ -150,6 -150,6 +150,10 @@@ void grub_hostfs_init (void)
  void grub_hostfs_fini (void);
  void grub_host_init (void);
  void grub_host_fini (void);
++#if GRUB_NO_MODULES
++void grub_init_all (void);
++void grub_fini_all (void);
++#endif
  
  int
  main (int argc, char *argv[])
diff --cc util/hostdisk.c
Simple merge
diff --cc util/misc.c
index 6182f138ea5c4404e78d89df6fde2110def8e674,7381c8fdde9433db0313ba3e0424a243ab0541a5..ca22d192540b9ec6f15a1449f0bbd35750381500
@@@ -35,6 -35,6 +35,7 @@@
  #endif
  
  #include <grub/kernel.h>
++#include <grub/dl.h>
  #include <grub/misc.h>
  #include <grub/cache.h>
  #include <grub/util/misc.h>