From patchwork Tue Sep 24 17:02:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Renninger X-Patchwork-Id: 2934711 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7E2C5BFF05 for ; Tue, 24 Sep 2013 17:03:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 60E292040F for ; Tue, 24 Sep 2013 17:03:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 35A92203EA for ; Tue, 24 Sep 2013 17:03:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754180Ab3IXRDE (ORCPT ); Tue, 24 Sep 2013 13:03:04 -0400 Received: from cantor2.suse.de ([195.135.220.15]:60690 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753591Ab3IXRDC (ORCPT ); Tue, 24 Sep 2013 13:03:02 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 0EA3DA531D; Tue, 24 Sep 2013 19:02:58 +0200 (CEST) From: Thomas Renninger To: harald@redhat.com Cc: initramfs@vger.kernel.org, yinghai@kernel.org, hpa@zytor.com, rjw@sisk.pl, linux-acpi@vger.kernel.org, Thomas Renninger Subject: [PATCH 2/3] dracut: Do not create early_cpio if no suitable microcode exist in hostonly case Date: Tue, 24 Sep 2013 19:02:56 +0200 Message-Id: <1380042177-66221-3-git-send-email-trenn@suse.de> X-Mailer: git-send-email 1.7.6.1 In-Reply-To: <1380042177-66221-1-git-send-email-trenn@suse.de> References: <1380042177-66221-1-git-send-email-trenn@suse.de> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. Signed-off-by: Thomas Renninger --- dracut.sh | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/dracut.sh b/dracut.sh index 0dd1e8b..671f53f 100755 --- a/dracut.sh +++ b/dracut.sh @@ -1316,12 +1316,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"