wok-next view intel-microcode/receipt @ rev 21057
Deal with HOST_ARCH="any"
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Mon Dec 03 14:47:30 2018 +0200 (2018-12-03) |
parents | d5aab818505e |
children | e19ff076dc63 |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="intel-microcode"
4 VERSION="20180703"; DL_ID="27945"
5 CATEGORY="kernel"
6 SHORT_DESC="Intel processor microcode update for Linux"
7 MAINTAINER="al.bobylev@gmail.com"
8 LICENSE="other"
9 WEB_SITE="https://downloadcenter.intel.com/search?keyword=processor+microcode+data+file"
10 # See also: https://wiki.archlinux.org/index.php/Microcode
11 # and https://www.archlinux.org/packages/extra/any/intel-ucode/
12 # https://www.kernel.org/doc/Documentation/x86/early-microcode.txt
13 # http://linuxfromscratch.org/blfs/view/svn/postlfs/firmware.html#early-microcode
14 HOST_ARCH="any"
16 TARBALL="$PACKAGE-$VERSION.tgz"
17 WGET_URL="https://downloadmirror.intel.com/$DL_ID/eng/microcode-$VERSION.tgz"
18 TARBALL_MD5="873f2bdd7c0edf317f416f54fee74b42"
20 BUILD_DEPENDS="iucode-tool"
21 SPLIT="$PACKAGE-initrd"
23 compile_rules() {
24 mkdir -p $install/lib/firmware/
25 cp -r $src/intel-ucode/ $install/lib/firmware/
27 mkdir -p $install/boot
28 mkdir -p kernel/x86/microcode
29 iucode_tool -w kernel/x86/microcode/GenuineIntel.bin intel-ucode/ intel-ucode-with-caveats/
30 echo kernel/x86/microcode/GenuineIntel.bin \
31 | cpio -o -H newc \
32 > $install/boot/intel-ucode.img
34 install -Dm644 $stuff/LICENSE $install/usr/share/licenses/$PACKAGE/LICENSE
36 cook_pick_docs releasenote
37 }
39 genpkg_rules() {
40 case $PACKAGE in
41 intel-microcode)
42 copy lib/ LICENSE
43 DEPENDS="linux"
44 ;;
45 intel-microcode-initrd)
46 copy boot/ LICENSE
47 CAT="kernel|initrd for early loading"
48 DEPENDS="linux"
49 ;;
50 esac
51 }
53 post_install_intel_microcode() {
54 if [ -z "$1" -a -e /sys/devices/system/cpu/microcode/reload ]; then
55 echo 1 > /sys/devices/system/cpu/microcode/reload
56 fi
57 }
58 post_install_intel_microcode_initrd() {
59 [ -n "$quiet" ] || cat <<EOT
61 .------------------------------------------------------------------.
62 | In order to update the Intel CPU microcode on boot, add the file |
63 | /boot/intel-ucode.img |
64 | as the first initrd to your bootloader. |
65 '------------------------------------------------------------------'
67 EOT
68 }