diff options
author | tobik <tobik@FreeBSD.org> | 2018-02-28 04:55:28 +0800 |
---|---|---|
committer | tobik <tobik@FreeBSD.org> | 2018-02-28 04:55:28 +0800 |
commit | ae6037135fbd96cc73cbd5609ca491d581aca339 (patch) | |
tree | 0f1982d7762475772cd4dde847e8199fcfb1cf79 | |
parent | d9f630dc796a42ff19829517d86cad2bc3f5ede8 (diff) | |
download | freebsd-ports-gnome-ae6037135fbd96cc73cbd5609ca491d581aca339.tar.gz freebsd-ports-gnome-ae6037135fbd96cc73cbd5609ca491d581aca339.tar.zst freebsd-ports-gnome-ae6037135fbd96cc73cbd5609ca491d581aca339.zip |
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
-rw-r--r-- | net/ipxe/Makefile | 97 | ||||
-rw-r--r-- | net/ipxe/distinfo | 6 | ||||
-rw-r--r-- | net/ipxe/files/patch-config_general.h | 33 | ||||
-rw-r--r-- | net/ipxe/files/patch-util_elf2efi.c | 11 | ||||
-rw-r--r-- | net/ipxe/ipxestart.example | 6 |
5 files changed, 63 insertions, 90 deletions
diff --git a/net/ipxe/Makefile b/net/ipxe/Makefile index 348abd8fe771..3f3a21440c66 100644 --- a/net/ipxe/Makefile +++ b/net/ipxe/Makefile @@ -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 - -PLIST_FILES= %%DATADIR%%/ipxe.dsk \ - %%DATADIR%%/ipxe.usb \ - %%DATADIR%%/ipxe.iso \ - %%DATADIR%%/ipxe.pxe \ - %%DATADIR%%/ipxe.lkrn - SUB_FILES= pkg-message +WRKSRC_SUBDIR= src -.include <bsd.port.options.mk> - -ONLY_FOR_ARCHS= amd64 i386 -ONLY_FOR_ARCHS_REASON= not yet ported to anything other than amd64/i386 +# 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 + +OPTIONS_DEFAULT= ISO +OPTIONS_DEFINE= ISO + +ISO_DESC= Create bootable CD image + +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*} diff --git a/net/ipxe/distinfo b/net/ipxe/distinfo index aa7975bc82d1..407f383985bc 100644 --- a/net/ipxe/distinfo +++ b/net/ipxe/distinfo @@ -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 diff --git a/net/ipxe/files/patch-config_general.h b/net/ipxe/files/patch-config_general.h deleted file mode 100644 index 46480f70c57c..000000000000 --- a/net/ipxe/files/patch-config_general.h +++ /dev/null @@ -1,33 +0,0 @@ ---- config/general.h.orig 2016-12-08 09:35:52 UTC -+++ config/general.h -@@ -35,7 +35,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - */ - - #define NET_PROTO_IPV4 /* IPv4 protocol */ --#undef NET_PROTO_IPV6 /* IPv6 protocol */ -+#define NET_PROTO_IPV6 /* IPv6 protocol */ - #undef NET_PROTO_FCOE /* Fibre Channel over Ethernet protocol */ - #define NET_PROTO_STP /* Spanning Tree protocol */ - #define NET_PROTO_LACP /* Link Aggregation control protocol */ -@@ -54,10 +54,10 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - - #define DOWNLOAD_PROTO_TFTP /* Trivial File Transfer Protocol */ - #define DOWNLOAD_PROTO_HTTP /* Hypertext Transfer Protocol */ --#undef DOWNLOAD_PROTO_HTTPS /* Secure Hypertext Transfer Protocol */ -+#define DOWNLOAD_PROTO_HTTPS /* Secure Hypertext Transfer Protocol */ - #undef DOWNLOAD_PROTO_FTP /* File Transfer Protocol */ - #undef DOWNLOAD_PROTO_SLAM /* Scalable Local Area Multicast */ --#undef DOWNLOAD_PROTO_NFS /* Network File System Protocol */ -+#define DOWNLOAD_PROTO_NFS /* Network File System Protocol */ - //#undef DOWNLOAD_PROTO_FILE /* Local filesystem access */ - - /* -@@ -141,7 +141,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - //#define PXE_CMD /* PXE commands */ - //#define REBOOT_CMD /* Reboot command */ - //#define POWEROFF_CMD /* Power off command */ --//#define IMAGE_TRUST_CMD /* Image trust management commands */ -+#define IMAGE_TRUST_CMD /* Image trust management commands */ - //#define PCI_CMD /* PCI commands */ - //#define PARAM_CMD /* Form parameter commands */ - //#define NEIGHBOUR_CMD /* Neighbour management commands */ diff --git a/net/ipxe/files/patch-util_elf2efi.c b/net/ipxe/files/patch-util_elf2efi.c new file mode 100644 index 000000000000..e3d1a367dca9 --- /dev/null +++ b/net/ipxe/files/patch-util_elf2efi.c @@ -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 diff --git a/net/ipxe/ipxestart.example b/net/ipxe/ipxestart.example deleted file mode 100644 index bdba446cdb73..000000000000 --- a/net/ipxe/ipxestart.example +++ /dev/null @@ -1,6 +0,0 @@ -#!ipxe -# An example iPXE start script -# To build iPXE with this script embedded build the port with: -# make IPXE_EMBED=${PWD}/ipxestart.example -ifconf -chain https://boot.ipxe.org/demo/boot.php |