PR: 14471

Submitted by:  Guerkan Karaman <gk.freebsd _at_ googlemail.com>
Approved by:   glarkin (mentor)

gPXE is an open-source PXE implementation and bootloader.

Create network booting code that allows computers to load
their operating system from a network or to extend an
existing PXE implementation with support for additional
protocols, such iSCSI, HTTP, TFTP, NFS, FTP and ATA
over Ethernet.

WWW: http://etherboot.org/wiki/index.php
This commit is contained in:
Olli Hauer 2010-08-12 20:20:23 +00:00
parent dbddc2b792
commit d1681b68ca
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=259146
11 changed files with 178 additions and 0 deletions

View file

@ -199,6 +199,7 @@
SUBDIR += googolplex
SUBDIR += gopher
SUBDIR += gotthard
SUBDIR += gpxe
SUBDIR += gq
SUBDIR += grdesktop
SUBDIR += grsync

46
net/gpxe/Makefile Normal file
View file

@ -0,0 +1,46 @@
# New ports collection Makefile for: gpxe
# Date created: 27-02-2010
# Whom: Guerkan Karaman <gk.freebsd@googlemail.com>
#
# $FreeBSD$
#
PORTNAME= gpxe
PORTVERSION= 1.0.1
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_KERNEL_ORG}
MASTER_SITE_SUBDIR=software/utils/boot/gpxe
MAINTAINER= gk.freebsd@googlemail.com
COMMENT= Create an open-source PXE implementation and bootloader
BUILD_DEPENDS= syslinux:${PORTSDIR}/sysutils/syslinux
LICENSE= GPLv2
USE_BZIP2= yes
USE_GMAKE= yes
USE_CDRTOOLS= yes
WRKSRC= ${WRKDIR}/${DISTNAME}/src
ONLY_FOR_ARCHS= i386
PLIST_DIRS= %%DATADIR%%
PLIST_FILES= %%DATADIR%%/gpxe.dsk \
%%DATADIR%%/gpxe.usb \
%%DATADIR%%/gpxe.iso
SUB_FILES= pkg-message
post-patch:
@${REINPLACE_CMD} "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/arch/i386/Makefile
do-install:
@${MKDIR} ${DATADIR}
${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/src/bin/gpxe.dsk ${DATADIR}
${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/src/bin/gpxe.usb ${DATADIR}
${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/src/bin/gpxe.iso ${DATADIR}
post-install:
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>

3
net/gpxe/distinfo Normal file
View file

@ -0,0 +1,3 @@
MD5 (gpxe-1.0.1.tar.bz2) = 38ae67a440abd2aea139495022ee4912
SHA256 (gpxe-1.0.1.tar.bz2) = 65a542553f2221da78da1230486d2ff8565c62336caebdbb2f88ca6645a63f52
SIZE (gpxe-1.0.1.tar.bz2) = 1856122

View file

@ -0,0 +1,12 @@
--- ./arch/i386/Makefile.orig 2010-06-29 21:31:33.000000000 +0200
+++ ./arch/i386/Makefile 2010-08-07 16:06:23.000000000 +0200
@@ -72,7 +72,8 @@
ISOLINUX_BIN_LIST := \
$(ISOLINUX_BIN) \
/usr/lib/syslinux/isolinux.bin \
- /usr/share/syslinux/isolinux.bin
+ %%PREFIX%%/share/syslinux/isolinux.bin \
+ %%PREFIX%%/share/syslinux/isolinux.bin
ISOLINUX_BIN = $(firstword $(wildcard $(ISOLINUX_BIN_LIST)))
# i386-specific directories containing source files

View file

@ -0,0 +1,25 @@
--- ./arch/i386/Makefile.pcbios.orig 2010-06-29 21:31:33.000000000 +0200
+++ ./arch/i386/Makefile.pcbios 2010-08-07 16:51:00.000000000 +0200
@@ -34,19 +34,19 @@
NON_AUTO_MEDIA += iso
%iso: %lkrn util/geniso
$(QM)$(ECHO) " [GENISO] $@"
- $(Q)ISOLINUX_BIN=$(ISOLINUX_BIN) bash util/geniso $@ $<
+ $(Q)ISOLINUX_BIN=$(ISOLINUX_BIN) sh util/geniso $@ $<
# rule to make a floppy emulation ISO boot image
NON_AUTO_MEDIA += liso
%liso: %lkrn util/genliso
$(QM)$(ECHO) " [GENLISO] $@"
- $(Q)bash util/genliso $@ $<
+ $(Q)sh util/genliso $@ $<
# rule to make a syslinux floppy image (mountable, bootable)
NON_AUTO_MEDIA += sdsk
%sdsk: %lkrn util/gensdsk
$(QM)$(ECHO) " [GENSDSK] $@"
- $(Q)bash util/gensdsk $@ $<
+ $(Q)sh util/gensdsk $@ $<
# Special target for building Master Boot Record binary
$(BIN)/mbr.bin : $(BIN)/mbr.o

View file

@ -0,0 +1,8 @@
--- ./util/fnrec.sh.orig 2010-06-29 21:31:33.000000000 +0200
+++ ./util/fnrec.sh 2010-08-07 16:16:04.000000000 +0200
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
#
# Copyright (C) 2010 Stefan Hajnoczi <stefanha@gmail.com>.
#

View file

@ -0,0 +1,17 @@
--- ./util/geniso.orig 2010-06-29 21:31:33.000000000 +0200
+++ ./util/geniso 2010-08-07 17:45:13.000000000 +0200
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
#
# Generate a isolinux ISO boot image
#
@@ -50,7 +50,7 @@
fi
b=$(basename $f)
g=${b%.lkrn}
- g=${g//[^a-z0-9]}.krn
+ g=$(echo $g | sed -e 's/[^a-z0-9]//g').krn
case "$first" in
"")
echo DEFAULT $g

View file

@ -0,0 +1,19 @@
--- ./util/genliso.orig 2010-06-29 21:31:33.000000000 +0200
+++ ./util/genliso 2010-08-07 17:45:23.000000000 +0200
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
#
# Generate a legacy floppy emulation ISO boot image
#
@@ -49,8 +49,8 @@
# shorten name for 8.3 filesystem
b=$(basename $f)
g=${b%.lkrn}
- g=${g//[^a-z0-9]}
- g=${g:0:8}.krn
+ g=$(echo $g | sed -e 's/[^a-z0-9]//g').krn
+ g=$(echo $g | awk '{print substr($0,0,8)}').krn
case "$first" in
"")
echo DEFAULT $g

View file

@ -0,0 +1,19 @@
--- ./util/gensdsk.orig 2010-06-29 21:31:33.000000000 +0200
+++ ./util/gensdsk 2010-08-07 17:45:31.000000000 +0200
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
#
# Generate a syslinux floppy that loads a gPXE image
#
@@ -44,8 +44,8 @@
# shorten name for 8.3 filesystem
b=$(basename $f)
g=${b%.lkrn}
- g=${g//[^a-z0-9]}
- g=${g:0:8}.krn
+ g=$(echo $g | sed -e 's/[^a-z0-9]//g').krn
+ g=$(echo $g | awk '{print substr($0,0,8)}').krn
case "$first" in
"")
echo DEFAULT $g

View file

@ -0,0 +1,19 @@
The following files have been installed in %%PREFIX%%/share/gpxe
- gpxe.dsk
To create a bootable floppy, type
cat %%PREFIX%%/share/gpxe/gpxe.dsk > /dev/fd0
where /dev/fd0 is your floppy drive.
This will erase any data already on the disk.
- gpxe.usb
To create a bootable USB key, type
cat %%PREFIX%%/share/gpxe/gpxe.usb > /dev/sdX
where /dev/sdX is your USB key, and is *not* a real hard
disk on your system.
This will erase any data already on the USB key.
- gpxe.iso
To create a bootable CD-ROM, burn the ISO image
%%PREFIX%%/share/gpxe/gpxe.iso to a blank CD-ROM.

9
net/gpxe/pkg-descr Normal file
View file

@ -0,0 +1,9 @@
gPXE is an open-source PXE implementation and bootloader.
Create network booting code that allows computers to load
their operating system from a network or to extend an
existing PXE implementation with support for additional
protocols, such iSCSI, HTTP, TFTP, NFS, FTP and ATA
over Ethernet.
WWW: http://etherboot.org/wiki/index.php