See attached.
Thanks, Ward.
On Fri, Nov 30, 2007 at 12:16:16AM -0500, Ward Vandewege wrote:
Peter and I talked to the friendly folks at #etherboot. They were interested in re-adding LinuxBIOS support but are a bit short of time. If someone wants to help out, that would be great;
As far as adding support for LB-specific things FILO has all the neccessary bits already. A bigger problem is that gPXE currently does not have the BIOS completely abstracted, so that needs to be done first. :\
//Peter
On 30/11/07 00:16 -0500, Ward Vandewege wrote:
See attached.
Thanks, Ward.
-- Ward Vandewege ward@fsf.org Free Software Foundation - Senior System Administrator
This patch adds preliminary gPXE support to buildrom. gPXE is the successor of etherboot. It is currently undergoing some major work and does not have LinuxBIOS support, so this is not useful yet - gPXE does not even build elf images right now.
Peter and I talked to the friendly folks at #etherboot. They were interested in re-adding LinuxBIOS support but are a bit short of time. If someone wants to help out, that would be great; if not it might be a while before this becomes useful.
The patch updates the fetchgit.sh script to bring it up to date with current git tools, and pulls in gPXE from the git 'head'. gPXE will only show up in kconfig when EXPERIMENTAL is enabled.
Signed-off-by: Ward Vandewege ward@gnu.org
Acked-by: Jordan Crouse jordan.crouse@amd.com
Index: config/payloads/payloads.conf
--- config/payloads/payloads.conf (revision 68) +++ config/payloads/payloads.conf (working copy) @@ -18,6 +18,7 @@ PCONF-y= PCONF-$(CONFIG_PAYLOAD_LAB) = lab.conf PCONF-$(CONFIG_PAYLOAD_ETHERBOOT) = etherboot.conf +PCONF-$(CONFIG_PAYLOAD_GPXE) = gpxe.conf PCONF-$(CONFIG_PAYLOAD_FILO) = filo.conf #PCONF-$(CONFIG_PAYLOAD_OFW) = ofw.conf PCONF-$(CONFIG_PAYLOAD_MEMTEST) = memtest.conf Index: config/payloads/Config.in =================================================================== --- config/payloads/Config.in (revision 68) +++ config/payloads/Config.in (working copy) @@ -12,6 +12,11 @@ config PAYLOAD_CUSTOM bool "Custom Payload"
+config PAYLOAD_GPXE
- depends EXPERIMENTAL
- bool "GPXE"
- select PAYLOAD
config PAYLOAD_ETHERBOOT depends !PLATFORM_M57SLI depends !PLATFORM_TYAN_S2891 @@ -127,4 +132,19 @@ Etherboot project for more details
endmenu
+menu "GPXE Configuration" +depends PAYLOAD_GPXE +depends EXPERIMENTAL
+config GPXE_DRIVER
- string "GPXE NIC driver to support"
- default "rtl8139"
- help
Specify the GPXE NIC driver to build a ROM for. See the
GPXE project for more details
endmenu
+endmenu Index: bin/fetchgit.sh =================================================================== --- bin/fetchgit.sh (revision 68) +++ bin/fetchgit.sh (working copy) @@ -5,12 +5,13 @@ DIR=$2 TAG=$3 TARBALL=$4 +NAME=$5
# If the base git directory doesn't exist, then we need to clone it
-if [ ! -d $DIR/git ]; then +if [ ! -d $DIR/.git ]; then echo "Cloning $URL..."
- git-clone --bare $URL $DIR/git
- git-clone $URL $DIR if [ $? -ne 0 ]; then echo "Couldn't clone $URL." exit 1
@@ -19,7 +20,7 @@
# Fetch the latest and greatest bits
-export GIT_DIR=$DIR/git +export GIT_DIR=$DIR/.git
git-fetch $URL git-fetch --tags $URL @@ -27,4 +28,4 @@ git-pack-redundant --all | xargs -r rm
# Make the tarball -git-tar-tree $TAG git | gzip > $TARBALL +git-tar-tree $TAG $NAME-$TAG | bzip2 > $TARBALL Index: Config.in =================================================================== --- Config.in (revision 68) +++ Config.in (working copy) @@ -19,6 +19,16 @@ help Allow yourself to do advanced developer things
+config EXPERIMENTAL
- bool "Enable experimental features"
- default n
- help
Experimental features are not yet ready for prime time and/or
completely broken. The features revealed by this setting are likely to be
only useful if you are a developer and want to hack on buildrom.
If you are not sure, say no.
menu "LinuxBIOS configuration"
config USE_LZMA Index: packages/gpxe/conf/Config.main =================================================================== --- packages/gpxe/conf/Config.main (revision 0) +++ packages/gpxe/conf/Config.main (revision 0) @@ -0,0 +1,96 @@ +CFLAGS+= -DCONFIG_PCI -DCONFIG_ISA +CFLAGS+= -DASK_BOOT=3 -DBOOT_FIRST=BOOT_NIC
+ifdef INCLUDE_FILO +CFLAGS+= -DCONFIG_FILO +endif
+CFLAGS+= -DALLOW_ONLY_ENCAPSULATED +CFLAGS+= -DBACKOFF_LIMIT=7 -DCONGESTED +CFLAGS+= -DTAGGED_IMAGE -DELF_IMAGE +CFLAGS+= -DDOWNLOAD_PROTO_TFTP
+HOST_CC= gcc +CPP= gcc -E -Wp,-Wall +RM= rm -f +TOUCH= touch +PERL= /usr/bin/perl +CC= gcc +AS= as +LD= ld +SIZE= size +AR= ar +RANLIB= ranlib +OBJCOPY= objcopy
+CFLAGS+= -Os -ffreestanding +CFLAGS+= -Wall -W -Wno-format +CFLAGS+= $(EXTRA_CFLAGS) +ASFLAGS+= $(EXTRA_ASFLAGS) +LDFLAGS+= $(EXTRA_LDFLAGS)
+BIN=bin +CFLAGS+= -DCONFIG_PCI -DCONFIG_ISA +CFLAGS+= -DASK_BOOT=3 -DBOOT_FIRST=BOOT_NIC
+ifdef INCLUDE_FILO +CFLAGS+= -DCONFIG_FILO +endif
+CFLAGS+= -DALLOW_ONLY_ENCAPSULATED +CFLAGS+= -DBACKOFF_LIMIT=7 -DCONGESTED +CFLAGS+= -DTAGGED_IMAGE -DELF_IMAGE +CFLAGS+= -DDOWNLOAD_PROTO_TFTP
+HOST_CC= gcc +CPP= gcc -E -Wp,-Wall +RM= rm -f +TOUCH= touch +PERL= /usr/bin/perl +CC= gcc +AS= as +LD= ld +SIZE= size +AR= ar +RANLIB= ranlib +OBJCOPY= objcopy
+CFLAGS+= -Os -ffreestanding +CFLAGS+= -Wall -W -Wno-format +CFLAGS+= $(EXTRA_CFLAGS) +ASFLAGS+= $(EXTRA_ASFLAGS) +LDFLAGS+= $(EXTRA_LDFLAGS)
+BIN=bin +CFLAGS+= -DCONFIG_PCI -DCONFIG_ISA +CFLAGS+= -DASK_BOOT=3 -DBOOT_FIRST=BOOT_NIC
+ifdef INCLUDE_FILO +CFLAGS+= -DCONFIG_FILO +endif
+CFLAGS+= -DALLOW_ONLY_ENCAPSULATED +CFLAGS+= -DBACKOFF_LIMIT=7 -DCONGESTED +CFLAGS+= -DTAGGED_IMAGE -DELF_IMAGE +CFLAGS+= -DDOWNLOAD_PROTO_TFTP
+HOST_CC= gcc +CPP= gcc -E -Wp,-Wall +RM= rm -f +TOUCH= touch +PERL= /usr/bin/perl +CC= gcc +AS= as +LD= ld +SIZE= size +AR= ar +RANLIB= ranlib +OBJCOPY= objcopy
+CFLAGS+= -Os -ffreestanding +CFLAGS+= -Wall -W -Wno-format +CFLAGS+= $(EXTRA_CFLAGS) +ASFLAGS+= $(EXTRA_ASFLAGS) +LDFLAGS+= $(EXTRA_LDFLAGS)
+BIN=bin Index: packages/gpxe/conf/Config.i386 =================================================================== --- packages/gpxe/conf/Config.i386 (revision 0) +++ packages/gpxe/conf/Config.i386 (revision 0) @@ -0,0 +1,66 @@
+CFLAGS+= -DLINUXBIOS -DCONFIG_TSC_CURRTICKS -DCONSOLE_SERIAL -DCOMCONSOLE=0x3f8 -DCOMPRESERVE -DCONFIG_PCI_DIRECT -DELF_IMAGE
+CFLAGS+= -fstrength-reduce -fomit-frame-pointer -march=i386 +GCC_VERSION = $(subst ., ,$(shell $(CC) -dumpversion)) +GCC_MAJORVERSION = $(firstword $(GCC_VERSION)) +ifeq ($(GCC_MAJORVERSION),2) +CFLAGS+= -malign-jumps=1 -malign-loops=1 -malign-functions=1 +else +CFLAGS+= -falign-jumps=1 -falign-loops=1 -falign-functions=1 +endif +GCC_MINORVERSION = $(word 2, $(GCC_VERSION)) +ifneq ($(GCC_MINORVERSION),4) +CFLAGS+= -march=i386 +endif
+LDFLAGS+= -N
+ifeq "$(shell uname -s)" "FreeBSD" +CFLAGS+= -DIMAGE_FREEBSD -DELF_IMAGE -DAOUT_IMAGE +endif
+CFLAGS+= -DLINUXBIOS -DCONFIG_TSC_CURRTICKS -DCONSOLE_SERIAL -DCOMCONSOLE=0x3f8 -DCOMPRESERVE -DCONFIG_PCI_DIRECT -DELF_IMAGE
+CFLAGS+= -fstrength-reduce -fomit-frame-pointer -march=i386 +GCC_VERSION = $(subst ., ,$(shell $(CC) -dumpversion)) +GCC_MAJORVERSION = $(firstword $(GCC_VERSION)) +ifeq ($(GCC_MAJORVERSION),2) +CFLAGS+= -malign-jumps=1 -malign-loops=1 -malign-functions=1 +else +CFLAGS+= -falign-jumps=1 -falign-loops=1 -falign-functions=1 +endif +GCC_MINORVERSION = $(word 2, $(GCC_VERSION)) +ifneq ($(GCC_MINORVERSION),4) +CFLAGS+= -march=i386 +endif
+LDFLAGS+= -N
+ifeq "$(shell uname -s)" "FreeBSD" +CFLAGS+= -DIMAGE_FREEBSD -DELF_IMAGE -DAOUT_IMAGE +endif
+CFLAGS+= -DLINUXBIOS -DCONFIG_TSC_CURRTICKS -DCONSOLE_SERIAL -DCOMCONSOLE=0x3f8 -DCOMPRESERVE -DCONFIG_PCI_DIRECT -DELF_IMAGE
+CFLAGS+= -fstrength-reduce -fomit-frame-pointer -march=i386 +GCC_VERSION = $(subst ., ,$(shell $(CC) -dumpversion)) +GCC_MAJORVERSION = $(firstword $(GCC_VERSION)) +ifeq ($(GCC_MAJORVERSION),2) +CFLAGS+= -malign-jumps=1 -malign-loops=1 -malign-functions=1 +else +CFLAGS+= -falign-jumps=1 -falign-loops=1 -falign-functions=1 +endif +GCC_MINORVERSION = $(word 2, $(GCC_VERSION)) +ifneq ($(GCC_MINORVERSION),4) +CFLAGS+= -march=i386 +endif
+LDFLAGS+= -N
+ifeq "$(shell uname -s)" "FreeBSD" +CFLAGS+= -DIMAGE_FREEBSD -DELF_IMAGE -DAOUT_IMAGE +endif
Index: packages/gpxe/gpxe.mk
--- packages/gpxe/gpxe.mk (revision 0) +++ packages/gpxe/gpxe.mk (revision 0) @@ -0,0 +1,144 @@ +GPXE_URL=git://git.etherboot.org/scm/gpxe.git +GPXE_DIR=$(BUILD_DIR)/gpxe +GPXE_TAG=master +GPXE_SRC_DIR=$(GPXE_DIR)/gpxe-$(GPXE_TAG)/src +GPXE_SOURCE=gpxe-$(GPXE_TAG).tar.bz2 +GPXE_STAMP_DIR=$(GPXE_DIR)/stamps +GPXE_LOG_DIR=$(GPXE_DIR)/logs
+ifeq ($(GPXE_ARCH),) +GPXE_ARCH=i386 +endif
+GPXE_PATCHES =
+# Filter the quotes off the config string +GPXE_DRIVER := $(shell echo $(CONFIG_GPXE_DRIVER) | sed -e s:"::g) +GPXE_OUTPUT=$(GPXE_SRC_DIR)/bin/$(GPXE_DRIVER).elf
+ifeq ($(CONFIG_VERBOSE),y) +GPXE_FETCH_LOG=/dev/stdout +GPXE_BUILD_LOG=/dev/stdout +GPXE_INSTALL_LOG=/dev/stdout +else +GPXE_FETCH_LOG=$(GPXE_LOG_DIR)/fetch.log +GPXE_BUILD_LOG=$(GPXE_LOG_DIR)/build.log +GPXE_INSTALL_LOG=$(GPXE_LOG_DIR)/install.log +endif
+$(SOURCE_DIR)/$(GPXE_SOURCE):
- @ echo "Fetching the GPXE source..."
- $(BIN_DIR)/fetchgit.sh $(GPXE_URL) $(SOURCE_DIR)/gpxe \
- $(GPXE_TAG) $(SOURCE_DIR)/$(GPXE_SOURCE) gpxe \
$(GPXE_FETCH_LOG) 2>&1+$(GPXE_STAMP_DIR)/.unpacked: $(SOURCE_DIR)/$(GPXE_SOURCE)
- @ echo "Unpacking GPXE..."
- @ tar -C $(GPXE_DIR) -jxf $(SOURCE_DIR)/$(GPXE_SOURCE)
- @ touch $@
+$(GPXE_STAMP_DIR)/.patched: $(GPXE_STAMP_DIR)/.unpacked
- @ echo "Patching GPXE..."
- @ $(BIN_DIR)/doquilt.sh $(GPXE_SRC_DIR)/.. $(GPXE_PATCHES)
- @ touch $@
+$(GPXE_STAMP_DIR)/.configured: $(GPXE_STAMP_DIR)/.patched
- @ cp $(PACKAGE_DIR)/gpxe/conf/Config.main \
- $(GPXE_SRC_DIR)/Config
- @ cp $(PACKAGE_DIR)/gpxe/conf/Config.$(GPXE_ARCH) \
- $(GPXE_SRC_DIR)/arch/$(GPXE_ARCH)/Config
- @ touch $@
+$(GPXE_OUTPUT): $(GPXE_STAMP_DIR)/.configured
- @ echo "Building GPXE..."
- @ ( unset CFLAGS; export EXTRA_CFLAGS="$(CFLAGS)"; \
- unset ASFLAGS; export EXTRA_ASFLAGS="$(ASFLAGS)"; \
- unset LDFLAGS; \
- $(MAKE) -C $(GPXE_SRC_DIR) ARCH=$(GPXE_ARCH) \
- bin/$(GPXE_DRIVER).elf > $(GPXE_BUILD_LOG) 2>&1)
+$(GPXE_STAMP_DIR) $(GPXE_LOG_DIR):
- @ mkdir -p $@
+gpxe: $(GPXE_STAMP_DIR) $(GPXE_LOG_DIR) $(GPXE_OUTPUT)
- @ mkdir -p $(OUTPUT_DIR)
- @ cp $(GPXE_OUTPUT) $(PAYLOAD_ELF)
+gpxe-clean:
- @ echo "Cleaning GPXE..."
- @ $(MAKE) -C $(GPXE_SRC_DIR) clean > /dev/null 2>&1
+gpxe-distclean:
- @ rm -rf $(GPXE_DIR)/*
+GPXE_URL=git://git.etherboot.org/scm/gpxe.git +GPXE_DIR=$(BUILD_DIR)/gpxe +GPXE_TAG=master +GPXE_SRC_DIR=$(GPXE_DIR)/gpxe-$(GPXE_TAG)/src +GPXE_SOURCE=gpxe-$(GPXE_TAG).tar.bz2 +GPXE_STAMP_DIR=$(GPXE_DIR)/stamps +GPXE_LOG_DIR=$(GPXE_DIR)/logs
+ifeq ($(GPXE_ARCH),) +GPXE_ARCH=i386 +endif
+GPXE_PATCHES =
+# Filter the quotes off the config string +GPXE_DRIVER := $(shell echo $(CONFIG_GPXE_DRIVER) | sed -e s:"::g) +GPXE_OUTPUT=$(GPXE_SRC_DIR)/bin/$(GPXE_DRIVER).elf
+ifeq ($(CONFIG_VERBOSE),y) +GPXE_FETCH_LOG=/dev/stdout +GPXE_BUILD_LOG=/dev/stdout +GPXE_INSTALL_LOG=/dev/stdout +else +GPXE_FETCH_LOG=$(GPXE_LOG_DIR)/fetch.log +GPXE_BUILD_LOG=$(GPXE_LOG_DIR)/build.log +GPXE_INSTALL_LOG=$(GPXE_LOG_DIR)/install.log +endif
+$(SOURCE_DIR)/$(GPXE_SOURCE):
- @ echo "Fetching the GPXE source..."
- $(BIN_DIR)/fetchgit.sh $(GPXE_URL) $(SOURCE_DIR)/gpxe \
- $(GPXE_TAG) $(SOURCE_DIR)/$(GPXE_SOURCE) gpxe \
$(GPXE_FETCH_LOG) 2>&1+$(GPXE_STAMP_DIR)/.unpacked: $(SOURCE_DIR)/$(GPXE_SOURCE)
- @ echo "Unpacking GPXE..."
- @ tar -C $(GPXE_DIR) -jxf $(SOURCE_DIR)/$(GPXE_SOURCE)
- @ touch $@
+$(GPXE_STAMP_DIR)/.patched: $(GPXE_STAMP_DIR)/.unpacked
- @ echo "Patching GPXE..."
- @ $(BIN_DIR)/doquilt.sh $(GPXE_SRC_DIR)/.. $(GPXE_PATCHES)
- @ touch $@
+$(GPXE_STAMP_DIR)/.configured: $(GPXE_STAMP_DIR)/.patched
- @ cp $(PACKAGE_DIR)/gpxe/conf/Config.main \
- $(GPXE_SRC_DIR)/Config
- @ cp $(PACKAGE_DIR)/gpxe/conf/Config.$(GPXE_ARCH) \
- $(GPXE_SRC_DIR)/arch/$(GPXE_ARCH)/Config
- @ touch $@
+$(GPXE_OUTPUT): $(GPXE_STAMP_DIR)/.configured
- @ echo "Building GPXE..."
- @ ( unset CFLAGS; export EXTRA_CFLAGS="$(CFLAGS)"; \
- unset ASFLAGS; export EXTRA_ASFLAGS="$(ASFLAGS)"; \
- unset LDFLAGS; \
- $(MAKE) -C $(GPXE_SRC_DIR) ARCH=$(GPXE_ARCH) \
- bin/$(GPXE_DRIVER).elf > $(GPXE_BUILD_LOG) 2>&1)
+$(GPXE_STAMP_DIR) $(GPXE_LOG_DIR):
- @ mkdir -p $@
+gpxe: $(GPXE_STAMP_DIR) $(GPXE_LOG_DIR) $(GPXE_OUTPUT)
- @ mkdir -p $(OUTPUT_DIR)
- @ cp $(GPXE_OUTPUT) $(PAYLOAD_ELF)
+gpxe-clean:
- @ echo "Cleaning GPXE..."
- @ $(MAKE) -C $(GPXE_SRC_DIR) clean > /dev/null 2>&1
+gpxe-distclean:
- @ rm -rf $(GPXE_DIR)/*
-- linuxbios mailing list linuxbios@linuxbios.org http://www.linuxbios.org/mailman/listinfo/linuxbios
On Fri, Nov 30, 2007 at 01:40:41PM -0700, Jordan Crouse wrote:
This patch adds preliminary gPXE support to buildrom. gPXE is the successor of etherboot. It is currently undergoing some major work and does not have LinuxBIOS support, so this is not useful yet - gPXE does not even build elf images right now.
Peter and I talked to the friendly folks at #etherboot. They were interested in re-adding LinuxBIOS support but are a bit short of time. If someone wants to help out, that would be great; if not it might be a while before this becomes useful.
The patch updates the fetchgit.sh script to bring it up to date with current git tools, and pulls in gPXE from the git 'head'. gPXE will only show up in kconfig when EXPERIMENTAL is enabled.
Signed-off-by: Ward Vandewege ward@gnu.org
Acked-by: Jordan Crouse jordan.crouse@amd.com
r70
Thanks, Ward.