summaryrefslogtreecommitdiff
path: root/sys-firmware
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-09-25 19:33:39 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-09-25 19:33:39 +0100
commita5b65c81168c90928784a1e92cda84ed5d6b9eb3 (patch)
tree4aa7483cd0ad7de54338afc8e7971417abe1dd81 /sys-firmware
parente8f81810baa21f490d6910e8e2d424546b72a333 (diff)
gentoo resync : 25.09.2019
Diffstat (limited to 'sys-firmware')
-rw-r--r--sys-firmware/Manifest.gzbin5041 -> 5037 bytes
-rw-r--r--sys-firmware/intel-microcode/Manifest3
-rw-r--r--sys-firmware/intel-microcode/intel-microcode-20190918_p20190918.ebuild248
-rw-r--r--sys-firmware/seabios/Manifest2
-rw-r--r--sys-firmware/seabios/seabios-1.11.0-r1.ebuild42
5 files changed, 286 insertions, 9 deletions
diff --git a/sys-firmware/Manifest.gz b/sys-firmware/Manifest.gz
index efe7b3e08e6c..c55a865b74b3 100644
--- a/sys-firmware/Manifest.gz
+++ b/sys-firmware/Manifest.gz
Binary files differ
diff --git a/sys-firmware/intel-microcode/Manifest b/sys-firmware/intel-microcode/Manifest
index f0a617f72d10..13e951c311b4 100644
--- a/sys-firmware/intel-microcode/Manifest
+++ b/sys-firmware/intel-microcode/Manifest
@@ -1,4 +1,7 @@
DIST intel-microcode-collection-20190908.tar.xz 5265124 BLAKE2B c3d9b611e9ea052e28921ea8cfa4c9b0dad980cd527564cdc077e9af2935f83ee24eb3c784d6dfe8e627a372c8474a218f7447f4d174e1677e04e59880a938ac SHA512 0d55067c3933f35526f655c20d732545bce83089c5cb45092bf7a50f6f8acff7b97266fa0c8a94ab88c67c77f836e88910851de4db98939a3775fb02fe7fa231
+DIST intel-microcode-collection-20190918.tar.xz 5341868 BLAKE2B 9825b57dc4cacd35003ed4e9c581c7d07e49701b12467d726e6620076d25024e79a54f279d0d89924945805565c4ab0521f67fdb7ce7294996cc34f637ae2a33 SHA512 0eb1caff43f1009f8370692b23a74cde5c35f67dc03fddb74925be5cccd2b14a1a021086af7f92d39b8ddf80ac91f32ab4970fa338124d686536e9ea94f35e55
DIST microcode-20190618.tar.gz 2446418 BLAKE2B f5e4846c7d6d4251c8a53e7a238ce0be9530827d16a015b91beec9d2ba2186d6632d370342b4b7a898f32d294b3c8c12522d07ea40c13ebc75d40b8b83eb1da3 SHA512 f7717f476465705e14ea26b516cf7b1d04e29842da0924d7da5582346ad5dd5dfd8755041bdca8f3afa7fe64f138e91354498d87006fe4487701242858c24c17
+DIST microcode-20190918.tar.gz 2452786 BLAKE2B 63054290e3691883eab20a2e86d9ef0a8b4417a9efd4ca3e2a540b7013c65751b4c9f1fa345345a73d97321bf3cc88dfe05dd4dd941994613ad358ee4e981c07 SHA512 82e5212238d3e35470d139240d9157877ac252725598ec31bfe1763755681539a4ecdf24e04c4e4270215578a9ca3c063c8fc353accf99999c3d4ac2780a6e0c
EBUILD intel-microcode-20190618_p20190908.ebuild 8571 BLAKE2B 47d02586b98c8b78b798b07577e3b2ec609af2cb4e14e3c428acedd4dd673d3a2ccd37a06a2da338c00d2104f7d3f34d60cd3d1d2562d0a36a2a76810309f47f SHA512 933c15406dc5277896ccda6075b0afc02f5a86b70716d7e6ddafd81faeef2daa6970353cafa89a98cd31741fd0dbfefc5c6f388a22d85bd3e82656af8f1561f2
+EBUILD intel-microcode-20190918_p20190918.ebuild 8552 BLAKE2B 0b9a8351dddb883254899b4763bec619d8e4f1642becc8ce34aa7e29ccf793e7ce49cd424389b4f2f9b0074830d455797c9bd5db52beaef47a578987f491168d SHA512 b3d2b8a6df09fe39598a2773fa0c4e67f3847ca9122b9580094e8a8c96df71254f77bbb2ef3b50ad3383ee7896448adc3f429ab3de944749b9789f8084535dec
MISC metadata.xml 667 BLAKE2B f229775df839b3ddf34fcc289803ae113ad4b0ce293e036c24f3025bbd146d51c6e3ac55b4a7eb9b2ff0b6829aa020179ea4603f5e481de1c822a1deb66fd594 SHA512 a2d6bc54901a9eb12732e8fa0720c03b51ab615383f12a52019453b3a13f5c70233ee88a8d81706ce7e86eaec6d85155484cf32da288c3486d4b1a19647d2698
diff --git a/sys-firmware/intel-microcode/intel-microcode-20190918_p20190918.ebuild b/sys-firmware/intel-microcode/intel-microcode-20190918_p20190918.ebuild
new file mode 100644
index 000000000000..030826b2de0c
--- /dev/null
+++ b/sys-firmware/intel-microcode/intel-microcode-20190918_p20190918.ebuild
@@ -0,0 +1,248 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit linux-info toolchain-funcs mount-boot
+
+# Find updates by searching and clicking the first link (hopefully it's the one):
+# https://www.intel.com/content/www/us/en/search.html?keyword=Processor+Microcode+Data+File
+
+COLLECTION_SNAPSHOT="${PV##*_p}"
+INTEL_SNAPSHOT="${PV/_p*}"
+#NUM="28087"
+#https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=${NUM}
+#https://downloadmirror.intel.com/${NUM}/eng/microcode-${INTEL_SNAPSHOT}.tgz
+DESCRIPTION="Intel IA32/IA64 microcode update data"
+HOMEPAGE="https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files http://inertiawar.com/microcode/"
+SRC_URI="https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/archive/microcode-${INTEL_SNAPSHOT}.tar.gz
+ https://dev.gentoo.org/~whissi/dist/intel-microcode/intel-microcode-collection-${COLLECTION_SNAPSHOT}.tar.xz"
+
+LICENSE="intel-ucode"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE="hostonly initramfs +split-ucode vanilla"
+REQUIRED_USE="|| ( initramfs split-ucode )"
+
+BDEPEND="sys-apps/iucode_tool"
+
+# !<sys-apps/microcode-ctl-1.17-r2 due to bug #268586
+RDEPEND="hostonly? ( sys-apps/iucode_tool )"
+
+RESTRICT="binchecks bindist mirror strip"
+
+S=${WORKDIR}
+
+# Blacklist bad microcode here.
+# 0x000406f1 aka 06-4f-01 aka CPUID 406F1 require newer microcode loader
+MICROCODE_BLACKLIST_DEFAULT="-s !0x000406f1"
+
+# In case we want to set some defaults ...
+MICROCODE_SIGNATURES_DEFAULT=""
+
+# Advanced users only!
+# Set MIRCOCODE_SIGNATURES to merge with:
+# only current CPU: MICROCODE_SIGNATURES="-S"
+# only specific CPU: MICROCODE_SIGNATURES="-s 0x00000f4a -s 0x00010676"
+# exclude specific CPU: MICROCODE_SIGNATURES="-s !0x00000686"
+
+pkg_pretend() {
+ use initramfs && mount-boot_pkg_pretend
+}
+
+src_prepare() {
+ default
+
+ if cd Intel-Linux-Processor-Microcode-Data* &>/dev/null; then
+ # new tarball format from GitHub
+ mv * ../ || die "Failed to move Intel-Linux-Processor-Microcode-Data*"
+ cd .. || die
+ rm -r Intel-Linux-Processor-Microcode-Data* || die
+ fi
+
+ # Prevent "invalid file format" errors from iucode_tool
+ rm -f "${S}"/intel-ucod*/list || die
+}
+
+src_install() {
+ # This will take ALL of the upstream microcode sources:
+ # - microcode.dat
+ # - intel-ucode/
+ # In some cases, they have not contained the same content (eg the directory has newer stuff).
+ MICROCODE_SRC=(
+ "${S}"/intel-ucode/
+ "${S}"/intel-ucode-with-caveats/
+ )
+
+ # Allow users who are scared about microcode updates not included in Intel's official
+ # microcode tarball to opt-out and comply with Intel marketing
+ if ! use vanilla; then
+ MICROCODE_SRC+=( "${S}"/intel-microcode-collection-${COLLECTION_SNAPSHOT} )
+ fi
+
+ # These will carry into pkg_preinst via env saving.
+ : ${MICROCODE_BLACKLIST=${MICROCODE_BLACKLIST_DEFAULT}}
+ : ${MICROCODE_SIGNATURES=${MICROCODE_SIGNATUES_DEFAULT}}
+
+ opts=(
+ ${MICROCODE_BLACKLIST}
+ ${MICROCODE_SIGNATURES}
+ # be strict about what we are doing
+ --overwrite
+ --strict-checks
+ --no-ignore-broken
+ # we want to install latest version
+ --no-downgrade
+ # show everything we find
+ --list-all
+ # show what we selected
+ --list
+ )
+
+ # The earlyfw cpio needs to be in /boot because it must be loaded before
+ # rootfs is mounted.
+ use initramfs && dodir /boot && opts+=( --write-earlyfw="${ED}/boot/intel-uc.img" )
+
+ keepdir /lib/firmware/intel-ucode
+ opts+=( --write-firmware="${ED}/lib/firmware/intel-ucode" )
+
+ iucode_tool \
+ "${opts[@]}" \
+ "${MICROCODE_SRC[@]}" \
+ || die "iucode_tool ${opts[@]} ${MICROCODE_SRC[@]}"
+
+ dodoc releasenote
+}
+
+pkg_preinst() {
+ if [[ ${MICROCODE_BLACKLIST} != ${MICROCODE_BLACKLIST_DEFAULT} ]]; then
+ ewarn "MICROCODE_BLACKLIST is set to \"${MICROCODE_BLACKLIST}\" instead of default \"${MICROCODE_BLACKLIST_DEFAULT}\". You are on your own!"
+ fi
+
+ if [[ ${MICROCODE_SIGNATURES} != ${MICROCODE_SIGNATURES_DEFAULT} ]]; then
+ ewarn "Package was created using advanced options:"
+ ewarn "MICROCODE_SIGNATURES is set to \"${MICROCODE_SIGNATURES}\" instead of default \"${MICROCODE_SIGNATURES_DEFAULT}\"!"
+ fi
+
+ # Make sure /boot is available if needed.
+ use initramfs && mount-boot_pkg_preinst
+
+ local _initramfs_file="${ED}/boot/intel-uc.img"
+
+ if use hostonly; then
+ # While this output looks redundant we do this check to detect
+ # rare cases where iucode_tool was unable to detect system's processor(s).
+ local _detected_processors=$(iucode_tool --scan-system 2>&1)
+ if [[ -z "${_detected_processors}" ]]; then
+ ewarn "Looks like iucode_tool was unable to detect any processor!"
+ else
+ einfo "Only installing ucode(s) for ${_detected_processors#iucode_tool: system has } due to USE=hostonly ..."
+ fi
+
+ opts=(
+ --scan-system
+ # be strict about what we are doing
+ --overwrite
+ --strict-checks
+ --no-ignore-broken
+ # we want to install latest version
+ --no-downgrade
+ # show everything we find
+ --list-all
+ # show what we selected
+ --list
+ )
+
+ # The earlyfw cpio needs to be in /boot because it must be loaded before
+ # rootfs is mounted.
+ use initramfs && opts+=( --write-earlyfw=${_initramfs_file} )
+
+ if use split-ucode; then
+ opts+=( --write-firmware="${ED}/lib/firmware/intel-ucode" )
+ fi
+
+ opts+=( "${ED}/lib/firmware/intel-ucode-temp" )
+
+ mv "${ED}"/lib/firmware/intel-ucode{,-temp} || die
+ keepdir /lib/firmware/intel-ucode
+
+ iucode_tool "${opts[@]}" || die "iucode_tool ${opts[@]}"
+
+ rm -r "${ED}"/lib/firmware/intel-ucode-temp || die
+
+ elif ! use split-ucode; then # hostonly disabled
+ rm -r "${ED}"/lib/firmware/intel-ucode || die
+ fi
+
+ # Because it is possible that this package will install not one single file
+ # due to user selection which is still somehow unexpected we add the following
+ # check to inform user so that the user has at least a chance to detect
+ # a problem/invalid select.
+ local _has_installed_something=
+ if use initramfs && [[ -s "${_initramfs_file}" ]]; then
+ _has_installed_something="yes"
+ elif use split-ucode; then
+ _has_installed_something=$(find "${ED}/lib/firmware/intel-ucode" -maxdepth 0 -not -empty -exec echo yes \;)
+ fi
+
+ if use hostonly && [[ -n "${_has_installed_something}" ]]; then
+ elog "You only installed ucode(s) for all currently available (=online)"
+ elog "processor(s). Remember to re-emerge this package whenever you"
+ elog "change the system's processor model."
+ elog ""
+ elif [[ -z "${_has_installed_something}" ]]; then
+ ewarn "WARNING:"
+ if [[ ${MICROCODE_SIGNATURES} != ${MICROCODE_SIGNATURES_DEFAULT} ]]; then
+ ewarn "No ucode was installed! Because you have created this package"
+ ewarn "using MICROCODE_SIGNATURES variable please double check if you"
+ ewarn "have an invalid select."
+ ewarn "It's rare but it is also possible that just no ucode update"
+ ewarn "is available for your processor(s). In this case it is safe"
+ ewarn "to ignore this warning."
+ else
+ ewarn "No ucode was installed! It's rare but it is also possible"
+ ewarn "that just no ucode update is available for your processor(s)."
+ ewarn "In this case it is safe to ignore this warning."
+ fi
+
+ ewarn ""
+
+ if use hostonly; then
+ ewarn "Unset \"hostonly\" USE flag to install all available ucodes."
+ ewarn ""
+ fi
+ fi
+}
+
+pkg_prerm() {
+ # Make sure /boot is mounted so that we can remove /boot/intel-uc.img!
+ use initramfs && mount-boot_pkg_prerm
+}
+
+pkg_postrm() {
+ # Don't forget to umount /boot if it was previously mounted by us.
+ use initramfs && mount-boot_pkg_postrm
+}
+
+pkg_postinst() {
+ # Don't forget to umount /boot if it was previously mounted by us.
+ use initramfs && mount-boot_pkg_postinst
+
+ # We cannot give detailed information if user is affected or not:
+ # If MICROCODE_BLACKLIST wasn't modified, user can still use MICROCODE_SIGNATURES
+ # to to force a specific, otherwise blacklisted, microcode. So we
+ # only show a generic warning based on running kernel version:
+ if kernel_is -lt 4 14 34; then
+ ewarn "${P} contains microcode updates which require"
+ ewarn "additional kernel patches which aren't yet included in kernel <4.14.34."
+ ewarn "Loading such a microcode through kernel interface from an unpatched kernel"
+ ewarn "can crash your system!"
+ ewarn ""
+ ewarn "Those microcodes are blacklisted per default. However, if you have altered"
+ ewarn "MICROCODE_BLACKLIST or MICROCODE_SIGNATURES, you maybe have unintentionally"
+ ewarn "re-enabled those microcodes...!"
+ ewarn ""
+ ewarn "Check \"${EROOT}/usr/share/doc/${PN}-*/releasenot*\" if your microcode update"
+ ewarn "requires additional kernel patches or not."
+ fi
+}
diff --git a/sys-firmware/seabios/Manifest b/sys-firmware/seabios/Manifest
index 494a32798f1e..3bf5fb20edae 100644
--- a/sys-firmware/seabios/Manifest
+++ b/sys-firmware/seabios/Manifest
@@ -14,7 +14,7 @@ DIST seabios-1.11.0.tar.gz 607746 BLAKE2B 9f688be6b8f7c0fcbd72b59ac649a9c763fdd9
DIST seabios-1.12.0-bin.tar.xz 162492 BLAKE2B 9a5a349226ed7efbed328493dc057e232203b251677a23f1f09c133743ff0ca6b05270c9d27460be1d8897888fe23ff7bdfa122023fa8ddb23af03d5b9b6f8dd SHA512 f7a0395d621245093bb9a278d95ecc3d4e8d23f620058cd4fddaf885c8b86256f6258f3fd8173c1d24c03306f44d180e768bf8005ee123bc4b699b9f0ca371be
DIST seabios-1.12.0.tar.gz 613542 BLAKE2B f145c2db716996bfa9e5c014086ccfaa8ae96ebc158f34303b122b7bf209408c567665d8691364df8d8e886f63e0e72a3f3cd319dfa86ef581023201b5d94e53 SHA512 e52c5363e5bb37b5286e55545aa06bd126218f9d0e3a06ac2e189de68fe3de3256c11ca1bb13357a9c384d7e3af6284083ff3aa587688b5de04ef11b97bdfa27
EBUILD seabios-1.10.2.ebuild 3409 BLAKE2B b39299fbca9c8641333882be197c181fc780e440f5f05309ffe1155afaddd2c73a4d9114fd060b6cf6c8fea364ad2094d89b17ba50cf17038d6114038eb7ee7d SHA512 27c2b5482787cd9e52d7784059971cf3eaaaf89d9930edafda3346b13462c9fd093afc02d648f10f4295922b1425f75b9cdd1c17521f36f99aef6235ec27efa7
-EBUILD seabios-1.11.0-r1.ebuild 3485 BLAKE2B 06b5cd36ca5abf255c5f76785ac457c0017bca5755ace55a4065a4ba0237471f1728233ea7fe12f68f86abf136a18fe5ea12e070169f93aff1857923ba944fbb SHA512 1415659b8dded4f3bb0b7bf311641d7fef5920ee8f3aac7bfd4dbacb48e427259fa234535fb1a2049f6b419bb4ad47b4c684e4dfe2902ca1717d5abb5e8e943e
+EBUILD seabios-1.11.0-r1.ebuild 4099 BLAKE2B 6a33dfa9eeda45a463ab4fa9a057b6b47351d69f36617eb097d442963c320447c484443c663313c7469bcf1c21301e66de75e7f311b5a9263b953a7dd362a909 SHA512 f84a7448203251f2fbb769243eedb539f9c04e0af8f8f50352518f8194a38c5e075a39a029bff69350d5a247068231cf0b1ec907750809d22e8704c4f60b9534
EBUILD seabios-1.11.0.ebuild 3325 BLAKE2B f90f4e73373ca40ecc98e0f11e16f9b2f9e527cc83c1f5a7e12052626ea3d6a5b2596475a122c2effe899f120d629c56026c829dbabd5a16af8da6bbf8748424 SHA512 aa8a8292ae43057165c7cbf40949d15b4472e279196315459c3a795f5552902da9cf77375dfd5e7f4c74a7af3d5b12106e3f5bb9393ed79457863199081d445f
EBUILD seabios-1.12.0.ebuild 3480 BLAKE2B ee6aac19a6f0f15ccb785cf09d9f98f358cd7cd7694219a14528f31fc677190b332a4e809a5018236608710151dbb1f56d1e6ef4679e217b58d677d6c954bf35 SHA512 ebd724faafc3df91122defba546c29df96af39355a39517d5b5233850a4a291e3e0ece5d9254f912e2465470cba74562d8352822d041a04d29a8410007a9b031
MISC metadata.xml 551 BLAKE2B 1bc4f5bcc0dd85ff4e14ededc83e631c942995a8f0ba9534d72b6d5b671ad471eeb0c43a02ce4cf7c0b79d7f0d5583d419c46aaa8c297f1544353b8f42cdefa4 SHA512 5a580198036d96152d46c79b19317e35e5ba15f998ccaeade825189ee640a6ca50552a46f56f783ebba288df3953d461695039539c47baa27e3c9da1f8b1ccc0
diff --git a/sys-firmware/seabios/seabios-1.11.0-r1.ebuild b/sys-firmware/seabios/seabios-1.11.0-r1.ebuild
index 268f57fb990d..b57f37fb2681 100644
--- a/sys-firmware/seabios/seabios-1.11.0-r1.ebuild
+++ b/sys-firmware/seabios/seabios-1.11.0-r1.ebuild
@@ -34,20 +34,36 @@ LICENSE="LGPL-3 GPL-3"
SLOT="0"
IUSE="+binary debug +seavgabios"
-REQUIRED_USE="debug? ( !binary )
- !amd64? ( !x86? ( binary ) )"
+REQUIRED_USE="debug? ( !binary )"
-# The amd64/x86 check is needed to workaround #570892.
SOURCE_DEPEND="
>=sys-power/iasl-20060912
${PYTHON_DEPS}"
DEPEND="
!binary? (
- amd64? ( ${SOURCE_DEPEND} )
- x86? ( ${SOURCE_DEPEND} )
+ ${SOURCE_DEPEND}
)"
RDEPEND=""
+choose_target_chost() {
+ if [[ -n "${CC}" ]]; then
+ ${CC} -dumpmachine
+ return
+ fi
+
+ if use amd64 || use x86; then
+ # Use the native compiler
+ echo "${CHOST}"
+ return
+ fi
+
+ local i
+ for i in x86_64 i686 i586 i486 i386 ; do
+ i=${i}-pc-linux-gnu
+ type -P ${i}-gcc > /dev/null && echo ${i} && return
+ done
+}
+
pkg_pretend() {
if ! use binary; then
ewarn "You have decided to compile your own SeaBIOS. This is not"
@@ -58,6 +74,14 @@ pkg_pretend() {
ewarn "you will not receive any support if you have compiled your"
ewarn "own SeaBIOS. Virtual machines subtly fail based on changes"
ewarn "in SeaBIOS."
+ if [[ -z "$(choose_target_chost)" ]]; then
+ elog
+ eerror "Before you can compile ${PN}[-binary], you need to install a x86 cross-compiler"
+ eerror "Run the following commands:"
+ eerror " emerge crossdev"
+ eerror " crossdev --stable -t x86_64-pc-linux-gnu"
+ die "cross-compiler is needed"
+ fi
fi
}
@@ -108,10 +132,12 @@ _emake() {
src_compile() {
use binary && return
+ local TARGET_CHOST=$(choose_target_chost)
+
cp "${FILESDIR}/seabios/config.seabios-256k" .config || die
_emake oldnoconfig
- _emake iasl
- _emake out/bios.bin
+ CHOST="${TARGET_CHOST}" _emake iasl
+ CHOST="${TARGET_CHOST}" _emake out/bios.bin
mv out/bios.bin ../bios-256k.bin || die
if use seavgabios ; then
@@ -127,7 +153,7 @@ src_compile() {
emake clean distclean
cp "${FILESDIR}/seavgabios/config.vga-${t}" .config || die
_emake oldnoconfig
- _emake out/vgabios.bin
+ CHOST="${TARGET_CHOST}" _emake out/vgabios.bin
cp out/vgabios.bin ../vgabios-${t}.bin || die
done
fi