Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 513642 Details for
Bug 643786
sys-firmware/intel-microcode: added USE flag 'scan-system' to only install suitable/applicable microcode
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
intel-microcode-20171117_p20171215.ebuild
intel-microcode-20171117_p20171215.ebuild (text/plain), 3.48 KB, created by
Maxxim
on 2018-01-07 15:24:19 UTC
(
hide
)
Description:
intel-microcode-20171117_p20171215.ebuild
Filename:
MIME Type:
Creator:
Maxxim
Created:
2018-01-07 15:24:19 UTC
Size:
3.48 KB
patch
obsolete
># Copyright 1999-2018 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 > >EAPI="6" > >inherit toolchain-funcs > ># Find updates by searching and clicking the first link (hopefully it's the one): ># http://www.intel.com/content/www/us/en/search.html?keyword=Processor+Microcode+Data+File > >NUM="27337" >DESCRIPTION="Intel IA32/IA64 microcode update data" >HOMEPAGE="http://inertiawar.com/microcode/ https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=${NUM}" >#SRC_URI="http://downloadmirror.intel.com/${NUM}/eng/microcode-${PV}.tgz" >SRC_URI="mirror://gentoo/microcode-${PV}.tgz > https://dev.gentoo.org/~whissi/dist/${PN}/microcode-${PV}.tgz" > >LICENSE="intel-ucode" >SLOT="0" >KEYWORDS="-* amd64 x86" >IUSE="initramfs scan-system +split-ucode" >REQUIRED_USE="|| ( initramfs split-ucode )" > >DEPEND="initramfs? ( sys-apps/iucode_tool ) > scan-system? ( sys-apps/iucode_tool )" >RDEPEND="!<sys-apps/microcode-ctl-1.17-r2" #268586 > >S=${WORKDIR} > >src_compile() { > if use initramfs; then > if use scan-system; then > iucode_tool --scan-system --write-earlyfw=initramfs.cpio intel-ucode/ || die "Failed to generate initramfs cpio archive" > else > iucode_tool --write-earlyfw=initramfs.cpio intel-ucode/ || die "Failed to generate initramfs cpio archive" > fi > fi >} > >src_install() { > insinto /lib/firmware/intel-ucode > if use initramfs; then > doins initramfs.cpio > fi > if use split-ucode; then > if use scan-system; then > local re_signature="^iucode_tool: system has processor\(s\) with signature (0x[0-9a-f]+)$" > local re_bundle="^microcode bundle ([0-9]+): (.*)$" > local re_suitable="^([0-9]+)/([0-9]+): sig (0x[0-9a-f]+), pf_mask (0x[0-9a-f]+), ([0-9]{4}-[0-9]{2}-[0-9]{2}), rev (0x[0-9a-f]+), size ([0-9]+)$" > local -A bundles=() > local -a suitable=() > local line index > > # Identify suitable bundles > while read -r line; do > if [[ $line =~ $re_signature ]]; then > elog "Signature of detected processor(s): ${BASH_REMATCH[1]}" > elif [[ $line =~ $re_bundle ]]; then > bundles+=(["${BASH_REMATCH[1]}"]="${BASH_REMATCH[2]}") > elif [[ $line =~ $re_suitable ]]; then > index="${BASH_REMATCH[1]}" > index="${index#"${index%%[!0]*}"}" # strip leading zero(s) from bundle index > if [[ -n "${bundles[$index]+set}" ]]; then > elog "Suitable microcode bundle: ${index} (${bundles[$index]})" > suitable+=("$index") > else > ewarn "Ignoring invalid microcode bundle '${index}'" > fi > fi > done < <(iucode_tool --scan-system --list intel-ucode/* 2>&1) # signature is written to stderr > elog "" > > # Suitable bundles identified? > if (( ${#suitable[@]} == 0 )); then > ewarn "Unable to identify suitable microcode bundle(s)" > ewarn "Please install without USE flag 'scan-system' instead" > die "Failed to identify suitable microcode bundle(s)" > fi > > # Install identified bundles > insinto /lib/firmware/intel-ucode > for index in ${suitable[@]}; do > doins "${bundles[$index]}" > done > else > doins intel-ucode/* > fi > fi >} > >pkg_postinst() { > if use initramfs; then > elog "CPIO archive was installed to '/lib/firmware/intel-ucode/initramfs.cpio'" > elog "This archive needs to be prepended to an existing initramfs image:" > elog "# cat /lib/firmware/intel-ucode/initramfs.cpio existing-image > combined-image" > elog "" > fi > if use split-ucode; then > elog "Split binary ucode files were installed to '/lib/firmware/intel-ucode'" > elog "" > fi > elog "Please refer to the Gentoo Wiki for more detailed information:" > elog "https://wiki.gentoo.org/wiki/Intel_microcode" >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 643786
: 513642 |
513644
|
513646