Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Conflicts:
	src/config/general.h
  • Loading branch information
Jarrod Johnson committed Apr 9, 2013
2 parents cca49ac + 0e2ba15 commit 5f49d68
Show file tree
Hide file tree
Showing 552 changed files with 25,893 additions and 5,528 deletions.
9 changes: 7 additions & 2 deletions contrib/rom-o-matic/build.php
Expand Up @@ -179,7 +179,12 @@ function rm_build_dir ()

// Make the requested image. $status is set to 0 on success
$make_target = "bin/${nic}.${fmt_extension}";
$make_cmd = "make -C '$build_dir' '$make_target' $emb_script_cmd 2>&1";
$gitversion = exec('git describe --always --abbrev=1 --match "" 2>/dev/null');
if ($gitversion) {
$gitversion = "GITVERSION=$gitversion";
}

$make_cmd = "make -C '$build_dir' '$make_target' $gitversion $emb_script_cmd 2>&1";

exec ( $make_cmd, $maketxt, $status );

Expand Down Expand Up @@ -239,7 +244,7 @@ function rm_build_dir ()
// Delete build directory as soon as it is not needed
rm_build_dir ();

$output_filename = "ipxe-${version}-${nic}.${fmt_extension}";
$output_filename = preg_replace('/[^a-z0-9\+\.\-]/i', '', "ipxe-${version}-${nic}.${fmt_extension}");

// Try to force IE to handle downloading right.
Header ( "Cache-control: private");
Expand Down
10 changes: 10 additions & 0 deletions contrib/rom-o-matic/flag-table.php
Expand Up @@ -109,6 +109,16 @@
"cfgsec" => "console"
),

"LOG_LEVEL"
=> array (
"flag" => "LOG_LEVEL",
"type" => "choice",
"options" => array("LOG_NONE","LOG_EMERG","LOG_ALERT","LOG_CRIT","LOG_ERR",
"LOG_WARNING","LOG_NOTICE","LOG_INFO","LOG_DEBUG","LOG_ALL"),
"value" => "LOG_NONE",
"cfgsec" => "console"
),

// End Console Options

// Begin Network Protocol Options:
Expand Down
720 changes: 550 additions & 170 deletions contrib/vm/bochsrc.txt

Large diffs are not rendered by default.

31 changes: 24 additions & 7 deletions src/Makefile
Expand Up @@ -143,7 +143,25 @@ everything :
bin-i386-efi/ipxe.efirom \
bin-x86_64-efi/ipxe.efi bin-x86_64-efi/ipxe.efidrv \
bin-x86_64-efi/ipxe.efirom \
bin-i386-linux/tap.linux bin-x86_64-linux/tap.linux
bin-i386-linux/tap.linux bin-x86_64-linux/tap.linux \
bin-i386-linux/tests.linux bin-x86_64-linux/tests.linux

###############################################################################
#
# VMware build target: all ROMs used with VMware
#
vmware : bin/8086100f.mrom bin/808610d3.mrom bin/10222000.rom bin/15ad07b0.rom
@$(ECHO) '==========================================================='
@$(ECHO)
@$(ECHO) 'Available ROMs:'
@$(ECHO) ' bin/8086100f.mrom -- intel/e1000'
@$(ECHO) ' bin/808610d3.mrom -- intel/e1000e'
@$(ECHO) ' bin/10222000.rom -- vlance/pcnet32'
@$(ECHO) ' bin/15ad07b0.rom -- vmxnet3'
@$(ECHO)
@$(ECHO) 'For more information, see http://ipxe.org/howto/vmware'
@$(ECHO)
@$(ECHO) '==========================================================='

###############################################################################
#
Expand All @@ -165,13 +183,12 @@ VERSION_PATCH = 3
EXTRAVERSION = -$(shell date +%y%m%d)
MM_VERSION = $(VERSION_MAJOR).$(VERSION_MINOR)
VERSION = $(MM_VERSION).$(VERSION_PATCH)$(EXTRAVERSION)
CFLAGS += -DVERSION_MAJOR=$(VERSION_MAJOR) \
-DVERSION_MINOR=$(VERSION_MINOR) \
-DVERSION_PATCH=$(VERSION_PATCH) \
-DVERSION=\"$(VERSION)\"
IDENT = '$(@F) $(VERSION) (GPL) ipxe.org'
GITVERSION := $(shell git describe --always --abbrev=1 --match "" 2>/dev/null)
ifneq ($(GITVERSION),)
VERSION += ($(GITVERSION))
endif
version :
@$(ECHO) $(VERSION)
@$(ECHO) "$(VERSION)"

