pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Import amd-microcode-netbsd



Module Name:	pkgsrc-wip
Committed By:	kikadf <kikadf.01%gmail.com@localhost>
Pushed By:	kikadf
Date:		Sat Jun 13 13:35:29 2026 +0200
Changeset:	1d09a3f0689a1b447165fa6fc48a546eb0493630

Modified Files:
	Makefile
Added Files:
	amd-microcode-netbsd/DESCR
	amd-microcode-netbsd/Makefile
	amd-microcode-netbsd/PLIST
	amd-microcode-netbsd/amd-microcode-license
	amd-microcode-netbsd/distinfo
	amd-microcode-netbsd/files/README
	amd-microcode-netbsd/files/amd-microcode.sh

Log Message:
Import amd-microcode-netbsd

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=1d09a3f0689a1b447165fa6fc48a546eb0493630

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                                    |  1 +
 amd-microcode-netbsd/DESCR                  |  5 +++
 amd-microcode-netbsd/Makefile               | 43 +++++++++++++++++++
 amd-microcode-netbsd/PLIST                  |  9 ++++
 amd-microcode-netbsd/amd-microcode-license  | 64 +++++++++++++++++++++++++++++
 amd-microcode-netbsd/distinfo               |  5 +++
 amd-microcode-netbsd/files/README           |  5 +++
 amd-microcode-netbsd/files/amd-microcode.sh | 22 ++++++++++
 8 files changed, 154 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index c36bfb9a5a..2e6b73bf83 100644
--- a/Makefile
+++ b/Makefile
@@ -167,6 +167,7 @@ SUBDIR+=	alt-ergo
 SUBDIR+=	am-utils
 SUBDIR+=	am-utils-git
 SUBDIR+=	amavis-logwatch
+SUBDIR+=	amd-microcode-netbsd
 SUBDIR+=	amlogic-meson-fwtools
 SUBDIR+=	amneziawg-go
 SUBDIR+=	analizo
