From: Thomas Renninger Date: Fri, 27 Sep 2013 18:10:38 +0000 (+0200) Subject: dracut: Do not create early_cpio if no suitable microcode exist in hostonly case X-Git-Tag: 034~24 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d8b04dc1840047a7533d19f577f30f19d42e2d33;p=thirdparty%2Fdracut.git dracut: Do not create early_cpio if no suitable microcode exist in hostonly case Intel microcodes only exist for very specific family/model/stepping CPUs. If no microcode gets added, there is no need to create an empty (only directories) cpio later that gets glued to the initrd. This also fixes: *** Constructing GenuineIntel.bin **** cat: /lib/firmware/intel-ucode/06-3c-03: No such file or directory in hostonly mode if there is no suitable microcode for the CPU. Reviewed-by: Konrad Rzeszutek Wilk Signed-off-by: Thomas Renninger --- diff --git a/dracut.sh b/dracut.sh index b3b80886a..e43227e83 100755 --- a/dracut.sh +++ b/dracut.sh @@ -1326,12 +1326,15 @@ if [[ $early_microcode = yes ]]; then dinfo "*** Constructing ${ucode_dest[$idx]} ****" if [[ $hostonly ]]; then _src=$(get_ucode_file) + if ! [[ -r $_fwdir/$_fw/$_src ]];then + break; + fi fi cat $_fwdir/$_fw/$_src > $_dest_dir/${ucode_dest[$idx]} + create_early_cpio="yes" fi done done - create_early_cpio="yes" fi rm -f -- "$outfile"