###############################################################################
#
Expand Down
53 changes: 35 additions & 18 deletions src/Makefile.housekeeping
Expand Up @@ -162,9 +162,12 @@ endif
# output of "size". Inhibit this.
#
ifeq ($(CCTYPE),gcc)
CFI_TEST = $(CC) -fno-dwarf2-cfi-asm -x c -c /dev/null \
CFI_TEST = $(CC) -fno-dwarf2-cfi-asm -fno-exceptions -fno-unwind-tables \
-fno-asynchronous-unwind-tables -x c -c /dev/null \
-o /dev/null >/dev/null 2>&1
CFI_FLAGS := $(shell $(CFI_TEST) && $(ECHO) '-fno-dwarf2-cfi-asm')
CFI_FLAGS := $(shell $(CFI_TEST) && \
$(ECHO) '-fno-dwarf2-cfi-asm -fno-exceptions ' \
'-fno-unwind-tables -fno-asynchronous-unwind-tables')
WORKAROUND_CFLAGS += $(CFI_FLAGS)
endif

Expand Down Expand Up @@ -608,36 +611,39 @@ CFLAGS_clientcert += $(if $(CERT),-DCERTIFICATE="\"$(CERT_INC)\"")

# (Single-element) list of client private keys
#
KEY_LIST := $(BIN)/.private_key.list
ifeq ($(wildcard $(KEY_LIST)),)
KEY_OLD := <invalid>
ifdef KEY
PRIVKEY := $(KEY) # Maintain backwards compatibility
endif
PRIVKEY_LIST := $(BIN)/.private_key.list
ifeq ($(wildcard $(PRIVKEY_LIST)),)
PRIVKEY_OLD := <invalid>
else
KEY_OLD := $(shell cat $(KEY_LIST))
PRIVKEY_OLD := $(shell cat $(PRIVKEY_LIST))
endif
ifneq ($(KEY_OLD),$(KEY))
$(shell $(ECHO) "$(KEY)" > $(KEY_LIST))
ifneq ($(PRIVKEY_OLD),$(PRIVKEY))
$(shell $(ECHO) "$(PRIVKEY)" > $(PRIVKEY_LIST))
endif

$(KEY_LIST) :
$(PRIVKEY_LIST) :

VERYCLEANUP += $(KEY_LIST)
VERYCLEANUP += $(PRIVKEY_LIST)

# Embedded client private key
#
KEY_INC := $(BIN)/.private_key.der
PRIVKEY_INC := $(BIN)/.private_key.der

ifdef KEY
$(KEY_INC) : $(KEY) $(KEY_LIST)
ifdef PRIVKEY
$(PRIVKEY_INC) : $(PRIVKEY) $(PRIVKEY_LIST)
$(Q)$(OPENSSL) rsa -in $< -outform DER -out $@

clientcert_DEPS += $(KEY_INC)
clientcert_DEPS += $(PRIVKEY_INC)
endif

CLEANUP += $(KEY_INC)
CLEANUP += $(PRIVKEY_INC)

clientcert_DEPS += $(KEY_LIST)
clientcert_DEPS += $(PRIVKEY_LIST)

CFLAGS_clientcert += $(if $(KEY),-DPRIVATE_KEY="\"$(KEY_INC)\"")
CFLAGS_clientcert += $(if $(PRIVKEY),-DPRIVATE_KEY="\"$(PRIVKEY_INC)\"")

# These files use .incbin inline assembly to include a binary file.
# Unfortunately ccache does not detect this dependency and caches
Expand All @@ -647,6 +653,17 @@ $(BIN)/embedded.o : override CC := env CCACHE_DISABLE=1 $(CC)

$(BIN)/clientcert.o : override CC := env CCACHE_DISABLE=1 $(CC)

# Version number
#
CFLAGS_version += -DVERSION_MAJOR=$(VERSION_MAJOR) \
-DVERSION_MINOR=$(VERSION_MINOR) \
-DVERSION_PATCH=$(VERSION_PATCH) \
-DVERSION="\"$(VERSION)\""
# Make sure the version number gets updated on every git checkout
ifneq ($(GITVERSION),)
$(BIN)/version.o : ../.git/index
endif