diff --git a/amd-microcode-netbsd/DESCR b/amd-microcode-netbsd/DESCR
new file mode 100644
index 0000000000..e24777027e
--- /dev/null
+++ b/amd-microcode-netbsd/DESCR
@@ -0,0 +1,5 @@
+The microcode data file contains the latest microcode definitions for all
+Intel processors. Intel releases microcode updates to correct processor
+behavior as documented in the respective processor specification updates.
+While the regular approach to getting this microcode update is via a BIOS
+upgrade, Intel realizes that this can be an administrative hassle.
diff --git a/amd-microcode-netbsd/Makefile b/amd-microcode-netbsd/Makefile
new file mode 100644
index 0000000000..9d07a51b3a
--- /dev/null
+++ b/amd-microcode-netbsd/Makefile
@@ -0,0 +1,43 @@
+# $NetBSD: $
+
+DISTNAME=	amd-microcode-netbsd-20260416
+CATEGORIES=	sysutils
+MASTER_SITES=	${MASTER_SITE_GITLAB:=kernel-firmware/}
+GITLAB_PROJECT=	linux-firmware
+GITLAB_TAG=	8c0d4738ee35318b8d51d8486663d7e7ae93a989
+
+MAINTAINER=	kikadf%NetBSD.org@localhost
+HOMEPAGE=	https://gitlab.com/kernel-firmware/linux-firmware
+COMMENT=	Firmware updates for AMD processors
+LICENSE=	amd-microcode-license
+
+# Use of this package relies on NetBSD's cpuctl(8).
+ONLY_FOR_PLATFORM+=	NetBSD-*-i386 NetBSD-*-x86_64
+
+WRKSRC=		${WRKDIR}/linux-firmware-${GITLAB_TAG}/amd-ucode
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "NetBSD" && ${OPSYS_VERSION} < 069900
+PKG_SKIP_REASON+=	"Loading microcode not supported"
+.endif
+
+INSTALLATION_DIRS+=	libdata/firmware/amd-ucode
+INSTALLATION_DIRS+=	share/doc/amd-microcode-netbsd
+
+RCD_SCRIPTS+=	amd-microcode
+
+do-configure:
+
+do-build:
+
+do-install:
+	${INSTALL_DATA} ${FILESDIR}/README \
+		${DESTDIR}${PREFIX}/share/doc/amd-microcode-netbsd
+	${INSTALL_DATA} ${WRKSRC}/README \
+		${DESTDIR}${PREFIX}/libdata/firmware/amd-ucode
+	${FIND} ${WRKSRC} -type f -name "*.bin" -exec ${INSTALL_DATA} {} \
+		${DESTDIR}${PREFIX}/libdata/firmware/amd-ucode \;
+
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/amd-microcode-netbsd/PLIST b/amd-microcode-netbsd/PLIST
new file mode 100644
index 0000000000..f6155bf8d6
--- /dev/null
+++ b/amd-microcode-netbsd/PLIST
@@ -0,0 +1,9 @@
+@comment $NetBSD$
+libdata/firmware/amd-ucode/README
+libdata/firmware/amd-ucode/microcode_amd.bin
+libdata/firmware/amd-ucode/microcode_amd_fam15h.bin
+libdata/firmware/amd-ucode/microcode_amd_fam16h.bin
+libdata/firmware/amd-ucode/microcode_amd_fam17h.bin
+libdata/firmware/amd-ucode/microcode_amd_fam19h.bin
+libdata/firmware/amd-ucode/microcode_amd_fam1ah.bin
+share/doc/amd-microcode-netbsd/README
diff --git a/amd-microcode-netbsd/amd-microcode-license b/amd-microcode-netbsd/amd-microcode-license
new file mode 100644
index 0000000000..d882d266bb
--- /dev/null
+++ b/amd-microcode-netbsd/amd-microcode-license
@@ -0,0 +1,64 @@
+Copyright (C) 2010-2025 Advanced Micro Devices, Inc., All rights reserved.
+
+Permission is hereby granted by Advanced Micro Devices, Inc. ("AMD"),
+free of any license fees, to any person obtaining a copy of this
+microcode in binary form (the "Software") ("You"), to install,
+reproduce, copy and distribute copies of the Software and to permit
+persons to whom the Software is provided to do the same, subject to
+the following terms and conditions.  Your use of any portion of the
+Software shall constitute Your acceptance of the following terms and
+conditions. If You do not agree to the following terms and conditions,
+do not use, retain or redistribute any portion of the Software.
+
+If You redistribute this Software, You must reproduce the above
+copyright notice and this license with the Software.
+Without specific, prior, written permission from AMD, You may not
+reference AMD or AMD products in the promotion of any product derived
+from or incorporating this Software in any manner that implies that
+AMD endorses or has certified such product derived from or
+incorporating this Software.
+
+You may not reverse engineer, decompile, or disassemble this Software
+or any portion thereof.
+
+THE SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTY OF ANY KIND, INCLUDING BUT NOT LIMITED TO WARRANTIES OF
+MERCHANTABILITY, NONINFRINGEMENT, TITLE, FITNESS FOR ANY PARTICULAR
+PURPOSE, OR WARRANTIES ARISING FROM CONDUCT, COURSE OF DEALING, OR
+USAGE OF TRADE. IN NO EVENT SHALL AMD OR ITS LICENSORS BE LIABLE FOR
+ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR
+LOSS OF PROFITS, BUSINESS INTERRUPTION, OR LOSS OF DATA OR
+INFORMATION) ARISING OUT OF AMD'S NEGLIGENCE, GROSS NEGLIGENCE, THE
+USE OF OR INABILITY TO USE THE SOFTWARE, EVEN IF AMD HAS BEEN ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME JURISDICTIONS
+PROHIBIT THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR
+INCIDENTAL DAMAGES OR THE EXCLUSION OF IMPLIED WARRANTIES, THE ABOVE
+LIMITATION MAY NOT APPLY TO YOU.
+
+Without limiting the foregoing, the Software may implement third party
+technologies for which You must obtain licenses from parties other
+than AMD. You agree that AMD has not obtained or conveyed to You, and
+that You shall be responsible for obtaining the rights to use and/or
+distribute the applicable underlying intellectual property rights
+related to the third party technologies. These third party
+technologies are not licensed hereunder.
+
+If You use the Software (in whole or in part), You shall adhere to all
+applicable U.S., European, and other export laws, including but not
+limited to the U.S. Export Administration Regulations ("EAR"), (15
+C.F.R. Sections 730 through 774), and E.U. Council Regulation (EC) No
+1334/2000 of 22 June 2000. Further, pursuant to Section 740.6  of the
+EAR, You hereby certify that, except pursuant to a license granted by
+the United States Department of Commerce Bureau of Industry and
+Security or as otherwise permitted pursuant to a License Exception
+under the U.S. Export Administration Regulations ("EAR"), You will not
+(1) export, re-export or release to a national of a country in Country
+Groups D:1, E:1 or E:2 any restricted technology, software, or source
+code You receive hereunder, or (2) export to Country Groups D:1, E:1
+or E:2 the direct product of such technology or software, if such
+foreign produced direct product is subject to national security
+controls as identified on the Commerce Control List (currently found
+in Supplement 1 to Part 774 of EAR). For the most current Country
+Group listings, or for additional information about the EAR or Your
+obligations under those regulations, please refer to the U.S. Bureau
+of Industry and Security?s website at ttp://www.bis.doc.gov/.
diff --git a/amd-microcode-netbsd/distinfo b/amd-microcode-netbsd/distinfo
new file mode 100644
index 0000000000..77f7c7b1f0
--- /dev/null
+++ b/amd-microcode-netbsd/distinfo
@@ -0,0 +1,5 @@
+$NetBSD$
+
+BLAKE2s (amd-microcode-netbsd-20260416-8c0d4738ee35318b8d51d8486663d7e7ae93a989.tar.gz) = 5f39a53912f8f6f6a7170914b6892c949ad7539255e6bb0eafbf656875aa1600
+SHA512 (amd-microcode-netbsd-20260416-8c0d4738ee35318b8d51d8486663d7e7ae93a989.tar.gz) = 8c5bb9b974272afaa16c7292665d1f48c879c0e331c3ead06f20edb410866bf2edae5e75b3f41d7b1943bfe005cd89680457f80263c5b8b2934a85de98657523
+Size (amd-microcode-netbsd-20260416-8c0d4738ee35318b8d51d8486663d7e7ae93a989.tar.gz) = 923049668 bytes
diff --git a/amd-microcode-netbsd/files/README b/amd-microcode-netbsd/files/README
new file mode 100644
index 0000000000..085c43bc2a
--- /dev/null
+++ b/amd-microcode-netbsd/files/README
@@ -0,0 +1,5 @@
+$NetBSD: $
+
+To use ${PKGNAME} to update your system's microcode,
+be sure that sysctl hw.firmware.path includes your pkgsrc prefix.
+
diff --git a/amd-microcode-netbsd/files/amd-microcode.sh b/amd-microcode-netbsd/files/amd-microcode.sh
new file mode 100644
index 0000000000..7ba9095df8
--- /dev/null
+++ b/amd-microcode-netbsd/files/amd-microcode.sh
@@ -0,0 +1,22 @@
+#!@RCD_SCRIPTS_SHELL@
+
+# PROVIDE: microcode
+# REQUIRE: mountall
+#
+# attempts microcode update on all CPU cores (for AMD x86)
+#
+
+$_rc_subr_loaded . /etc/rc.subr
+
+name=microcode
+rcvar=$name
+start_cmd="microcode_start"
+stop_cmd=":"
+
+microcode_start()
+{
+	/usr/sbin/cpuctl ucode || true
+}
+
+load_rc_config $name
+run_rc_command "$1"


Home | Main Index | Thread Index | Old Index