Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Feb 2018 20:55:28 +0000 (UTC)
From:      Tobias Kortkamp <tobik@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r463161 - in head/net/ipxe: . files
Message-ID:  <201802272055.w1RKtS5k003071@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tobik
Date: Tue Feb 27 20:55:28 2018
New Revision: 463161
URL: https://svnweb.freebsd.org/changeset/ports/463161

Log:
  net/ipxe: Update to latest commit
  
  - Make ISO creation optional
  
  - Remove support for IPXE_EMBED and IPXE_TRUST.  They can be passed
    directly via IPXE_MAKE_ARGS in make.conf, Makefile.local or similar
    instead:
  
  	IPXE_MAKE_ARGS=	EMBED=${.CURDIR}/ipxe-script
  
  - Add support for setting iPXE build options via IPXE_BUILDCFG
  
  - Enable serial console, ping and poweroff commands

Added:
  head/net/ipxe/files/patch-util_elf2efi.c   (contents, props changed)
Deleted:
  head/net/ipxe/files/patch-config_general.h
  head/net/ipxe/ipxestart.example
Modified:
  head/net/ipxe/Makefile
  head/net/ipxe/distinfo

Modified: head/net/ipxe/Makefile
==============================================================================
--- head/net/ipxe/Makefile	Tue Feb 27 20:22:55 2018	(r463160)
+++ head/net/ipxe/Makefile	Tue Feb 27 20:55:28 2018	(r463161)
@@ -1,10 +1,8 @@
 # Created by: Guerkan Karaman <gk.freebsd@googlemail.com>
 # $FreeBSD$
 
-# With helpful hints from net/gpxe
-
 PORTNAME=	ipxe
-PORTVERSION=	20180117
+PORTVERSION=	20180220
 CATEGORIES=	net
 
 MAINTAINER=	tobik@FreeBSD.org
@@ -12,9 +10,8 @@ COMMENT=	Open source network boot firmware
 
 LICENSE=	GPLv2
 
-BUILD_DEPENDS=	${LOCALBASE}/share/syslinux/bios/core/isolinux.bin:sysutils/syslinux \
-		bash:shells/bash \
-		mkisofs:sysutils/cdrtools
+ONLY_FOR_ARCHS=	amd64 i386
+ONLY_FOR_ARCHS_REASON=	not yet ported to anything other than amd64/i386
 
 USES=		gmake perl5 shebangfix
 USE_BINUTILS=	yes
@@ -28,12 +25,13 @@ USE_GITHUB=	yes
 #   A: iPXE uses a rolling release model, in which every commit is intended
 #      to be production-ready.  You should always use the latest code.
 #
-GH_TAGNAME=	fbe8c52d0d9cdb3d6f5fe8be8edab54618becc1f
+GH_TAGNAME=	47849be3a900c546cf92066849be0806f4e611d9
 USE_PERL5=	build
 
-MAKE_ARGS=	PERL=${PERL} \
+ALL_TARGET=	bin/ipxe.dsk bin/ipxe.lkrn bin/ipxe.pxe bin/ipxe.usb
+MAKE_ARGS=	HOST_CC=${CC} \
+		PERL=${PERL} \
 		CC=${CC} \
-		HOST_CC=${CC} \
 		AS=${AS} \
 		LD=${LD} \
 		SIZE=${SIZE} \
@@ -42,60 +40,63 @@ MAKE_ARGS=	PERL=${PERL} \
 		OBJCOPY=${OBJCOPY} \
 		NM=${NM} \
 		OBJDUMP=${OBJDUMP} \
+		ARCH=${ARCH:S/amd64/i386/} \
 		NO_WERROR=1 \
 		V=1 \
-		ISOLINUX_BIN="${WRKSRC}/isolinux.bin" \
-		LDLINUX_C32="${LOCALBASE}/share/syslinux/bios/com32/elflink/ldlinux/ldlinux.c32"
-WRKSRC_SUBDIR=	src
+		${IPXE_MAKE_ARGS}
+PLIST_FILES=	${ALL_TARGET:S@^bin/@${DATADIR}/@}
 SHEBANG_FILES=	util/geniso util/gensdsk
+SUB_FILES=	pkg-message
+WRKSRC_SUBDIR=	src
 
-PLIST_FILES=	%%DATADIR%%/ipxe.dsk \
-		%%DATADIR%%/ipxe.usb \
-		%%DATADIR%%/ipxe.iso \
-		%%DATADIR%%/ipxe.pxe \
-		%%DATADIR%%/ipxe.lkrn
+# Possible options are listed in ${WRKSRC}/config/*.h and
+# http://ipxe.org/buildcfg.  Add a ! prefix to an option to undef it
+# i.e. turn it off.
+_IPXE_BUILDCFG=	branding:PRODUCT_NAME="${PKGNAME} (${OPSYS} ${OSREL}/${ARCH})" \
+		console:CONSOLE_SERIAL \
+		console:KEYBOARD_MAP=us \
+		general:!DOWNLOAD_PROTO_FTP \
+		general:DOWNLOAD_PROTO_HTTPS \
+		general:DOWNLOAD_PROTO_NFS \
+		general:IMAGE_TRUST_CMD \
+		general:NET_PROTO_IPV6 \
+		general:PING_CMD \
+		general:POWEROFF_CMD
 
-SUB_FILES=	pkg-message
+OPTIONS_DEFAULT=	ISO
+OPTIONS_DEFINE=		ISO
 
-.include <bsd.port.options.mk>
+ISO_DESC=	Create bootable CD image
 