# We automatically generate rules for any file mentioned in AUTO_SRCS
# using the following set of templates. It would be cleaner to use
# $(eval ...), but this function exists only in GNU make >= 3.80.
Expand All @@ -660,7 +677,7 @@ $(BIN)/clientcert.o : override CC := env CCACHE_DISABLE=1 $(CC)
define deps_template
@$(ECHO) " [DEPS] $(1)"
@$(MKDIR) -p $(BIN)/deps/$(dir $(1))
@$(CPP) $(CFLAGS) $(CFLAGS_$(2)) $(CFLAGS_$(3)) -DOBJECT=$(3) \
$(Q)$(CPP) $(CFLAGS) $(CFLAGS_$(2)) $(CFLAGS_$(3)) -DOBJECT=$(3) \
-Wno-error -M $(1) -MG -MP | \
sed 's/\.o\s*:/_DEPS +=/' > $(BIN)/deps/$(1).d
endef
Expand Down
2 changes: 2 additions & 0 deletions src/arch/i386/Makefile
Expand Up @@ -54,6 +54,8 @@ CFLAGS += -m32
ASFLAGS += --32
ifeq ($(HOST_OS),FreeBSD)
LDFLAGS += -m elf_i386_fbsd
else ifeq ($(HOST_OS),OpenBSD)
LDFLAGS += -m elf_i386_obsd
else
LDFLAGS += -m elf_i386
endif
Expand Down
3 changes: 2 additions & 1 deletion src/arch/i386/core/basemem_packet.c
Expand Up @@ -13,7 +13,8 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/

FILE_LICENCE ( GPL2_OR_LATER );
Expand Down
73 changes: 0 additions & 73 deletions src/arch/i386/core/cpu.c

This file was deleted.

3 changes: 2 additions & 1 deletion src/arch/i386/core/gdbmach.c
Expand Up @@ -13,7 +13,8 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/

FILE_LICENCE ( GPL2_OR_LATER );
Expand Down
3 changes: 2 additions & 1 deletion src/arch/i386/core/pic8259.c
Expand Up @@ -13,7 +13,8 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/

FILE_LICENCE ( GPL2_OR_LATER );
Expand Down
3 changes: 2 additions & 1 deletion src/arch/i386/core/rdtsc_timer.c
Expand Up @@ -13,7 +13,8 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/

FILE_LICENCE ( GPL2_OR_LATER );
Expand Down
8 changes: 5 additions & 3 deletions src/arch/i386/core/relocate.c
Expand Up @@ -33,8 +33,10 @@ extern char _etextdata[];
/**
* Relocate iPXE
*
* @v ix86 x86 register dump from prefix
* @ret ix86 x86 registers to return to prefix
* @v ebp Maximum address to use for relocation
* @ret esi Current physical address
* @ret edi New physical address
* @ret ecx Length to copy
*
* This finds a suitable location for iPXE near the top of 32-bit
* address space, and returns the physical address of the new location
Expand All @@ -59,7 +61,7 @@ __asmcall void relocate ( struct i386_all_regs *ix86 ) {

/* Determine maximum usable address */
max = MAX_ADDR;
if ( ix86->regs.ebp && ( ix86->regs.ebp < max ) ) {
if ( ix86->regs.ebp < max ) {
max = ix86->regs.ebp;
DBG ( "Limiting relocation to [0,%lx)\n", max );
}
Expand Down
3 changes: 2 additions & 1 deletion src/arch/i386/core/runtime.c
Expand Up @@ -13,7 +13,8 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/

FILE_LICENCE ( GPL2_OR_LATER );
Expand Down
3 changes: 2 additions & 1 deletion src/arch/i386/drivers/net/undi.c
Expand Up @@ -13,7 +13,8 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/

FILE_LICENCE ( GPL2_OR_LATER );
Expand Down
3 changes: 2 additions & 1 deletion src/arch/i386/drivers/net/undiload.c
Expand Up @@ -13,7 +13,8 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/

FILE_LICENCE ( GPL2_OR_LATER );
Expand Down

0 comments on commit 5f49d68

Please sign in to comment.