Changeset View
Standalone View
net/ipxe/Makefile
# Created by: Guerkan Karaman <gk.freebsd@googlemail.com> | # Created by: Guerkan Karaman <gk.freebsd@googlemail.com> | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
PORTNAME= ipxe | PORTNAME= ipxe | ||||
PORTVERSION= 20180220 | PORTVERSION= 20180220 | ||||
PORTREVISION= 1 | PORTREVISION= 2 | ||||
CATEGORIES= net | CATEGORIES= net | ||||
MAINTAINER= tobik@FreeBSD.org | MAINTAINER= tobik@FreeBSD.org | ||||
COMMENT= Open source network boot firmware | COMMENT= Open source network boot firmware | ||||
LICENSE= GPLv2 | LICENSE= GPLv2 | ||||
ONLY_FOR_ARCHS= amd64 i386 | ONLY_FOR_ARCHS= amd64 i386 | ||||
Show All 9 Lines | |||||
# Q: Which version of iPXE should I use? | # Q: Which version of iPXE should I use? | ||||
# | # | ||||
# A: iPXE uses a rolling release model, in which every commit is intended | # A: iPXE uses a rolling release model, in which every commit is intended | ||||
# to be production-ready. You should always use the latest code. | # to be production-ready. You should always use the latest code. | ||||
# | # | ||||
GH_TAGNAME= 47849be3a900c546cf92066849be0806f4e611d9 | GH_TAGNAME= 47849be3a900c546cf92066849be0806f4e611d9 | ||||
USE_PERL5= build | 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} \ | MAKE_ARGS= HOST_CC=${CC} \ | ||||
PERL=${PERL} \ | PERL=${PERL} \ | ||||
CC=${CC} \ | CC=${CC} \ | ||||
AS=${AS} \ | AS=${AS} \ | ||||
LD=${LD} \ | LD=${LD} \ | ||||
SIZE=${SIZE} \ | SIZE=${SIZE} \ | ||||
AR=${AR} \ | AR=${AR} \ | ||||
RANLIB=${RANLIB} \ | RANLIB=${RANLIB} \ | ||||
Show All 18 Lines | _IPXE_BUILDCFG= branding:PRODUCT_NAME="${PKGNAME} (${OPSYS} ${OSREL}/${ARCH})" \ | ||||
general:!DOWNLOAD_PROTO_FTP \ | general:!DOWNLOAD_PROTO_FTP \ | ||||
general:DOWNLOAD_PROTO_HTTPS \ | general:DOWNLOAD_PROTO_HTTPS \ | ||||
general:DOWNLOAD_PROTO_NFS \ | general:DOWNLOAD_PROTO_NFS \ | ||||
general:IMAGE_TRUST_CMD \ | general:IMAGE_TRUST_CMD \ | ||||
general:NET_PROTO_IPV6 \ | general:NET_PROTO_IPV6 \ | ||||
general:PING_CMD \ | general:PING_CMD \ | ||||
general:POWEROFF_CMD | general:POWEROFF_CMD | ||||
OPTIONS_DEFAULT= ISO | OPTIONS_DEFAULT= ISO EFI | ||||
OPTIONS_DEFINE= ISO | OPTIONS_DEFINE= ISO EFI | ||||
EFI_DESC= Create EFI image | |||||
ISO_DESC= Create bootable CD image | ISO_DESC= Create bootable CD image | ||||
EFI_ARCHS= i386 ${"${ARCH:Mi386}" != "":? : x86_64} | |||||
.for _arch in ${EFI_ARCHS} | |||||
EFI_PLIST_FILES+= ${DATADIR}/ipxe.efi-${_arch} | |||||
.endfor | |||||
ISO_ALL_TARGET= bin/ipxe.iso | ISO_ALL_TARGET= bin/ipxe.iso | ||||
ISO_BUILD_DEPENDS= bash:shells/bash \ | ISO_BUILD_DEPENDS= bash:shells/bash \ | ||||
${LOCALBASE}/share/syslinux/bios/core/isolinux.bin:sysutils/syslinux \ | ${LOCALBASE}/share/syslinux/bios/core/isolinux.bin:sysutils/syslinux \ | ||||
mkisofs:sysutils/cdrtools | mkisofs:sysutils/cdrtools | ||||
ISO_MAKE_ARGS= ISOLINUX_BIN="${WRKSRC}/isolinux.bin" \ | ISO_MAKE_ARGS= ISOLINUX_BIN="${WRKSRC}/isolinux.bin" \ | ||||
LDLINUX_C32="${LOCALBASE}/share/syslinux/bios/com32/elflink/ldlinux/ldlinux.c32" | LDLINUX_C32="${LOCALBASE}/share/syslinux/bios/com32/elflink/ldlinux/ldlinux.c32" | ||||
.include <bsd.port.pre.mk> | .include <bsd.port.pre.mk> | ||||
tobik: Options description should form their own block, so please move EFI_DESC to the options… | |||||
# Add user supplied build configuration after port options etc have | # Add user supplied build configuration after port options etc have | ||||
# been processed as they might want to overwrite some settings. | # been processed as they might want to overwrite some settings. | ||||
_IPXE_BUILDCFG+= ${IPXE_BUILDCFG} | _IPXE_BUILDCFG+= ${IPXE_BUILDCFG} | ||||
do-configure: | do-configure: | ||||
.for _cat _opt in ${_IPXE_BUILDCFG:C/\:/ /} | .for _cat _opt in ${_IPXE_BUILDCFG:C/\:/ /} | ||||
Done Inline ActionsPlease remove UNDIONLY . I see no reason why this has to be an option. We can just always build it. The new images also need to be mentioned in the pkg-message. tobik: Please remove UNDIONLY . I see no reason why this has to be an option. We can just always build… | |||||
Done Inline ActionsI'm not sure how to best do this conditionally. fabian.freyer_physik.tu-berlin.de: I'm not sure how to best do this conditionally. | |||||
Done Inline ActionsAlways having them in the pkg-message is fine with me. No point in making this more complicated. tobik: Always having them in the pkg-message is fine with me. No point in making this more complicated. | |||||
@${ECHO_CMD} '#undef ${_opt:S/^!//:C/(.*)=(.*)/\1/}' >> ${WRKSRC}/config/local/${_cat}.h | @${ECHO_CMD} '#undef ${_opt:S/^!//:C/(.*)=(.*)/\1/}' >> ${WRKSRC}/config/local/${_cat}.h | ||||
.if ${_opt:N!*} | .if ${_opt:N!*} | ||||
@${ECHO_CMD} '#define ${_opt:C/=/ /:S/^'//:S/'$//}' >> ${WRKSRC}/config/local/${_cat}.h | @${ECHO_CMD} '#define ${_opt:C/=/ /:S/^'//:S/'$//}' >> ${WRKSRC}/config/local/${_cat}.h | ||||
.endif | .endif | ||||
.endfor | .endfor | ||||
pre-build-ISO-on: | pre-build-ISO-on: | ||||
Done Inline ActionsThis needs to be after pre-build-ISO-on tobik: This needs to be after pre-build-ISO-on | |||||
# ISO creation fails if isolinux.bin is read only | # ISO creation fails if isolinux.bin is read only | ||||
${INSTALL} -m 644 ${LOCALBASE}/share/syslinux/bios/core/isolinux.bin ${WRKSRC}/isolinux.bin | ${INSTALL} -m 644 ${LOCALBASE}/share/syslinux/bios/core/isolinux.bin ${WRKSRC}/isolinux.bin | ||||
Done Inline Actionscd ${WRKSRC} && ${DO_MAKE_BUILD} => ${DO_MAKE_BUILD} -C ${WRKSRC} tobik: ` cd ${WRKSRC} && ${DO_MAKE_BUILD}` => ` ${DO_MAKE_BUILD} -C ${WRKSRC}` | |||||
Done Inline ActionsI just took this from the default do-build target in bsd.port.mk. Changed it now though. fabian.freyer_physik.tu-berlin.de: I just took this from the default `do-build` target in `bsd.port.mk`. Changed it now though. | |||||
Done Inline Actionsbin-x86_64-efi/ipxe.efi fails to build on i386, so I think we need to either not build the EFI images on i386 via OPTIONS_EXCLUDE_i386=EFI or restrict ourselves to only build bin-i386-efi/ipxe.efi on i386 libgcc/__divdi3.c:1:0: sorry, unimplemented: 64-bit mode not compiled in /* libgcc/icc.c:1:0: sorry, unimplemented: 64-bit mode not compiled in /* tobik: `bin-x86_64-efi/ipxe.efi` fails to build on i386, so I think we need to either not build the… | |||||
do-build-EFI-on: | |||||
.for _arch in ${EFI_ARCHS} | |||||
Done Inline Actions... and this after do-install tobik: ... and this after do-install | |||||
${DO_MAKE_BUILD} ARCH=${_arch} -C ${WRKSRC} bin-${_arch}-efi/ipxe.efi | |||||
.endfor | |||||
Done Inline Actionscd ${WRKSRC} is pointless here. Make it part of the INSTALL_DATA command tobik: `cd ${WRKSRC}` is pointless here. Make it part of the INSTALL_DATA command | |||||
do-install: | do-install: | ||||
@${MKDIR} ${STAGEDIR}${DATADIR} | @${MKDIR} ${STAGEDIR}${DATADIR} | ||||
cd ${WRKSRC} && ${INSTALL_DATA} ${ALL_TARGET} ${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> | .include <bsd.port.post.mk> | ||||
RUN_DEPENDS:= ${RUN_DEPENDS:Ngcc*} | RUN_DEPENDS:= ${RUN_DEPENDS:Ngcc*} |
Options description should form their own block, so please move EFI_DESC to the options description block i.e. before ISO_DESC
The other EFI_* options helper need to be moved before the ISO_* options helpers. Keep them sorted.