Skip to content

Commit

Permalink
sysutils/devcpu-data-amd: Download microcode from ucode repo
Browse files Browse the repository at this point in the history
- Download AMD microcode firmware from git.kernel.org.

- Make updates slightly simpler by referencing ${DISTFILES} rather than
  repeating the contents.

- Expand pkg-descr.

- Group and sort standard bsd.port.mk variables.

Reported by:	sbruno (maintainer)
Approved by:	sbruno (maintainer)
Differential Revision:	https://reviews.freebsd.org/D32935
  • Loading branch information
Jehops committed Nov 11, 2021
1 parent 8952cda commit 717c3a9
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 21 deletions.
26 changes: 15 additions & 11 deletions sysutils/devcpu-data-amd/Makefile
@@ -1,10 +1,15 @@
PORTNAME= data
PORTVERSION= 20211109
PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= LOCAL/sbruno
MASTER_SITES= https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/amd-ucode/
PKGNAMEPREFIX= devcpu-
PKGNAMESUFFIX= -amd
DISTNAME= amd64-microcode.${PORTVERSION}
DISTFILES= microcode_amd.bin \
microcode_amd_fam15h.bin \
microcode_amd_fam16h.bin \
microcode_amd_fam17h.bin \
microcode_amd_fam19h.bin

MAINTAINER= sbruno@FreeBSD.org
COMMENT= AMD CPUs microcode updates
Expand All @@ -16,21 +21,20 @@ LICENSE_PERMS= dist-mirror no-dist-sell pkg-mirror no-pkg-sell auto-accept

ONLY_FOR_ARCHS= amd64 i386

USES= tar:xz

EXTRACT_CMD= ${CP}
EXTRACT_BEFORE_ARGS= # empty
EXTRACT_AFTER_ARGS= .
NO_ARCH= yes
NO_BUILD= yes

NO_WRKSUBDIR= yes

DATADIR= ${PREFIX}/share/cpucontrol
NO_WRKSUBDIR= yes
PLIST_FILES= ${DISTFILES:S/^/${DATADIR}\//g}

do-install:
${MKDIR} ${STAGEDIR}${DATADIR}/
${INSTALL_DATA} ${WRKSRC}/microcode_amd.bin ${STAGEDIR}${DATADIR}/
${INSTALL_DATA} ${WRKSRC}/microcode_amd_fam15h.bin ${STAGEDIR}${DATADIR}/
${INSTALL_DATA} ${WRKSRC}/microcode_amd_fam16h.bin ${STAGEDIR}${DATADIR}/
${INSTALL_DATA} ${WRKSRC}/microcode_amd_fam17h.bin ${STAGEDIR}${DATADIR}/
${INSTALL_DATA} ${WRKSRC}/microcode_amd_fam19h.bin ${STAGEDIR}${DATADIR}/
.for f in ${DISTFILES}
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DATADIR}/
.endfor

.include <bsd.port.mk>
14 changes: 11 additions & 3 deletions sysutils/devcpu-data-amd/distinfo
@@ -1,3 +1,11 @@
TIMESTAMP = 1636501751
SHA256 (amd64-microcode.20211109.tar.xz) = eadfc633bb4390b18f383b96f782c14a5cec0d5712d4b8d525dc6f76f2ae7522
SIZE (amd64-microcode.20211109.tar.xz) = 49584
TIMESTAMP = 1636599094
SHA256 (microcode_amd.bin) = 8a9d9e8b788e31e61cddc03cb1eeab5db99e0f667128943ff0780e6437d2e43e
SIZE (microcode_amd.bin) = 12684
SHA256 (microcode_amd_fam15h.bin) = 9d4a668410e72a4bdb86dc23e4261eca04daa83456ada02504115223f356981a
SIZE (microcode_amd_fam15h.bin) = 7876
SHA256 (microcode_amd_fam16h.bin) = e02ad653b39c975d6c52674b50f23727bb6706bab7b4e5b391a4ce229e7ff121
SIZE (microcode_amd_fam16h.bin) = 3510
SHA256 (microcode_amd_fam17h.bin) = 5288d1ac032abe61441c5626091458803f925304ee45ca18de38a4edd66cddd2
SIZE (microcode_amd_fam17h.bin) = 6476
SHA256 (microcode_amd_fam19h.bin) = 8bdf0eba5d9c3e8cc960e1bb39a47caeaca6d59d7fcb265ac5efcae46731823f
SIZE (microcode_amd_fam19h.bin) = 16804
6 changes: 4 additions & 2 deletions sysutils/devcpu-data-amd/pkg-descr
@@ -1,2 +1,4 @@
This port uses the cpuctl(4) microcode update facility to keep your AMD
processor's firmware up-to-date.
Processor microcode updates provide bug fixes, which can be critical to
the security and stability of your system. This port uses the cpuctl(4)
microcode update facility to keep your AMD processor's firmware
up-to-date.
5 changes: 0 additions & 5 deletions sysutils/devcpu-data-amd/pkg-plist

This file was deleted.

0 comments on commit 717c3a9

Please sign in to comment.