aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortobik <tobik@FreeBSD.org>2018-04-25 23:13:48 +0800
committertobik <tobik@FreeBSD.org>2018-04-25 23:13:48 +0800
commita68e6c33661f055f268ff10ba1041d5fc2db9560 (patch)
tree36787c69c0e5c1adbd1edaa2e7e34837146f675b
parent5298b70e07c22e378beb21744a0f85eb1cb4d463 (diff)
downloadfreebsd-ports-gnome-a68e6c33661f055f268ff10ba1041d5fc2db9560.tar.gz
freebsd-ports-gnome-a68e6c33661f055f268ff10ba1041d5fc2db9560.tar.zst
freebsd-ports-gnome-a68e6c33661f055f268ff10ba1041d5fc2db9560.zip
net/ipxe: Build undionly and EFI images
Submitted by: fabian.freyer@physik.tu-berlin.de Differential Revision: https://reviews.freebsd.org/D15194
-rw-r--r--net/ipxe/Makefile24
-rw-r--r--net/ipxe/files/pkg-message.in8
2 files changed, 26 insertions, 6 deletions
diff --git a/net/ipxe/Makefile b/net/ipxe/Makefile
index 8f122f62519c..01c94d727e07 100644
--- a/net/ipxe/Makefile
+++ b/net/ipxe/Makefile
@@ -3,7 +3,7 @@
PORTNAME= ipxe
PORTVERSION= 20180220
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net
MAINTAINER= tobik@FreeBSD.org
@@ -29,7 +29,7 @@ USE_GITHUB= yes
GH_TAGNAME= 47849be3a900c546cf92066849be0806f4e611d9
USE_PERL5= build
-ALL_TARGET= bin/ipxe.dsk bin/ipxe.lkrn bin/ipxe.pxe bin/ipxe.usb
+ALL_TARGET= bin/ipxe.dsk bin/ipxe.lkrn bin/ipxe.pxe bin/ipxe.usb bin/undionly.kpxe
MAKE_ARGS= HOST_CC=${CC} \
PERL=${PERL} \
CC=${CC} \
@@ -64,11 +64,17 @@ _IPXE_BUILDCFG= branding:PRODUCT_NAME="${PKGNAME} (${OPSYS} ${OSREL}/${ARCH})" \
general:PING_CMD \
general:POWEROFF_CMD
-OPTIONS_DEFAULT= ISO
-OPTIONS_DEFINE= ISO
+OPTIONS_DEFAULT= ISO EFI
+OPTIONS_DEFINE= ISO EFI
+EFI_DESC= Create EFI image
ISO_DESC= Create bootable CD image
+EFI_ARCHS= i386 ${ARCH:Mamd64:S/amd64/x86_64/}
+.for _arch in ${EFI_ARCHS}
+EFI_PLIST_FILES+= ${DATADIR}/ipxe.efi-${_arch}
+.endfor
+
ISO_ALL_TARGET= bin/ipxe.iso
ISO_BUILD_DEPENDS= bash:shells/bash \
${LOCALBASE}/share/syslinux/bios/core/isolinux.bin:sysutils/syslinux \
@@ -94,10 +100,20 @@ pre-build-ISO-on:
# ISO creation fails if isolinux.bin is read only
${INSTALL} -m 644 ${LOCALBASE}/share/syslinux/bios/core/isolinux.bin ${WRKSRC}/isolinux.bin
+do-build-EFI-on:
+.for _arch in ${EFI_ARCHS}
+ ${DO_MAKE_BUILD} ARCH=${_arch} -C ${WRKSRC} bin-${_arch}-efi/ipxe.efi
+.endfor
+
do-install:
@${MKDIR} ${STAGEDIR}${DATADIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${ALL_TARGET} ${STAGEDIR}${DATADIR}
+do-install-EFI-on:
+.for _arch in ${EFI_ARCHS}
+ ${INSTALL_DATA} ${WRKSRC}/bin-${_arch}-efi/ipxe.efi ${STAGEDIR}${DATADIR}/ipxe.efi-${_arch}
+.endfor
+
.include <bsd.port.post.mk>
RUN_DEPENDS:= ${RUN_DEPENDS:Ngcc*}
diff --git a/net/ipxe/files/pkg-message.in b/net/ipxe/files/pkg-message.in
index c0eb13f92063..0713bb1a5d97 100644
--- a/net/ipxe/files/pkg-message.in
+++ b/net/ipxe/files/pkg-message.in
@@ -1,6 +1,10 @@
The following files have been installed in %%DATADIR%%:
- ipxe.dsk for creating a bootable floppy disk
-- ipxe.usb for creating a bootable USB key
+- ipxe.efi-i386 for loading from EFI on i386 systems
+- ipxe.efi-x86_64 for loading from EFI on x86_64 systems
- ipxe.iso for creating a bootable CD
-- ipxe.pxe for chainloading from a PXE ROM
- ipxe.lkrn for any boot manager that can boot Linux kernels
+- ipxe.pxe for chainloading from a PXE ROM
+- ipxe.usb for creating a bootable USB key
+- undionly.kpxe for chainloading from a PXE ROM; contains only
+ the UNDI drivers