]> git.pld-linux.org Git - packages/geninitrd.git/commitdiff
- rel 4; add cpu microcode to initrd images when lilo in use auto/th/geninitrd-12787-4
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 15 May 2019 19:06:29 +0000 (21:06 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 15 May 2019 19:06:29 +0000 (21:06 +0200)
geninitrd-git.patch
geninitrd.spec

index 842a0e5cad126e4f6e94a0764fead1756cf3c3d3..438da924168bae1cc4a6f86969474c194a5636cb 100644 (file)
@@ -118,3 +118,67 @@ index a2491ee..87f4b68 100644
                fi
        done
  
+commit b565e95c147bea4e68e4ccf5ad19906d51d2375b
+Author: Arkadiusz Miśkiewicz <arekm@maven.pl>
+Date:   Wed May 15 21:04:45 2019 +0200
+
+    Prepend cpu microcode to initrd image, so kernel will pick it up when LILO is in use.
+
+diff --git a/geninitrd b/geninitrd
+index 118333c..b5d405a 100755
+--- a/geninitrd
++++ b/geninitrd
+@@ -17,6 +17,7 @@ PROGRAM=${0##*/}
+ # list of geninitrd modules which need setup routine after commandline args parsing
+ GENINITRD_MODS=""
+ COMPRESS=yes
++LILO_MICROCODE=yes
+ STRIP=/usr/bin/strip
+ target=""
+ kernel=""
+@@ -1186,6 +1187,16 @@ compress_image() {
+       mv -f "$tmp" "$target"
+ }
++# prepend file to image
++prepend_file_to_image() {
++      local file="$1" target="$2" tmp
++      tmp=$(mktemp "$target".XXXXXX) || die "mktemp failed"
++
++      cat "$file" "$target" > "$tmp" || return $?
++
++      mv -f "$tmp" "$target"
++}
++
+ if [ -r /etc/sysconfig/geninitrd ]; then
+       . /etc/sysconfig/geninitrd
+ fi
+@@ -1801,6 +1812,14 @@ else
+       cp -a "$IMAGE" "$target"
+ fi
++# microcode support for lilo
++if ! is_no "$LILO_MICROCODE"; then
++      if [ -x /sbin/lilo -a -f "/boot/intel-ucode.img" ]; then
++              verbose "Prepending $target with microcode image /boot/intel-ucode.img for LILO"
++              prepend_file_to_image "/boot/intel-ucode.img" "$target"
++      fi
++fi
++
+ # XXX. check if bootsplash can output data to tmp dir not directly to initramfs image.
+ initrd_gen_bootsplash "$target"
+diff --git a/geninitrd.sysconfig b/geninitrd.sysconfig
+index ccf177c..1268324 100644
+--- a/geninitrd.sysconfig
++++ b/geninitrd.sysconfig
+@@ -18,6 +18,9 @@
+ # Default is to use initramfs for >= 2.5.0.
+ #INITRDFS=initramfs
++# Should we prepend cpu microcode when lilo is installed
++#LILO_MICROCODE=no
++
+ ## Use udev to create /dev?
+ USE_UDEV=yes
index 830451a433392bd3ade6d31db5854b3baf7b3c4e..549e4f8906047b0a078e75006301cbde4d24882f 100644 (file)
@@ -2,7 +2,7 @@ Summary:        Creates an initial ramdisk image for preloading modules
 Summary(pl.UTF-8):     Narzędzie do tworzenia inicjalnego ramdysku używanego przy starcie systemu
 Name:          geninitrd
 Version:       12787
-Release:       3
+Release:       4
 License:       GPL
 Group:         Applications/System
 Source0:       %{name}-%{version}.tar.gz
This page took 0.134207 seconds and 4 git commands to generate.