wok-next rev 515

Add: etherboot (floppy PXE bootloader)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Apr 08 13:24:00 2008 +0000 (2008-04-08)
parents 73742fcba19a
children f43146da6d21
files etherboot/receipt etherboot/stuff/etherboot-net.u
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/etherboot/receipt	Tue Apr 08 13:24:00 2008 +0000
     1.3 @@ -0,0 +1,35 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="etherboot"
     1.7 +VERSION="5.4.3"
     1.8 +CATEGORY="system-tools"
     1.9 +SHORT_DESC="Ethernet bootloader for PXE and NBI images."
    1.10 +MAINTAINER="pascal.bellard@slitaz.org"
    1.11 +TARBALL="$PACKAGE-$VERSION.tar.bz2"
    1.12 +WEB_SITE="http://www.etherboot.org/"
    1.13 +WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
    1.14 +
    1.15 +# Rules to configure and make the package.
    1.16 +compile_rules()
    1.17 +{
    1.18 +	cd $src/src
    1.19 +	patch -p2 < ../../stuff/etherboot-net.u
    1.20 +	make bin/etherboot-net.zdsk
    1.21 +}
    1.22 +
    1.23 +
    1.24 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.25 +genpkg_rules()
    1.26 +{
    1.27 +	mkdir -p $fs/usr/share/boot
    1.28 +	cp $src/src/bin/etherboot-net.zdsk $fs/usr/share/boot/etherboot
    1.29 +}
    1.30 +
    1.31 +# Pre and post install commands for Tazpkg.
    1.32 +post_install()
    1.33 +{
    1.34 +	echo "----"
    1.35 +	echo "You can create pxe/nbi boot floppy with:"
    1.36 +	echo "# cp /usr/share/boot/etherboot /dev/fd0"
    1.37 +	echo "----"
    1.38 +}
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/etherboot/stuff/etherboot-net.u	Tue Apr 08 13:24:00 2008 +0000
     2.3 @@ -0,0 +1,46 @@
     2.4 +Patch from network_boot_floppy+cd+hd_540.zip at http://sourceforge.net/projects/thinstation
     2.5 +--- etherboot-5.4.3/src/Makefile.main	2007-02-24 15:44:59.000000000 +0100
     2.6 ++++ etherboot-5.4.3/src/Makefile.main	2008-04-08 15:06:47.000000000 +0200
     2.7 +@@ -382,6 +382,27 @@
     2.8 + $(BIN)/%.zbin: $(BIN)/%.bin $(BIN)/nrv2b $(MAKEDEPS)
     2.9 + 	$(BIN)/nrv2b e $< $@
    2.10 + 
    2.11 ++# Rule for the multi-NIC image. (by Paolo Salvan)
    2.12 ++NETOBJS:=
    2.13 ++# Note: the 3c90x.o driver should be linked BEFORE the 3c595.o
    2.14 ++# otherwise 3c905b cards will be (badly) handled by the 3c595 driver as 3c900b cards
    2.15 ++NETOBJS+=		$(BIN)/3c90x.o
    2.16 ++# PCI cards...
    2.17 ++NETOBJS+=		$(BIN)/3c595.o $(BIN)/davicom.o $(BIN)/eepro100.o $(BIN)/ns8390.o $(BIN)/pcnet32.o $(BIN)/prism2_plx.o $(BIN)/rtl8139.o $(BIN)/sis900.o $(BIN)/tulip.o $(BIN)/via-rhine.o $(BIN)/r8169.o $(BIN)/forcedeth.o $(BIN)/ns83820.o $(BIN)/eepro.o $(BIN)/e1000.o
    2.18 ++# ISA cards...
    2.19 ++NETOBJS+=		$(BIN)/3c503.o $(BIN)/ne.o $(BIN)/wd.o $(BIN)/3c529.o $(BIN)/3c509.o
    2.20 ++# Exclude these drivers + the belows to create the .COM image, max 65280 byte...
    2.21 ++NETOBJS+=		$(BIN)/sk_g16.o $(BIN)/depca.o $(BIN)/cs89x0.o $(BIN)/prism2_pci.o $(BIN)/smc9000.o $(BIN)/natsemi.o $(BIN)/epic100.o $(BIN)/sundance.o $(BIN)/w89c840.o $(BIN)/tlan.o
    2.22 ++# Try excluding this big and rarely-used driver if you get "ERROR: code size exceeds limit!" at build-time
    2.23 ++# or system resets/hungs-up during image decompression at run-time
    2.24 ++# (uncompressed image could have exceeded low-memory...)
    2.25 ++NETOBJS+=		$(BIN)/tg3.o
    2.26 ++# This driver has slow autoprobing and is rarely used, so it is better to exclude it...
    2.27 ++#NETOBJS+=		$(BIN)/3c515.o
    2.28 ++
    2.29 ++$(BIN)/etherboot-net.o: $(NETOBJS)
    2.30 ++	$(LD) -r $(NETOBJS) -o $@
    2.31 ++
    2.32 + # Housekeeping
    2.33 + 
    2.34 + clean:
    2.35 +
    2.36 +--- etherboot-5.4.3/src/core/main.c	2007-02-24 15:44:59.000000000 +0100
    2.37 ++++ etherboot-5.4.3/src/core/main.c	2008-04-08 15:11:46.000000000 +0200
    2.38 +@@ -471,6 +471,11 @@
    2.39 + #ifdef	DNS_RESOLVER
    2.40 + 	const char *resolvt;
    2.41 + #endif
    2.42 ++        char *name_tmp = fname;
    2.43 ++        while ( *name_tmp != 0 ) {
    2.44 ++                if ( memcmp(name_tmp, ".zpxe", 6 ) == 0 ) {*name_tmp=0;} else {++name_tmp;}
    2.45 ++        }
    2.46 ++
    2.47 + 	ip.s_addr = arptable[ARP_SERVER].ipaddr.s_addr;
    2.48 + 	name = fname;
    2.49 + 	url_port = -1;