-ONLY_FOR_ARCHS=		amd64 i386
-ONLY_FOR_ARCHS_REASON=	not yet ported to anything other than amd64/i386
+ISO_ALL_TARGET=	bin/ipxe.iso
+ISO_BUILD_DEPENDS=	bash:shells/bash \
+		${LOCALBASE}/share/syslinux/bios/core/isolinux.bin:sysutils/syslinux \
+		mkisofs:sysutils/cdrtools
+ISO_MAKE_ARGS=	ISOLINUX_BIN="${WRKSRC}/isolinux.bin" \
+		LDLINUX_C32="${LOCALBASE}/share/syslinux/bios/com32/elflink/ldlinux/ldlinux.c32"
 
-.if ${ARCH} == "amd64"
-MAKE_ARGS+=	ARCH=i386
-.endif
+.include <bsd.port.pre.mk>
 
-IPXE_EMBED?=	# Allows embedding of iPXE start scripts
-.if ${IPXE_EMBED} != ""
-MAKE_ARGS+=	EMBED="${IPXE_EMBED}"
-.endif
+# Add user supplied build configuration after port options etc have
+# been processed as they might want to overwrite some settings.
+_IPXE_BUILDCFG+=	${IPXE_BUILDCFG}
 
-IPXE_TRUST?=	# Path to the root certificates iPXE trusts
-.if ${IPXE_TRUST} != ""
-MAKE_ARGS+=	TRUST="${IPXE_TRUST}"
+do-configure:
+.for _cat _opt in ${_IPXE_BUILDCFG:C/\:/ /}
+	@${ECHO_CMD} '#undef ${_opt:S/^!//:C/(.*)=(.*)/\1/}' >> ${WRKSRC}/config/local/${_cat}.h
+.if ${_opt:N!*}
+	@${ECHO_CMD} '#define ${_opt:C/=/ /:S/^'//:S/'$//}' >> ${WRKSRC}/config/local/${_cat}.h
 .endif
+.endfor
 
-pre-everything::
-	@${ECHO_MSG} "To build iPXE with an embedded script (path must be absolute):"
-	@${ECHO_MSG} "make IPXE_EMBED=/path/to/ipxe/script install clean"
-	@${ECHO_MSG}
-	@${ECHO_MSG} "To build iPXE with new trusted root certificates"
-	@${ECHO_MSG} "(see http://ipxe.org/crypto for more information):"
-	@${ECHO_MSG} "make IPXE_TRUST=/path/to/ca1.crt,/path/to/ca2.crt"
-
-pre-build:
+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-install:
 	@${MKDIR} ${STAGEDIR}${DATADIR}
-	${INSTALL_DATA} ${WRKSRC}/bin/ipxe.dsk ${STAGEDIR}${DATADIR}
-	${INSTALL_DATA} ${WRKSRC}/bin/ipxe.usb ${STAGEDIR}${DATADIR}
-	${INSTALL_DATA} ${WRKSRC}/bin/ipxe.iso ${STAGEDIR}${DATADIR}
-	${INSTALL_DATA} ${WRKSRC}/bin/ipxe.pxe ${STAGEDIR}${DATADIR}
-	${INSTALL_DATA} ${WRKSRC}/bin/ipxe.lkrn ${STAGEDIR}${DATADIR}
+	cd ${WRKSRC} && ${INSTALL_DATA} ${ALL_TARGET} ${STAGEDIR}${DATADIR}
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
 
 RUN_DEPENDS:=	${RUN_DEPENDS:Ngcc*}

Modified: head/net/ipxe/distinfo
==============================================================================
--- head/net/ipxe/distinfo	Tue Feb 27 20:22:55 2018	(r463160)
+++ head/net/ipxe/distinfo	Tue Feb 27 20:55:28 2018	(r463161)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1516720491
-SHA256 (ipxe-ipxe-20180117-fbe8c52d0d9cdb3d6f5fe8be8edab54618becc1f_GH0.tar.gz) = f17e9aa91be92556b64e0eefbc1c20e28dec6cbeee7c25faa80ef558eb3dfb77
-SIZE (ipxe-ipxe-20180117-fbe8c52d0d9cdb3d6f5fe8be8edab54618becc1f_GH0.tar.gz) = 3768828
+TIMESTAMP = 1519713504
+SHA256 (ipxe-ipxe-20180220-47849be3a900c546cf92066849be0806f4e611d9_GH0.tar.gz) = 00c5e40965af555009fc29d7b640e3cecddd25ca2e930a2dcaa0e2bd366a36c1
+SIZE (ipxe-ipxe-20180220-47849be3a900c546cf92066849be0806f4e611d9_GH0.tar.gz) = 3769882

Added: head/net/ipxe/files/patch-util_elf2efi.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/ipxe/files/patch-util_elf2efi.c	Tue Feb 27 20:55:28 2018	(r463161)
@@ -0,0 +1,11 @@
+--- util/elf2efi.c.orig	2018-02-27 10:48:55 UTC
++++ util/elf2efi.c
+@@ -73,7 +73,7 @@
+ #define ELF_MREL( mach, type ) ( (mach) | ( (type) << 16 ) )
+ 
+ /* Allow for building with older versions of elf.h */
+-#ifndef EM_AARCH64
++#if !defined(EM_AARCH64) || defined(__FreeBSD__)
+ #define EM_AARCH64 183
+ #define R_AARCH64_NONE 0
+ #define R_AARCH64_ABS64 257



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802272055.w1RKtS5k003071>