Merge tag 'syslinux-5.00-pre9' into for-hpa/elflink/firmware
authorMatt Fleming <matt.fleming@intel.com>
Mon, 5 Nov 2012 13:13:25 +0000 (13:13 +0000)
committerMatt Fleming <matt.fleming@intel.com>
Mon, 5 Nov 2012 13:21:04 +0000 (13:21 +0000)
This merge also includes the Syslinux-4.06 release.

Conflicts:
Makefile
com32/hdt/Makefile
com32/modules/Makefile
com32/samples/hello.c
mtools/Makefile

13 files changed:
1  2 
Makefile
com32/hdt/Makefile
com32/modules/Makefile
core/comboot.inc
core/elflink/load_env32.c
extlinux/Makefile
extlinux/main.c
libinstaller/Makefile
linux/Makefile
mk/elf.mk
mtools/Makefile
win32/Makefile
win64/Makefile

diff --cc Makefile
+++ b/Makefile
@@@ -111,24 -30,16 +111,26 @@@ include $(MAKEDIR)/syslinux.m
  # directories.
  #
  
- # List of module objects that should be installed for all derivatives
 +ifndef EFI_BUILD
  MODULES = memdisk/memdisk memdump/memdump.com modules/*.com \
        com32/menu/*.c32 com32/modules/*.c32 com32/mboot/*.c32 \
        com32/hdt/*.c32 com32/rosh/*.c32 com32/gfxboot/*.c32 \
        com32/sysdump/*.c32 com32/lua/src/*.c32 com32/chain/*.c32 \
        com32/lib/*.c32 com32/libutil/*.c32 com32/gpllib/*.c32 \
        com32/elflink/ldlinux/*.c32
 +else
 +# memdump is BIOS specific code exclude it for EFI
 +# FIXME: Prune other BIOS-centric modules
 +MODULES = com32/menu/*.c32 com32/modules/*.c32 com32/mboot/*.c32 \
 +      com32/hdt/*.c32 com32/rosh/*.c32 com32/gfxboot/*.c32 \
 +      com32/sysdump/*.c32 com32/lua/src/*.c32 com32/chain/*.c32 \
 +      com32/lib/*.c32 com32/libutil/*.c32 com32/gpllib/*.c32 \
 +      com32/elflink/ldlinux/*.c32
 +endif
  
+ # List of module objects that should be installed for all derivatives
+ INSTALLABLE_MODULES = $(filter-out com32/gpllib%,$(MODULES))
  # syslinux.exe is BTARGET so as to not require everyone to have the
  # mingw suite installed
  BTARGET  = version.gen version.h version.mk
@@@ -186,95 -86,19 +188,95 @@@ EXTBOOTINSTALL = $(INSTALLABLE_MODULES
  
  # Things to install in /tftpboot
  NETINSTALLABLE = core/pxelinux.0 gpxe/gpxelinux.0 \
-                $(MODULES)
+                $(INSTALLABLE_MODULES)
  
 -all:
 -      $(MAKE) all-local
 -      set -e ; for i in $(BSUBDIRS) $(ISUBDIRS) ; do $(MAKE) -C $$i $@ ; done
 -      -ls -l $(BOBJECTS) $(IOBJECTS)
 +endif # ifdef EFI_BUILD
  
 -all-local: $(BTARGET) $(ITARGET)
 +.PHONY: subdirs $(BSUBDIRS) $(ISUBDIRS)
 +
 +ifeq ($(HAVE_FIRMWARE),)
 +
 +firmware = bios efi32 efi64
 +
 +# If no firmware was specified the rest of MAKECMDGOALS applies to all
 +# firmware.
 +ifeq ($(filter $(firmware),$(MAKECMDGOALS)),)
 +all strip tidy clean dist spotless install installer: bios efi32 efi64
 +
 +else
 +
 +# Don't do anything for the rest of MAKECMDGOALS at this level. It
 +# will be handled for each of $(firmware).
 +strip tidy clean dist spotless install installer:
 +
 +endif
 +
 +# Convert 'make bios strip' to 'make strip', etc for rest of the Makefiles.
 +MAKECMDGOALS := $(filter-out $(firmware),$(MAKECMDGOALS))
 +ifeq ($(MAKECMDGOALS),)
 +      MAKECMDGOALS += all
 +endif
 +
 +#
 +# You'd think that we'd be able to use the 'define' directive to
 +# abstract the code for invoking make(1) in the output directory, but
 +# by using 'define' we lose the ability to build in parallel.
 +#
 +.PHONY: $(firmware)
 +bios:
 +      @mkdir -p $(OBJ)/bios
 +      $(MAKE) -C $(OBJ)/bios -f $(SRC)/Makefile SRC="$(SRC)" \
 +              objdir=$(OBJ)/bios OBJ=$(OBJ)/bios HAVE_FIRMWARE=1 \
 +              ARCH=i386 $(MAKECMDGOALS)
 +
 +efi32:
 +      @mkdir -p $(OBJ)/efi32
 +      $(MAKE) -C $(OBJ)/efi32 -f $(SRC)/Makefile SRC="$(SRC)" \
 +              objdir=$(OBJ)/efi32 OBJ=$(OBJ)/efi32 HAVE_FIRMWARE=1 \
 +              ARCH=i386 BITS=32 EFI_BUILD=1 $(MAKECMDGOALS)
 +
 +efi64:
 +      @mkdir -p $(OBJ)/efi64
 +      $(MAKE) -C $(OBJ)/efi64 -f $(SRC)/Makefile SRC="$(SRC)" \
 +              objdir=$(OBJ)/efi64 OBJ=$(OBJ)/efi64 HAVE_FIRMWARE=1 \
 +              ARCH=x86_64 BITS=64 EFI_BUILD=1 $(MAKECMDGOALS)
  
 -installer:
 -      $(MAKE) installer-local
 -      set -e ; for i in $(ISUBDIRS); do $(MAKE) -C $$i all ; done
 +else # ifeq($(HAVE_FIRMWARE),)
 +
 +all: all-local subdirs
 +
 +all-local: $(BTARGET) $(ITARGET)
        -ls -l $(BOBJECTS) $(IOBJECTS)
 +subdirs: $(BSUBDIRS) $(ISUBDIRS)
 +
 +$(sort $(ISUBDIRS) $(BSUBDIRS)):
 +      @mkdir -p $@
 +      $(MAKE) -C $@ SRC="$(SRC)/$@" OBJ="$(OBJ)/$@" \
 +              -f $(SRC)/$@/Makefile $(MAKECMDGOALS)
 +
 +$(ITARGET):
 +      @mkdir -p $@
 +      $(MAKE) -C $@ SRC="$(SRC)/$@" OBJ="$(OBJ)/$@" \
 +              -f $(SRC)/$@/Makefile $(MAKECMDGOALS)
 +
 +$(BINFILES):
 +      @mkdir -p $@
 +      $(MAKE) -C $@ SRC="$(SRC)/$@" OBJ="$(OBJ)/$@" \
 +              -f $(SRC)/$@/Makefile $(MAKECMDGOALS)
 +
 +#
 +# List the dependencies to help out parallel builds.
 +dos extlinux linux mtools win32 win64: libinstaller
 +libinstaller: core
 +utils: mbr
 +core: com32
 +efi: core
 +
 +installer: installer-local
 +      set -e; for i in $(ISUBDIRS); \
 +              do $(MAKE) -C $$i SRC="$(SRC)/$$i" OBJ="$(OBJ)/$$i" \
 +              -f $(SRC)/$$i/Makefile all; done
 +
  
  installer-local: $(ITARGET) $(BINFILES)
  
  ## Hardware Detection Tool
  ##
  
 -topdir = ../..
 -MAKEDIR = $(topdir)/mk
 +VPATH = $(SRC)
  include $(MAKEDIR)/elf.mk
  
 -LIBS      = ../libupload/libcom32upload.a
 -C_LIBS    += $(com32)/cmenu/libmenu/libmenu.c32
 +LIBS      = $(objdir)/com32/libupload/libcom32upload.a
- C_LIBS    += $(objdir)/com32/cmenu/libmenu/libmenu.c32 \
-            $(objdir)/com32/libutil/libutil_com.c32 \
-            $(objdir)/com32/lib/libcom32.c32 \
-            $(objdir)/com32/gpllib/libcom32gpl.c32
++C_LIBS    += $(objdir)/com32/cmenu/libmenu/libmenu.c32
  CFLAGS    += -I$(com32)/cmenu/libmenu -I$(com32)
  
  MODULES         = hdt.c32
  ## COM32 standard modules
  ##
  
- LIBS = $(objdir)/com32/gpllib/libcom32gpl.c32 \
-       $(objdir)/com32/lib/libcom32.c32 \
-       $(objdir)/com32/libutil/libutil_com.c32
 -topdir = ../..
 -MAKEDIR = $(topdir)/mk
 +VPATH = $(SRC)
  include $(MAKEDIR)/elf.mk
  
  MODULES         = config.c32 ethersel.c32 dmitest.c32 cpuidtest.c32 \
Simple merge
Simple merge
Simple merge
diff --cc extlinux/main.c
Simple merge
@@@ -4,24 -4,23 +4,27 @@@ BINFILES = bootsect_bin.c ldlinux_bin.
  
  PERL   = perl
  
 -all: $(BINFILES)
 +VPATH = $(SRC)
  
 -bootsect_bin.c: ../core/ldlinux.bss bin2c.pl
 -      $(PERL) bin2c.pl syslinux_bootsect < $< > $@
 +all: installer
  
 -ldlinux_bin.c: ../core/ldlinux.sys bin2c.pl
 -      $(PERL) bin2c.pl syslinux_ldlinux 512 < $< > $@
 +bootsect_bin.c: $(OBJ)/../core/ldlinux.bss bin2c.pl
 +      $(PERL) $(SRC)/bin2c.pl syslinux_bootsect < $< > $@
  
 -mbr_bin.c: ../mbr/mbr.bin bin2c.pl
 -      $(PERL) bin2c.pl syslinux_mbr < $< > $@
 +ldlinux_bin.c: $(OBJ)/../core/ldlinux.sys bin2c.pl
 +      $(PERL) $(SRC)/bin2c.pl syslinux_ldlinux 512 < $< > $@
  
 -gptmbr_bin.c: ../mbr/gptmbr.bin bin2c.pl
 -      $(PERL) bin2c.pl syslinux_gptmbr < $< > $@
 +mbr_bin.c: $(OBJ)/../mbr/mbr.bin bin2c.pl
 +      $(PERL) $(SRC)/bin2c.pl syslinux_mbr < $< > $@
 +
 +gptmbr_bin.c: $(OBJ)/../mbr/gptmbr.bin bin2c.pl
 +      $(PERL) $(SRC)/bin2c.pl syslinux_gptmbr < $< > $@
 +
 +installer: $(BINFILES)
  
+ ldlinuxc32_bin.c: ../com32/elflink/ldlinux/ldlinux.c32 bin2c.pl
+       $(PERL) bin2c.pl syslinux_ldlinuxc32 < $< > $@
  tidy:
        rm -f $(BINFILES)
  
diff --cc linux/Makefile
Simple merge
diff --cc mk/elf.mk
Simple merge
diff --cc mtools/Makefile
@@@ -12,7 -14,8 +12,8 @@@ SRCS     = syslinux.c 
           ../libinstaller/setadv.c \
           ../libinstaller/bootsect_bin.c \
           ../libinstaller/ldlinux_bin.c \
 -         $(wildcard ../libfat/*.c)
+          ../libinstaller/ldlinuxc32_bin.c \
 +         $(wildcard $(SRC)/../libfat/*.c)
  OBJS   = $(patsubst %.c,%.o,$(notdir $(SRCS)))
  
  .SUFFIXES: .c .o .i .s .S
diff --cc win32/Makefile
@@@ -57,8 -56,9 +57,9 @@@ LIBSRC   = ../libinstaller/fs.c 
           ../libinstaller/getopt/getopt_long.c \
           ../libinstaller/bootsect_bin.c \
           ../libinstaller/ldlinux_bin.c \
+          ../libinstaller/ldlinuxc32_bin.c \
           ../libinstaller/mbr_bin.c \
 -         $(wildcard ../libfat/*.c)
 +         $(wildcard $(SRC)/../libfat/*.c)
  LIBOBJS  = $(patsubst %.c,%.obj,$(notdir $(LIBSRC)))
  
  LIB    = syslinux.lib
diff --cc win64/Makefile
@@@ -47,8 -46,9 +47,9 @@@ LIBSRC   = ../libinstaller/fs.c 
           ../libinstaller/getopt/getopt_long.c \
           ../libinstaller/bootsect_bin.c \
           ../libinstaller/ldlinux_bin.c \
+          ../libinstaller/ldlinuxc32_bin.c \
           ../libinstaller/mbr_bin.c \
 -         $(wildcard ../libfat/*.c)
 +         $(wildcard $(SRC)/../libfat/*.c)
  LIBOBJS  = $(patsubst %.c,%.obj,$(notdir $(LIBSRC)))
  
  LIB    = syslinux.lib