git: 41b50dc09d06 - main - sysutils/intel-nvmupdate-10g: add a port for nvmupdate for Intel 10G NICs

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Wed, 14 Jun 2023 12:50:20 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=41b50dc09d06c63ab469adbb9430a5c0aabae510

commit 41b50dc09d06c63ab469adbb9430a5c0aabae510
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2023-06-14 10:57:41 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2023-06-14 12:50:02 +0000

    sysutils/intel-nvmupdate-10g: add a port for nvmupdate for Intel 10G NICs
---
 sysutils/Makefile                                  |  1 +
 sysutils/intel-nvmupdate-10g/Makefile              | 44 ++++++++++++++++++++++
 sysutils/intel-nvmupdate-10g/distinfo              |  3 ++
 .../intel-nvmupdate-10g/files/nvmupdate-10g.in     |  4 ++
 sysutils/intel-nvmupdate-10g/pkg-descr             |  3 ++
 sysutils/intel-nvmupdate-10g/pkg-message           | 29 ++++++++++++++
 sysutils/intel-nvmupdate-10g/pkg-plist             | 28 ++++++++++++++
 7 files changed, 112 insertions(+)

diff --git a/sysutils/Makefile b/sysutils/Makefile
index c5a04e54a6c2..a351b6582d84 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -564,6 +564,7 @@
     SUBDIR += incron
     SUBDIR += inotify-tools
     SUBDIR += installwatch
+    SUBDIR += intel-nvmupdate-10g
     SUBDIR += intel-nvmupdate-40g
     SUBDIR += intel-pcm
     SUBDIR += intel-undervolt
