From patchwork Fri Sep 27 18:10:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Renninger X-Patchwork-Id: 2956541 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 9A182BFF0B for ; Fri, 27 Sep 2013 18:10:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CFB0D20295 for ; Fri, 27 Sep 2013 18:10:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BA0D1202C8 for ; Fri, 27 Sep 2013 18:10:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754333Ab3I0SKs (ORCPT ); Fri, 27 Sep 2013 14:10:48 -0400 Received: from cantor2.suse.de ([195.135.220.15]:47835 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754388Ab3I0SKo (ORCPT ); Fri, 27 Sep 2013 14:10:44 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 7CBFCA5440; Fri, 27 Sep 2013 20:10:43 +0200 (CEST) From: Thomas Renninger To: harald@redhat.com Cc: initramfs@vger.kernel.org, linux-acpi@vger.kernel.org, konrad.wilk@oracle.com, Thomas Renninger Subject: [PATCH 2/4] dracut: Do not create early_cpio if no suitable microcode exist in hostonly case Date: Fri, 27 Sep 2013 20:10:38 +0200 Message-Id: <1380305440-63843-3-git-send-email-trenn@suse.de> X-Mailer: git-send-email 1.7.6.1 In-Reply-To: <1380305440-63843-1-git-send-email-trenn@suse.de> References: <1380305440-63843-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.3 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. Reviewed-by: Konrad Rzeszutek Wilk Signed-off-by: Thomas Renninger --- dracut.sh | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/dracut.sh b/dracut.sh index 0383c7e..618c301 100755 --- a/dracut.sh +++ b/dracut.sh @@ -1294,12 +1294,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"