wok-next view intel-microcode/receipt @ rev 20459
Combine receipts
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Mar 02 13:45:43 2018 +0200 (2018-03-02) |
parents | 9d4b5d7ad98d |
children | 3e3205b3b68f |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="intel-microcode"
4 VERSION="20180108" # version hidden by Intel, redirected to -> 20171117
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
15 TARBALL="$PACKAGE-$VERSION.tar.gz"
16 WGET_URL="https://downloadmirror.intel.com/27431/eng/microcode-$VERSION.tgz"
17 TARBALL_SHA1="2392dcf585a9d6313cd00d8b21cb2f54ae1d8ce3"
18 SPLIT="intel-microcode-initrd"
20 compile_rules() {
21 mkdir -p $install/lib/firmware/
22 cp -r $src/intel-ucode/ $install/lib/firmware/
24 gcc -Wall $CFLAGS -o intel-microcode2ucode $stuff/intel-microcode2ucode.c
25 ./intel-microcode2ucode ./microcode.dat
26 mkdir -p $install/boot
27 mkdir -p kernel/x86/microcode
28 mv microcode.bin kernel/x86/microcode/GenuineIntel.bin
29 echo kernel/x86/microcode/GenuineIntel.bin \
30 | cpio -o -H newc \
31 > $install/boot/intel-ucode.img
33 install -Dm644 $stuff/LICENSE $install/usr/share/licenses/$PACKAGE/LICENSE
35 cook_pick_docs releasenote
36 }
38 genpkg_rules() {
39 case $PACKAGE in
40 intel-microcode)
41 copy lib/ LICENSE
42 DEPENDS="linux"
43 ;;
44 intel-microcode-initrd)
45 copy boot/ LICENSE
46 CAT="kernel|initrd for early loading"
47 DEPENDS="linux"
48 ;;
49 esac
50 }
52 post_install_intel_microcode() {
53 if [ -z "$1" -a -e /sys/devices/system/cpu/microcode/reload ]; then
54 echo 1 > /sys/devices/system/cpu/microcode/reload
55 fi
56 }
57 post_install_intel_microcode_initrd() {
58 if [ -n "$quiet" ]; then
59 cat <<EOT
60 In order to update the Intel CPU microcode on boot, add the file
61 /boot/intel-ucode.img
62 as the first initrd to your bootloader.
63 EOT
64 fi
65 }