Index: bootcd/isolinux/syslinux-6.03/mk/build.mk
===================================================================
--- bootcd/isolinux/syslinux-6.03/mk/build.mk	(revision e16e8f2a41938d263af54a9fd6b4020d6c0d69fa)
+++ bootcd/isolinux/syslinux-6.03/mk/build.mk	(revision e16e8f2a41938d263af54a9fd6b4020d6c0d69fa)
@@ -0,0 +1,33 @@
+## -*- makefile -*- ------------------------------------------------------
+##
+##   Copyright 2001-2008 H. Peter Anvin - All Rights Reserved
+##
+##   This program 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, Inc., 53 Temple Place Ste 330,
+##   Boston MA 02111-1307, USA; either version 2 of the License, or
+##   (at your option) any later version; incorporated herein by reference.
+##
+## -----------------------------------------------------------------------
+
+##
+## Right now we don't distinguish between "build" system and the "host"
+## system, although we really should...
+##
+include $(MAKEDIR)/syslinux.mk
+
+OPTFLAGS   = -g -Os
+INCLUDES   =
+CFLAGS     = -W -Wall -Wno-sign-compare -D_FILE_OFFSET_BITS=64 \
+             $(OPTFLAGS) $(INCLUDES)
+LDFLAGS    =
+LIBS	   =
+
+.SUFFIXES: .c .o .S .s .i .elf .com .bin .asm .lst .c32 .lss
+
+%.o: %.c
+	$(CC) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $<
+%.i: %.c
+	$(CC) $(UMAKEDEPS) $(CFLAGS) -E -o $@ $<
+%.s: %.c
+	$(CC) $(UMAKEDEPS) $(CFLAGS) -S -o $@ $<
Index: bootcd/isolinux/syslinux-6.03/mk/com32.mk
===================================================================
--- bootcd/isolinux/syslinux-6.03/mk/com32.mk	(revision e16e8f2a41938d263af54a9fd6b4020d6c0d69fa)
+++ bootcd/isolinux/syslinux-6.03/mk/com32.mk	(revision e16e8f2a41938d263af54a9fd6b4020d6c0d69fa)
@@ -0,0 +1,118 @@
+## -*- makefile -*- -------------------------------------------------------
+##
+##   Copyright 2008-2009 H. Peter Anvin - All Rights Reserved
+##   Copyright 2009 Intel Corporation; author: H. Peter Anvin
+##
+##   This program 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, Inc., 51 Franklin St, Fifth Floor,
+##   Boston MA 02110-1301, USA; either version 2 of the License, or
+##   (at your option) any later version; incorporated herein by reference.
+##
+## -----------------------------------------------------------------------
+
+##
+## COM32 common configurables
+##
+
+include $(MAKEDIR)/syslinux.mk
+
+# Support IA32 and x86_64 platforms with one build
+# Set up architecture specifics; for cross compilation, set ARCH as apt
+GCCOPT := $(call gcc_ok,-std=gnu99,)
+ifeq ($(strip $(ARCH)),i386)
+	GCCOPT += $(call gcc_ok,-m32,)
+	GCCOPT += $(call gcc_ok,-march=i386)
+	GCCOPT += $(call gcc_ok,-mpreferred-stack-boundary=2,)
+	GCCOPT += $(call gcc_ok,-incoming-stack-boundary=2,)
+endif
+ifeq ($(strip $(ARCH)),x86_64)
+	GCCOPT += $(call gcc_ok,-m64,)
+	GCCOPT += $(call gcc_ok,-march=x86-64)
+	#let the stack-boundary default to whatever it is on 64bit
+	#GCCOPT += $(call gcc_ok,-mpreferred-stack-boundary=8,)
+	#GCCOPT += $(call gcc_ok,-incoming-stack-boundary=8,)
+endif
+GCCOPT += $(call gcc_ok,-fno-stack-protector,)
+GCCOPT += $(call gcc_ok,-fwrapv,)
+GCCOPT += $(call gcc_ok,-freg-struct-return,)
+GCCOPT += -Os
+# Note -fPIE does not work with ld on x86_64, try -fPIC instead
+# Does BIOS build require -fPIE?
+GCCOPT += $(call gcc_ok,-fPIC)
+GCCOPT += $(call gcc_ok,-fno-exceptions,)
+GCCOPT += $(call gcc_ok,-fno-asynchronous-unwind-tables,)
+GCCOPT += $(call gcc_ok,-fno-strict-aliasing,)
+GCCOPT += $(call gcc_ok,-falign-functions=0,-malign-functions=0)
+GCCOPT += $(call gcc_ok,-falign-jumps=0,-malign-jumps=0)
+GCCOPT += $(call gcc_ok,-falign-labels=0,-malign-labels=0)
+GCCOPT += $(call gcc_ok,-falign-loops=0,-malign-loops=0)
+
+ifndef EFI_BUILD
+GCCOPT += -mregparm=3 -DREGPARM=3
+endif
+
+com32  := $(topdir)/com32
+RELOCS := $(com32)/tools/relocs
+
+ifneq ($(NOGPL),1)
+GPLLIB     = $(com32)/gpllib/libcom32gpl.a
+GPLINCLUDE = -I$(com32)/gplinclude
+else
+GPLLIB     =
+GPLINCLUDE =
+endif
+
+CFLAGS     = $(GCCOPT) $(GCCWARN) \
+	     -fomit-frame-pointer -D__COM32__ -D__FIRMWARE_$(FIRMWARE)__ \
+	     -nostdinc -iwithprefix include \
+	     -I$(com32)/libutil/include -I$(com32)/include \
+	     -I$(com32)/include/sys $(GPLINCLUDE)
+SFLAGS     = $(GCCOPT) $(GCCWARN) \
+	     -fomit-frame-pointer -D__COM32__ -D__FIRMWARE_$(FIRMWARE)__ \
+	     -nostdinc -iwithprefix include \
+	     -I$(com32)/libutil/include -I$(com32)/include \
+	     -I$(com32)/include/sys $(GPLINCLUDE)
+
+COM32LD	   = $(com32)/lib/$(ARCH)/elf.ld
+LDFLAGS    = -m elf_$(ARCH) -shared --hash-style=gnu -T $(COM32LD)
+LIBGCC    := $(shell $(CC) $(GCCOPT) --print-libgcc)
+
+LNXCFLAGS  = -I$(com32)/libutil/include $(GCCWARN) -O -g \
+	     -D_GNU_SOURCE -D_FORTIFY_SOURCE=0 -Wno-error
+LNXSFLAGS  = -g
+LNXLDFLAGS = -g
+
+C_LIBS	   = $(GPLLIB) $(com32)/lib/libcom32.c32 $(LIBGCC)
+C_LNXLIBS  = $(com32)/libutil/libutil_lnx.a
+
+.SUFFIXES: .lss .c .lo .o .elf .c32 .lnx
+
+.PRECIOUS: %.o
+%.o: %.S
+	$(CC) $(MAKEDEPS) $(SFLAGS) -c -o $@ $<
+
+.PRECIOUS: %.o
+%.o: %.c
+	$(CC) $(MAKEDEPS) $(CFLAGS) -c -o $@ $<
+
+.PRECIOUS: %.elf
+%.elf: %.o $(LIBS) $(C_LIBS) $(COM32LD)
+	$(LD) $(LDFLAGS) -o $@ $(filter-out $(COM32LD),$^)
+
+.PRECIOUS: %.lo
+%.lo: %.S
+	$(CC) $(MAKEDEPS) $(LNXSFLAGS) -c -o $@ $<
+
+.PRECIOUS: %.lo
+%.lo: %.c
+	$(CC) $(MAKEDEPS) $(LNXCFLAGS) -c -o $@ $<
+
+.PRECIOUS: %.lnx
+%.lnx: %.lo $(LNXLIBS) $(C_LNXLIBS)
+	$(CC) $(LNXCFLAGS) -o $@ $^
+
+%.c32: %.elf
+	$(OBJCOPY) --strip-debug --strip-unneeded $< $@
+	##$(OBJCOPY) -O binary $< $@
+	##$(RELOCS) $< >> $@ || ( rm -f $@ ; false )
Index: bootcd/isolinux/syslinux-6.03/mk/efi.mk
===================================================================
--- bootcd/isolinux/syslinux-6.03/mk/efi.mk	(revision e16e8f2a41938d263af54a9fd6b4020d6c0d69fa)
+++ bootcd/isolinux/syslinux-6.03/mk/efi.mk	(revision e16e8f2a41938d263af54a9fd6b4020d6c0d69fa)
@@ -0,0 +1,67 @@
+include $(MAKEDIR)/syslinux.mk
+
+com32 = $(topdir)/com32
+core = $(topdir)/core
+
+# Support IA32 and x86_64 platforms with one build
+# Set up architecture specifics; for cross compilation, set ARCH as apt
+# gnuefi sets up architecture specifics in ia32 or x86_64 sub directories
+# set up the LIBDIR and EFIINC for building for the appropriate architecture
+GCCOPT := $(call gcc_ok,-fno-stack-protector,)
+EFIINC = $(objdir)/include/efi
+LIBDIR  = $(objdir)/lib
+
+ifeq ($(ARCH),i386)
+	ARCHOPT = -m32 -march=i386
+	EFI_SUBARCH = ia32
+endif
+ifeq ($(ARCH),x86_64)
+	ARCHOPT = -m64 -march=x86-64
+	EFI_SUBARCH = $(ARCH)
+endif
+
+#LIBDIR=/usr/lib
+FORMAT=efi-app-$(EFI_SUBARCH)
+
+CFLAGS = -I$(EFIINC) -I$(EFIINC)/$(EFI_SUBARCH) \
+		-DEFI_FUNCTION_WRAPPER -fPIC -fshort-wchar -ffreestanding \
+		-Wall -I$(com32)/include -I$(com32)/include/sys \
+		-I$(core)/include -I$(core)/ $(ARCHOPT) \
+		-I$(com32)/lib/ -I$(com32)/libutil/include -std=gnu99 \
+		-DELF_DEBUG -DSYSLINUX_EFI -I$(objdir) \
+		$(GCCWARN) -D__COM32__ -D__FIRMWARE_$(FIRMWARE)__ -mno-red-zone \
+		-DLDLINUX=\"$(LDLINUX)\" -fvisibility=hidden \
+		-Wno-unused-parameter $(GCCOPT)
+
+CRT0 := $(LIBDIR)/crt0-efi-$(EFI_SUBARCH).o
+LDSCRIPT := $(LIBDIR)/elf_$(EFI_SUBARCH)_efi.lds
+
+LDFLAGS = -T $(SRC)/$(ARCH)/syslinux.ld -Bsymbolic -pie -nostdlib -znocombreloc \
+		-L$(LIBDIR) --hash-style=gnu -m elf_$(ARCH) $(CRT0) -E
+
+SFLAGS     = $(GCCOPT) $(GCCWARN) $(ARCHOPT) \
+	     -fomit-frame-pointer -D__COM32__ -D__FIRMWARE_$(FIRMWARE)__ \
+	     -nostdinc -iwithprefix include \
+	     -I$(com32)/libutil/include -I$(com32)/include -I$(com32)/include/sys $(GPLINCLUDE)
+
+LIBEFI = $(objdir)/lib/libefi.a
+
+$(LIBEFI):
+	@echo Building gnu-efi for $(EFI_SUBARCH)
+	$(topdir)/efi/check-gnu-efi.sh $(EFI_SUBARCH) $(objdir)
+
+%.o: %.S	# Cancel old rule
+
+%.o: %.c
+
+.PRECIOUS: %.o
+%.o: %.S $(LIBEFI)
+	$(CC) $(SFLAGS) -c -o $@ $<
+
+.PRECIOUS: %.o
+%.o: %.c $(LIBEFI)
+	$(CC) $(CFLAGS) -c -o $@ $<
+
+#%.efi: %.so
+#	$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel \
+#		-j .rela -j .reloc --target=$(FORMAT) $*.so $@
Index: bootcd/isolinux/syslinux-6.03/mk/elf.mk
===================================================================
--- bootcd/isolinux/syslinux-6.03/mk/elf.mk	(revision e16e8f2a41938d263af54a9fd6b4020d6c0d69fa)
+++ bootcd/isolinux/syslinux-6.03/mk/elf.mk	(revision e16e8f2a41938d263af54a9fd6b4020d6c0d69fa)
@@ -0,0 +1,107 @@
+## -*- makefile -*- -------------------------------------------------------
+##   
+##   Copyright 2008 H. Peter Anvin - All Rights Reserved
+##
+##   This program 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, Inc., 51 Franklin St, Fifth Floor,
+##   Boston MA 02110-1301, USA; either version 2 of the License, or
+##   (at your option) any later version; incorporated herein by reference.
+##
+## -----------------------------------------------------------------------
+
+##
+## ELF common configurables
+##
+
+include $(MAKEDIR)/syslinux.mk
+
+# Support IA32 and x86_64 platforms with one build
+# Set up architecture specifics; for cross compilation, set ARCH as apt
+GCCOPT := $(call gcc_ok,-std=gnu99,)
+ifeq ($(ARCH),i386)
+	GCCOPT += $(call gcc_ok,-m32,)
+	GCCOPT += $(call gcc_ok,-march=i386)
+	GCCOPT += $(call gcc_ok,-mpreferred-stack-boundary=2,)
+endif
+ifeq ($(ARCH),x86_64)
+	GCCOPT += $(call gcc_ok,-m64,)
+	GCCOPT += $(call gcc_ok,-march=x86-64)
+	#let preferred-stack-boundary be default (=4)
+endif
+GCCOPT += -Os -fomit-frame-pointer
+GCCOPT += $(call gcc_ok,-fno-stack-protector,)
+GCCOPT += $(call gcc_ok,-fwrapv,)
+GCCOPT += $(call gcc_ok,-freg-struct-return,)
+GCCOPT += $(call gcc_ok,-fno-exceptions,)
+GCCOPT += $(call gcc_ok,-fno-asynchronous-unwind-tables,)
+# Note -fPIE does not work with ld on x86_64, try -fPIC instead
+# Does BIOS build depend on -fPIE?
+GCCOPT += $(call gcc_ok,-fPIC)
+GCCOPT += $(call gcc_ok,-falign-functions=0,-malign-functions=0)
+GCCOPT += $(call gcc_ok,-falign-jumps=0,-malign-jumps=0)
+GCCOPT += $(call gcc_ok,-falign-labels=0,-malign-labels=0)
+GCCOPT += $(call gcc_ok,-falign-loops=0,-malign-loops=0)
+
+com32 = $(topdir)/com32
+core = $(topdir)/core
+
+ifneq ($(NOGPL),1)
+GPLLIB     = $(objdir)/com32/gpllib/libgpl.c32
+GPLINCLUDE = -I$(com32)/gplinclude
+else
+GPLLIB     =
+GPLINCLUDE =
+endif
+
+CFLAGS     = $(GCCOPT) $(GCCWARN) -W -Wall \
+	     -fomit-frame-pointer -D__COM32__ -D__FIRMWARE_$(FIRMWARE)__ -DDYNAMIC_MODULE \
+	     -nostdinc -iwithprefix include \
+	     -I$(com32)/libutil/include -I$(com32)/include \
+		-I$(com32)/include/sys $(GPLINCLUDE) -I$(core)/include \
+		-I$(objdir) -DLDLINUX=\"$(LDLINUX)\"
+ifndef EFI_BUILD
+CFLAGS	  += -mregparm=3 -DREGPARM=3
+endif
+
+SFLAGS     = $(GCCOPT) -D__COM32__ -D__FIRMWARE_$(FIRMWARE)__ 
+LDFLAGS    = -m elf_$(ARCH) -shared --hash-style=gnu -T $(com32)/lib/$(ARCH)/elf.ld --as-needed
+LIBGCC    := $(shell $(CC) $(GCCOPT) --print-libgcc)
+
+LNXCFLAGS  = -I$(com32)/libutil/include -W -Wall -O -g -D_GNU_SOURCE
+LNXSFLAGS  = -g
+LNXLDFLAGS = -g
+
+C_LIBS	   += $(objdir)/com32/libutil/libutil.c32 $(GPLLIB) \
+	     $(objdir)/com32/lib/libcom32.c32
+C_LNXLIBS  = $(objdir)/com32/libutil/libutil_lnx.a \
+	     $(objdir)/com32/elflink/ldlinux/ldlinux_lnx.a
+
+.SUFFIXES: .lss .c .o
+
+.PRECIOUS: %.o
+%.o: %.S
+	$(CC) $(SFLAGS) -c -o $@ $<
+
+.PRECIOUS: %.o
+%.o: %.c
+	$(CC) $(CFLAGS) -c -o $@ $<
+
+.PRECIOUS: %.lo
+%.lo: %.S
+	$(CC) $(LNXSFLAGS) -c -o $@ $<
+
+.PRECIOUS: %.lo
+%.lo: %.c
+	$(CC) $(LNXCFLAGS) -c -o $@ $<
+
+.PRECIOUS: %.lnx
+%.lnx: %.lo $(LNXLIBS) $(C_LNXLIBS)
+	$(CC) $(LNXCFLAGS) -o $@ $^
+
+.PRECIOUS: %.elf
+%.elf: %.o $(C_LIBS)
+	$(LD) $(LDFLAGS) -o $@ $^
+
+%.c32: %.elf
+	$(OBJCOPY) --strip-debug --strip-unneeded $< $@
Index: bootcd/isolinux/syslinux-6.03/mk/embedded.mk
===================================================================
--- bootcd/isolinux/syslinux-6.03/mk/embedded.mk	(revision e16e8f2a41938d263af54a9fd6b4020d6c0d69fa)
+++ bootcd/isolinux/syslinux-6.03/mk/embedded.mk	(revision e16e8f2a41938d263af54a9fd6b4020d6c0d69fa)
@@ -0,0 +1,75 @@
+## -*- makefile -*- ------------------------------------------------------
+##
+##   Copyright 2001-2008 H. Peter Anvin - All Rights Reserved
+##
+##   This program 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, Inc., 53 Temple Place Ste 330,
+##   Boston MA 02111-1307, USA; either version 2 of the License, or
+##   (at your option) any later version; incorporated herein by reference.
+##
+## -----------------------------------------------------------------------
+
+##
+## Make configuration for embedded directories
+##
+
+include $(MAKEDIR)/syslinux.mk
+
+# Support IA32 and x86_64 platforms with one build
+# Set up architecture specifics; for cross compilation, set ARCH as apt
+# Initialize GCCOPT to null to begin with. Without this, make generates
+# recursive error for GCCOPT
+GCCOPT :=
+ifeq ($(ARCH),i386)
+	GCCOPT := $(call gcc_ok,-m32)
+	GCCOPT += $(call gcc_ok,-march=i386)
+	GCCOPT    += $(call gcc_ok,-mpreferred-stack-boundary=2,)
+	GCCOPT    += $(call gcc_ok,-mincoming-stack-boundary=2,)
+endif
+ifeq ($(ARCH),x86_64)
+	GCCOPT := $(call gcc_ok,-m64)
+	GCCOPT += $(call gcc_ok,-march=x86-64)
+	#let preferred-stack-boundary and incoming-stack-boundary be default(=4)
+# Somewhere down the line ld barfs requiring -fPIC
+	GCCOPT += $(call gcc_ok,-fPIC)
+endif
+GCCOPT    += $(call gcc_ok,-ffreestanding,)
+GCCOPT	  += $(call gcc_ok,-fno-stack-protector,)
+GCCOPT	  += $(call gcc_ok,-fwrapv,)
+GCCOPT	  += $(call gcc_ok,-freg-struct-return,)
+ifdef EFI_BUILD
+GCCOPT    += -Os -fomit-frame-pointer -msoft-float
+else
+GCCOPT    += -Os -fomit-frame-pointer -mregparm=3 -DREGPARM=3 \
+             -msoft-float
+endif
+GCCOPT    += $(call gcc_ok,-fno-exceptions,)
+GCCOPT	  += $(call gcc_ok,-fno-asynchronous-unwind-tables,)
+GCCOPT	  += $(call gcc_ok,-fno-strict-aliasing,)
+GCCOPT	  += $(call gcc_ok,-falign-functions=0,-malign-functions=0)
+GCCOPT    += $(call gcc_ok,-falign-jumps=0,-malign-jumps=0)
+GCCOPT    += $(call gcc_ok,-falign-labels=0,-malign-labels=0)
+GCCOPT    += $(call gcc_ok,-falign-loops=0,-malign-loops=0)
+GCCOPT    += $(call gcc_ok,-fvisibility=hidden)
+
+LIBGCC    := $(shell $(CC) $(GCCOPT) --print-libgcc)
+
+LD        += -m elf_$(ARCH)
+
+# Note: use += for CFLAGS and SFLAGS in case something is set in MCONFIG.local
+CFLAGS    += $(GCCOPT) -g $(GCCWARN) -Wno-sign-compare $(OPTFLAGS) $(INCLUDES)
+SFLAGS    += $(CFLAGS) -D__ASSEMBLY__
+
+.SUFFIXES: .c .o .S .s .i .elf .com .bin .asm .lst .c32 .lss
+
+%.o: %.c
+	$(CC) $(MAKEDEPS) $(CFLAGS) -c -o $@ $<
+%.i: %.c
+	$(CC) $(MAKEDEPS) $(CFLAGS) -E -o $@ $<
+%.s: %.c
+	$(CC) $(MAKEDEPS) $(CFLAGS) -S -o $@ $<
+%.o: %.S
+	$(CC) $(MAKEDEPS) $(SFLAGS) -Wa,-a=$*.lst -c -o $@ $<
+%.s: %.S
+	$(CC) $(MAKEDEPS) $(SFLAGS) -E -o $@ $<
Index: bootcd/isolinux/syslinux-6.03/mk/lib.mk
===================================================================
--- bootcd/isolinux/syslinux-6.03/mk/lib.mk	(revision e16e8f2a41938d263af54a9fd6b4020d6c0d69fa)
+++ bootcd/isolinux/syslinux-6.03/mk/lib.mk	(revision e16e8f2a41938d263af54a9fd6b4020d6c0d69fa)
@@ -0,0 +1,248 @@
+# -*- makefile -*-
+
+include $(MAKEDIR)/syslinux.mk
+
+# Support IA32 and x86_64 platforms with one build
+# Set up architecture specifics; for cross compilation, set ARCH as apt
+GCCOPT := $(call gcc_ok,-std=gnu99,)
+ifeq ($(ARCH),i386)
+	GCCOPT += $(call gcc_ok,-m32,)
+	GCCOPT += $(call gcc_ok,-mpreferred-stack-boundary=2,)
+	MARCH = i386
+endif
+ifeq ($(ARCH),x86_64)
+	GCCOPT += $(call gcc_ok,-m64,)
+	#let preferred-stack-boundary be default(=4)
+	MARCH = x86-64
+endif
+GCCOPT += $(call gcc_ok,-fno-stack-protector,)
+GCCOPT += $(call gcc_ok,-fwrapv,)
+GCCOPT += $(call gcc_ok,-freg-struct-return,)
+# Note -fPIE does not work with ld on x86_64, try -fPIC instead
+# Does BIOS build require -fPIE?
+GCCOPT += $(call gcc_ok,-fPIC)
+GCCOPT += $(call gcc_ok,-fno-exceptions,)
+GCCOPT += $(call gcc_ok,-fno-asynchronous-unwind-tables,)
+GCCOPT += $(call gcc_ok,-fno-strict-aliasing,)
+GCCOPT += $(call gcc_ok,-falign-functions=0,-malign-functions=0)
+GCCOPT += $(call gcc_ok,-falign-jumps=0,-malign-jumps=0)
+GCCOPT += $(call gcc_ok,-falign-labels=0,-malign-labels=0)
+GCCOPT += $(call gcc_ok,-falign-loops=0,-malign-loops=0)
+
+INCLUDE	= -I$(SRC)
+STRIP	= strip --strip-all -R .comment -R .note
+
+# zlib and libpng configuration flags
+LIBFLAGS = -DDYNAMIC_CRC_TABLE -DPNG_NO_CONSOLE_IO \
+	   -DPNG_NO_WRITE_SUPPORTED \
+	   -DPNG_NO_MNG_FEATURES \
+	   -DPNG_NO_READ_tIME -DPNG_NO_WRITE_tIME
+
+# We need some features in libpng which apparently aren't available in the
+# fixed-point versions.  It's OK, because we have to have a non-graphical
+# fallback anyway, just use that on old machines...
+# LIBFLAGS += -DPNG_NO_FLOATING_POINT_SUPPORTED
+
+REQFLAGS  = $(GCCOPT) -g -D__COM32__ -D__FIRMWARE_$(FIRMWARE)__ \
+	    -nostdinc -iwithprefix include -I. -I$(SRC)/sys \
+	    -I$(SRC)/../include -I$(com32)/include/sys \
+	    -I$(topdir)/core/include -I$(com32)/lib/ \
+	    -I$(com32)/lib/sys/module -I$(OBJ)/../..
+OPTFLAGS  = -Os -march=$(MARCH) -falign-functions=0 -falign-jumps=0 \
+	    -falign-labels=0 -ffast-math -fomit-frame-pointer
+WARNFLAGS = $(GCCWARN) -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline
+
+CFLAGS  = $(OPTFLAGS) $(REQFLAGS) $(WARNFLAGS) $(LIBFLAGS)
+
+ifndef EFI_BUILD
+CFLAGS += -mregparm=3 -DREGPARM=3
+endif
+
+VPATH = $(SRC)
+LIBOTHER_OBJS = \
+	atoi.o atol.o atoll.o calloc.o creat.o		\
+	fgets.o fprintf.o fputc.o	\
+	putchar.o				\
+	getopt.o getopt_long.o						\
+	lrand48.o stack.o memccpy.o memchr.o 		\
+	mempcpy.o memmem.o memmove.o memswap.o	\
+	perror.o qsort.o seed48.o \
+	srand48.o sscanf.o 						\
+	strerror.o errlist.o		\
+	strnlen.o							\
+	strncat.o strndup.o		\
+	stpncpy.o						\
+	strntoimax.o strsep.o strspn.o strstr.o				\
+	strtoimax.o strtok.o strtol.o strtoll.o strtoull.o		\
+	strtoumax.o vprintf.o vsprintf.o		\
+	asprintf.o vasprintf.o			\
+	vsscanf.o							\
+	skipspace.o							\
+	chrreplace.o							\
+	bufprintf.o							\
+	inet.o dhcppack.o dhcpunpack.o					\
+	strreplace.o							\
+	lstrdup.o						\
+	\
+	suffix_number.o							\
+	\
+	getcwd.o fdopendir.o	\
+	\
+	sys/line_input.o				\
+	sys/colortable.o sys/screensize.o				\
+	\
+	sys/stdcon_read.o sys/stdcon_write.o sys/rawcon_read.o		\
+	sys/rawcon_write.o		\
+	sys/null_read.o sys/null_write.o sys/serial_write.o		\
+	\
+	sys/xserial_write.o						\
+	\
+	sys/ansi.o							\
+	\
+	sys/ansicon_write.o sys/ansiserial_write.o			\
+	\
+	pci/cfgtype.o pci/scan.o pci/bios.o					\
+	pci/readb.o pci/readw.o pci/readl.o			\
+	pci/writeb.o pci/writew.o pci/writel.o	\
+	\
+	sys/x86_init_fpu.o math/pow.o math/strtod.o			\
+	syslinux/disk.o							\
+	\
+	syslinux/setup_data.o
+
+## CORE OBJECTS, INCLUDED IN THE ROOT COM32 MODULE
+LIBENTRY_OBJS = \
+	sys/intcall.o sys/farcall.o sys/cfarcall.o sys/zeroregs.o	\
+	sys/argv.o sys/sleep.o						\
+	sys/fileinfo.o sys/opendev.o sys/read.o sys/write.o sys/ftell.o \
+	sys/close.o sys/open.o sys/fileread.o sys/fileclose.o		\
+	sys/openmem.o					\
+	sys/isatty.o sys/fstat.o					\
+	\
+	dprintf.o vdprintf.o						\
+	\
+	syslinux/idle.o							\
+	\
+	exit.o
+
+LIBGCC_OBJS = \
+	libgcc/__ashldi3.o libgcc/__udivdi3.o			\
+	libgcc/__negdi2.o libgcc/__ashrdi3.o libgcc/__lshrdi3.o		\
+	libgcc/__muldi3.o libgcc/__udivmoddi4.o libgcc/__umoddi3.o	\
+	libgcc/__divdi3.o libgcc/__moddi3.o
+
+LIBCONSOLE_OBJS = \
+	\
+	sys/openconsole.o sys/line_input.o				\
+	sys/colortable.o sys/screensize.o				\
+	\
+	sys/stdcon_read.o sys/rawcon_read.o		\
+	sys/rawcon_write.o						\
+	sys/null_write.o sys/serial_write.o		\
+	\
+	sys/xserial_write.o						\
+	\
+	sys/ansi.o							\
+	\
+	sys/ansicon_write.o sys/ansiserial_write.o	\
+	\
+	syslinux/serial.o
+
+LIBLOAD_OBJS = \
+	syslinux/addlist.o syslinux/freelist.o syslinux/memmap.o	\
+	syslinux/movebits.o syslinux/shuffle.o syslinux/shuffle_pm.o	\
+	syslinux/shuffle_rm.o syslinux/biosboot.o syslinux/zonelist.o	\
+	syslinux/dump_mmap.o syslinux/dump_movelist.o			\
+	\
+	syslinux/run_default.o syslinux/run_command.o			\
+	syslinux/cleanup.o syslinux/localboot.o	syslinux/runimage.o	\
+	\
+	syslinux/loadfile.o syslinux/floadfile.o syslinux/zloadfile.o	\
+	\
+	syslinux/load_linux.o syslinux/initramfs.o			\
+	syslinux/initramfs_file.o syslinux/initramfs_loadfile.o		\
+	syslinux/initramfs_archive.o
+
+LIBMODULE_OBJS = \
+	sys/module/common.o sys/module/$(ARCH)/elf_module.o		\
+	sys/module/elfutils.o	\
+	sys/module/exec.o sys/module/elf_module.o
+
+# ZIP library object files
+LIBZLIB_OBJS = \
+	zlib/adler32.o zlib/compress.o zlib/crc32.o 			\
+	zlib/uncompr.o zlib/deflate.o zlib/trees.o zlib/zutil.o		\
+	zlib/inflate.o zlib/infback.o zlib/inftrees.o zlib/inffast.o	\
+	sys/zfile.o sys/zfopen.o
+
+MINLIBOBJS = \
+	$(addprefix $(OBJ)/,syslinux/ipappend.o \
+	syslinux/dsinfo.o \
+	$(LIBOTHER_OBJS) \
+	$(LIBGCC_OBJS) \
+	$(LIBCONSOLE_OBJS) \
+	$(LIBLOAD_OBJS) \
+	$(LIBZLIB_OBJS))
+#	$(LIBVESA_OBJS)
+
+CORELIBOBJS = \
+	memcpy.o memset.o memcmp.o printf.o strncmp.o vfprintf.o 	\
+	strlen.o vsnprintf.o snprintf.o stpcpy.o strcmp.o strdup.o 	\
+	strcpy.o strncpy.o setjmp.o fopen.o fread.o fread2.o puts.o 	\
+	strtoul.o strntoumax.o strcasecmp.o 				\
+	sprintf.o strlcat.o strchr.o strlcpy.o strncasecmp.o ctypes.o 	\
+	fputs.o fwrite2.o fwrite.o fgetc.o fclose.o lmalloc.o 		\
+	sys/err_read.o sys/err_write.o sys/null_read.o 			\
+	sys/stdcon_write.o						\
+	syslinux/memscan.o strrchr.o strcat.o				\
+	libgcc/__ashldi3.o libgcc/__udivdi3.o				\
+	libgcc/__negdi2.o libgcc/__ashrdi3.o libgcc/__lshrdi3.o		\
+	libgcc/__muldi3.o libgcc/__udivmoddi4.o libgcc/__umoddi3.o	\
+	libgcc/__divdi3.o libgcc/__moddi3.o				\
+	syslinux/debug.o						\
+	$(LIBENTRY_OBJS) \
+	$(LIBMODULE_OBJS)
+
+LDFLAGS	= -m elf_$(ARCH) --hash-style=gnu -T $(com32)/lib/$(ARCH)/elf.ld
+
+.SUFFIXES: .c .o .a .so .lo .i .S .s .ls .ss .lss
+
+% : %.c # Cancel default rule
+
+% : %.S
+
+%.o: %.c
+	$(CC) $(MAKEDEPS) $(CFLAGS) -c -o $@ $<
+
+.c.i:
+	$(CC) $(MAKEDEPS) $(CFLAGS) -E -o $@ $<
+
+%.s: %.c
+	$(CC) $(MAKEDEPS) $(CFLAGS) -S -o $@ $<
+
+%.o: %.S
+	$(CC) $(MAKEDEPS) $(CFLAGS) -D__ASSEMBLY__ -c -o $@ $<
+
+.S.s:
+	$(CC) $(MAKEDEPS) $(CFLAGS) -D__ASSEMBLY__ -E -o $@ $<
+
+.S.lo:
+	$(CC) $(MAKEDEPS) $(CFLAGS) $(SOFLAGS) -D__ASSEMBLY__ -c -o $@ $<
+
+.S.ls:
+	$(CC) $(MAKEDEPS) $(CFLAGS) $(SOFLAGS) -D__ASSEMBLY__ -E -o $@ $<
+
+%(OBJ)/%.o: $(SRC)/%.s
+	$(CC) $(MAKEDEPS) $(CFLAGS) -x assembler -c -o $@ $<
+
+.ls.lo:
+	$(CC) $(MAKEDEPS) $(CFLAGS) $(SOFLAGS) -x assembler -c -o $@ $<
+
+.c.lo:
+	$(CC) $(MAKEDEPS) $(CFLAGS) $(SOFLAGS) -c -o $@ $<
+
+.c.ls:
+	$(CC) $(MAKEDEPS) $(CFLAGS) $(SOFLAGS) -S -o $@ $<
+
+%.c32: %.elf
+	$(OBJCOPY) --strip-debug --strip-unneeded $< $@
Index: bootcd/isolinux/syslinux-6.03/mk/rosh.mk
===================================================================
--- bootcd/isolinux/syslinux-6.03/mk/rosh.mk	(revision e16e8f2a41938d263af54a9fd6b4020d6c0d69fa)
+++ bootcd/isolinux/syslinux-6.03/mk/rosh.mk	(revision e16e8f2a41938d263af54a9fd6b4020d6c0d69fa)
@@ -0,0 +1,27 @@
+## -*- makefile -*- -------------------------------------------------------
+##
+##   Copyright 2008 H. Peter Anvin - All Rights Reserved
+##
+##   This program 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, Inc., 51 Franklin St, Fifth Floor,
+##   Boston MA 02110-1301, USA; either version 2 of the License, or
+##   (at your option) any later version; incorporated herein by reference.
+##
+## -----------------------------------------------------------------------
+
+##
+## COM32 GRC configurables
+##
+
+## Include the COM32 common configurables
+include $(MAKEDIR)/elf.mk
+
+# CFLAGS     = $(GCCOPT) $(GCCWARN) -march=i386 \
+# 	     -fomit-frame-pointer -D__COM32__ -D__FIRMWARE_$(FIRMWARE)__ \
+# 	     -nostdinc -iwithprefix include \
+# 	     -I$(com32)/libutil/include -I$(com32)/include
+# 	 -g3 -dD
+
+# LNXCFLAGS  = -I$(com32)/libutil/include $(GCCWARN) -O -g3 -D_GNU_SOURCE -dD
+# 	 -U__GNUC__
Index: bootcd/isolinux/syslinux-6.03/mk/syslinux.mk
===================================================================
--- bootcd/isolinux/syslinux-6.03/mk/syslinux.mk	(revision e16e8f2a41938d263af54a9fd6b4020d6c0d69fa)
+++ bootcd/isolinux/syslinux-6.03/mk/syslinux.mk	(revision e16e8f2a41938d263af54a9fd6b4020d6c0d69fa)
@@ -0,0 +1,96 @@
+## -*- makefile -*- -------------------------------------------------------
+##   
+##   Copyright 2008 H. Peter Anvin - All Rights Reserved
+##
+##   This program 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, Inc., 51 Franklin St, Fifth Floor,
+##   Boston MA 02110-1301, USA; either version 2 of the License, or
+##   (at your option) any later version; incorporated herein by reference.
+##
+## -----------------------------------------------------------------------
+
+##
+## Common configurables
+##
+
+# No builtin rules
+MAKEFLAGS += -r
+MAKE      += -r
+
+BINDIR   = /usr/bin
+SBINDIR  = /sbin
+LIBDIR   = /usr/lib
+DATADIR  = /usr/share
+AUXDIR   = $(DATADIR)/syslinux
+DIAGDIR  = $(AUXDIR)/diag
+MANDIR	 = /usr/man
+INCDIR   = /usr/include
+TFTPBOOT = /tftpboot
+COM32DIR = $(AUXDIR)/com32
+
+BOOTDIR	    = /boot
+EXTLINUXDIR = $(BOOTDIR)/extlinux
+
+ifdef DEBUG
+# This allows DEBUGOPT to be set from the command line
+DEBUGOPT = -DDEBUG=$(DEBUG)
+endif
+
+NASM	 = nasm
+NASMOPT  = -Ox $(DEBUGOPT)
+
+PERL	 = perl
+PYTHON	 = python
+UPX	 = upx
+
+CHMOD	 = chmod
+
+CC	 = gcc
+gcc_ok   = $(shell tmpf=gcc_ok.$$$$.tmp; \
+		   if $(CC) $(GCCOPT) $(1) -c $(topdir)/dummy.c \
+			-o $$tmpf 2>/dev/null ; \
+		   then echo '$(1)'; else echo '$(2)'; fi; \
+		   rm -f $$tmpf)
+
+LD	 = ld
+OBJDUMP	 = objdump
+OBJCOPY  = objcopy
+STRIP    = strip
+AR       = ar
+NM       = nm
+RANLIB   = ranlib
+STRIP	 = strip
+GZIPPROG = gzip
+XZ	 = xz
+PNGTOPNM = pngtopnm
+MCOPY    = mcopy
+MFORMAT  = mformat
+MKISOFS  = mkisofs
+SED	 = sed
+WGET	 = wget
+
+com32    = $(topdir)/com32
+
+# Architecture definition
+SUBARCH := $(shell uname -m | sed -e s/i.86/i386/) 
+# on x86_64, ARCH has trailing whitespace
+# strip white spaces in ARCH
+ARCH ?= $(strip $(SUBARCH))
+
+# Common warnings we want for all gcc-generated code
+GCCWARN  = -W -Wall -Wstrict-prototypes $(DEBUGOPT)
+
+# Common stanza to make gcc generate .*.d dependency files
+MAKEDEPS = -Wp,-MT,$@,-MD,$(dir $@).$(notdir $@).d
+
+# Dependencies that exclude system headers; use whenever we use
+# header files from the platform.
+UMAKEDEPS = -Wp,-MT,$@,-MMD,$(dir $@).$(notdir $@).d
+
+# Items that are only appropriate during development; this file is
+# removed when tarballs are generated.
+-include $(MAKEDIR)/devel.mk
+
+# Local additions, like -DDEBUG can go here
+-include $(MAKEDIR)/local.mk
