diff options
author | Dan McDonald <danmcd@joyent.com> | 2020-06-09 10:45:13 -0400 |
---|---|---|
committer | Dan McDonald <danmcd@joyent.com> | 2020-06-09 10:47:10 -0400 |
commit | eb7a235af24981be82a88a125b4f82093a408ef4 (patch) | |
tree | a78ebd7bd0c3afa806d3e5e35df4fafbbfd741dd | |
parent | 82c3f1a85d940e88355a055831c2d279c69c59e6 (diff) | |
download | illumos-joyent-eb7a235af24981be82a88a125b4f82093a408ef4.tar.gz |
Revert "12817 ucode/update.intel should be able to use git repos"
This reverts commit d9660a7c6537b3e744aca576d92fcef0d6efcea2.
Revert "12815 ucode/update.intel needs pkgfmt fix"
This reverts commit 16b19c8cd6c6339e907197a5a8c30bdb85ec0ef8.
-rwxr-xr-x | usr/src/data/ucode/update.intel | 43 |
1 files changed, 13 insertions, 30 deletions
diff --git a/usr/src/data/ucode/update.intel b/usr/src/data/ucode/update.intel index 038f80b217..52ed8c0eb7 100755 --- a/usr/src/data/ucode/update.intel +++ b/usr/src/data/ucode/update.intel @@ -10,7 +10,7 @@ # http://www.illumos.org/license/CDDL. # Copyright 2019 OmniOS Community Edition (OmniOSce) Association. -# Copyright 2020 Joyent, Inc. +# Copyright 2019 Joyent, Inc. # A simple update script that extracts an Intel microcode download file # into the intel/ directory, and updates the hardlinks in the @@ -19,15 +19,13 @@ set -e set -o pipefail -# Remove this once we start using pkgfmt without it in the rest of -gate. -export PKGFMT_OUTPUT=v1 +[[ -z "$1" ]] || [[ ! -f "$1" ]] && { + echo "Syntax: $0 <path to microcode tar>" >&2 + exit 1 +} -# Change me if the world evolves, but for now, this is the source of -# truth for Intel microcode. -REPOSOURCE="https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files" +ucodetar="$1" -tmp=$(mktemp -d) -mkdir $tmp/out mf=../../pkg/manifests/system-microcode-intel.mf [[ -f $mf ]] || { echo "Run from usr/src/data/ucode" 2>&1 @@ -36,27 +34,12 @@ mf=../../pkg/manifests/system-microcode-intel.mf fw=platform/i86pc/ucode/GenuineIntel -if [[ -z "$1" ]]; then - goback=`pwd` - cd $tmp - # Hope git is available if we need it... - git clone $REPOSOURCE || { - echo "Git clone of $REPOSOURCE failed." 2>&1 - exit 1 - } - cd $goback - # Change with REPOSOURCE name - dir=$tmp/Intel-Linux-Processor-Microcode-Data-Files -elif [[ -d "$1" ]]; then - dir=$1 -else - gtar -C $tmp -xvf "$1" - # This will expand properly if the tarball appends a release - # to the name. - dir=$tmp/Intel-Linux-Processor-Microcode-Data-Files* -fi - -find $dir/intel-ucode*/ -type f \ +tmp=$(mktemp -d) +mkdir $tmp/out + +gtar -C $tmp -xvf "$ucodetar" + +find $tmp/Intel-Linux-Processor-Microcode-Data*/intel-ucode*/ -type f \ | while read f; do echo "Converting $(basename $f)" cp $f $tmp/intel-fw @@ -71,7 +54,7 @@ rm -f $mf.tmp rm -f intel/* -cp $dir/license intel/THIRDPARTYLICENSE +cp $tmp/Intel-Linux-Processor-Microcode-Data*/license intel/THIRDPARTYLICENSE echo Intel Processor Microcode Data Files > intel/THIRDPARTYLICENSE.descrip rm -f Makefile.links |