diff --git a/sysutils/intel-nvmupdate-10g/Makefile b/sysutils/intel-nvmupdate-10g/Makefile
new file mode 100644
index 000000000000..b035b0a42f92
--- /dev/null
+++ b/sysutils/intel-nvmupdate-10g/Makefile
@@ -0,0 +1,44 @@
+PORTNAME=	nvmupdate
+DISTVERSION=	3_60
+CATEGORIES=	sysutils
+MASTER_SITES=	https://downloadmirror.intel.com/727467/
+PKGNAMEPREFIX=	intel-
+PKGNAMESUFFIX=	-10g
+DISTNAME=	X550_NVMUpdatePackage_v${DISTVERSION}_FreeBSD
+
+MAINTAINER=	freebsd@intel.com
+COMMENT=	NVM Update Utility for Intel(R) 10G Ethernet Adapters
+WWW=		https://downloadcenter.intel.com
+
+LICENSE=		IFL IPL
+LICENSE_COMB=		multi
+
+IGNORE_DragonFly=	FreeBSD binary port
+ONLY_FOR_ARCHS=		amd64
+ONLY_FOR_ARCHS_REASON=	not supported on anything other than amd64
+
+LICENSE_NAME_IFL=	Intel Firmware License
+LICENSE_FILE_IFL=	${WRKSRC}/Intel_firmware_license.txt
+LICENSE_PERMS_IFL=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
+
+LICENSE_NAME_IPL=	Intel Proprietary License
+LICENSE_FILE_IPL=	${WRKSRC}/license.txt
+LICENSE_PERMS_IPL=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
+
+WRKSRC=			${WRKDIR}/X550/FreeBSDx64
+NO_BUILD=		yes
+NO_ARCH=		yes
+NO_ARCH_IGNORE=		nvmupdate64e
+
+SUB_FILES=	nvmupdate-10g
+SUB_LIST=	NVMUPDATE_DIR=${NVMUPDATE_DIR}
+
+NVMUPDATE_DIR=	intel-nvmupdate-10g
+
+do-install:
+	${MKDIR} ${STAGEDIR}${PREFIX}/${NVMUPDATE_DIR}
+	cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/${NVMUPDATE_DIR} "! -name 'nvmupdate64e'"
+	${INSTALL_PROGRAM} ${WRKSRC}/nvmupdate64e ${STAGEDIR}${PREFIX}/${NVMUPDATE_DIR}
+	${INSTALL_SCRIPT} ${WRKDIR}/nvmupdate-10g ${STAGEDIR}${PREFIX}/sbin/
+
+.include <bsd.port.mk>
diff --git a/sysutils/intel-nvmupdate-10g/distinfo b/sysutils/intel-nvmupdate-10g/distinfo
new file mode 100644
index 000000000000..1247101eee05
--- /dev/null
+++ b/sysutils/intel-nvmupdate-10g/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1686739454
+SHA256 (X550_NVMUpdatePackage_v3_60_FreeBSD.tar.gz) = 9d1af27a0e26afca1031f40759e3372d625d37d076dfb03db7055d390e15e62f
+SIZE (X550_NVMUpdatePackage_v3_60_FreeBSD.tar.gz) = 10362052
diff --git a/sysutils/intel-nvmupdate-10g/files/nvmupdate-10g.in b/sysutils/intel-nvmupdate-10g/files/nvmupdate-10g.in
new file mode 100644
index 000000000000..d971f089df19
--- /dev/null
+++ b/sysutils/intel-nvmupdate-10g/files/nvmupdate-10g.in
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+cd %%PREFIX%%/%%NVMUPDATE_DIR%%
+./nvmupdate64e $@
diff --git a/sysutils/intel-nvmupdate-10g/pkg-descr b/sysutils/intel-nvmupdate-10g/pkg-descr
new file mode 100644
index 000000000000..330bc8532e58
--- /dev/null
+++ b/sysutils/intel-nvmupdate-10g/pkg-descr
@@ -0,0 +1,3 @@
+This package contains all the required files to update the NVM on the
+Intel(R) Ethernet adapters in your system. It contains the NVMUpdate utility,
+configuration file, updated NVM binaries, and required driver files.
diff --git a/sysutils/intel-nvmupdate-10g/pkg-message b/sysutils/intel-nvmupdate-10g/pkg-message
new file mode 100644
index 000000000000..f1be837ba9e2
--- /dev/null
+++ b/sysutils/intel-nvmupdate-10g/pkg-message
@@ -0,0 +1,29 @@
+[
+{ type: install
+  message: <<EOM
+THIS PACKAGE INSTALLS THE NEWER VERSION OF THE SOFTWARE WHICH CAN CAUSE SYSTEM
+INSTABILITY WHILE USED. USE THE UPDATED VERSION ONLY IF YOU EXPERIENCE
+PROBLEMS WITH THE PRESENT NVM IMAGE VERSION
+
+This package should only be used on Intel branded adapters. Please contact your
+OEM vendor for an appropriate package. This package only updates the NVM image.
+It does not update the preboot image. To update your preboot image, please
+download the appropriate package.
+
+DO NOT
+- Power down your system during the NVM Update.
+- Remove the NIC before the NVM Update completes.
+- Interrupt the NVM Update in any other way.
+Doing so may make your device unusable.
+
+For the package to function properly please make sure you have latest ix driver
+installed. If necessary - install the updated version from net/intel-ix-kmod
+
+Usage:
+# nvmupdate
+
+Getting help:
+# nvmupdate -h
+EOM
+}
+]
diff --git a/sysutils/intel-nvmupdate-10g/pkg-plist b/sysutils/intel-nvmupdate-10g/pkg-plist
new file mode 100644
index 000000000000..7ff6a20983e6
--- /dev/null
+++ b/sysutils/intel-nvmupdate-10g/pkg-plist
@@ -0,0 +1,28 @@
+intel-nvmupdate-10g/Intel_Proprietary_License.pdf
+intel-nvmupdate-10g/Intel_firmware_license.txt
+intel-nvmupdate-10g/OEMG_sagePond_B0_AT2_MCTP_H49289_3p60.bin
+intel-nvmupdate-10g/OEMG_sagePond_B0_AT_MCTP_H89173_3p60.bin
+intel-nvmupdate-10g/Retail_SagePond_B0_AT2_noMNG_H86377_3p60.bin
+intel-nvmupdate-10g/Retail_SagePond_B0_AT_SP_noMNG_H92506_3p60.bin
+intel-nvmupdate-10g/dSGVL_0.txt
+intel-nvmupdate-10g/dSGVL_1.txt
+intel-nvmupdate-10g/dSGVL_B0_AT2_MCTP_3p60.bin
+intel-nvmupdate-10g/dSGVL_B0_AT2_NCSI_3p60.bin
+intel-nvmupdate-10g/dSGVL_B0_AT2_SMB_3p60.bin
+intel-nvmupdate-10g/dSGVL_B0_AT2_noMNG_3p60.bin
+intel-nvmupdate-10g/dSGVL_B0_AT_SP_MCTP_3p60.bin
+intel-nvmupdate-10g/dSGVL_B0_AT_SP_NCSI_3p60.bin
+intel-nvmupdate-10g/dSGVL_B0_AT_SP_SMB_3p60.bin
+intel-nvmupdate-10g/dSGVL_B0_AT_SP_noMNG_3p60.bin
+intel-nvmupdate-10g/dSGVL_B0_BT2_MCTP_3p60.bin
+intel-nvmupdate-10g/dSGVL_B0_BT2_NCSI_3p60.bin
+intel-nvmupdate-10g/dSGVL_B0_BT2_SMB_3p60.bin
+intel-nvmupdate-10g/dSGVL_B0_BT2_noMNG_3p60.bin
+intel-nvmupdate-10g/file_license.txt
+intel-nvmupdate-10g/license.pdf
+intel-nvmupdate-10g/license.txt
+intel-nvmupdate-10g/nvmupdate.cfg
+intel-nvmupdate-10g/nvmupdate64e
+intel-nvmupdate-10g/readme.txt
+intel-nvmupdate-10g/version.txt
+sbin/nvmupdate-10g