From patchwork Fri Sep 27 18:10:39 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Renninger X-Patchwork-Id: 2956521 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 CD6A4BFF0B for ; Fri, 27 Sep 2013 18:10:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B5680202B8 for ; Fri, 27 Sep 2013 18:10:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 70DEC201F9 for ; Fri, 27 Sep 2013 18:10:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754418Ab3I0SKp (ORCPT ); Fri, 27 Sep 2013 14:10:45 -0400 Received: from cantor2.suse.de ([195.135.220.15]:47834 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754302Ab3I0SKo (ORCPT ); Fri, 27 Sep 2013 14:10:44 -0400 Received: from relay1.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 85059A5443; 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 3/4] dracut: Implement ACPI table overriding Date: Fri, 27 Sep 2013 20:10:39 +0200 Message-Id: <1380305440-63843-4-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 An example config file for this feature could be: /etc/dracut.conf.d/03-acpi-override.conf with this content: acpi_override="yes" acpi_table_dir="/etc/dracut.conf.d/acpi_tables" Then all files ending with *.aml will be put into the early cpio (kernel/firmware/acpi) and will be used to replace the BIOS provided tables if the kernel supports this feature. Reviewed-by: Konrad Rzeszutek Wilk Signed-off-by: Thomas Renninger --- dracut.sh | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/dracut.sh b/dracut.sh index 618c301..b94224d 100755 --- a/dracut.sh +++ b/dracut.sh @@ -1305,6 +1305,17 @@ if [[ $early_microcode = yes ]]; then done fi +if [[ $acpi_override = yes ]] && [[ -d $acpi_table_dir ]]; then + dinfo "*** Packaging ACPI tables to override BIOS provided ones ***" + _dest_dir="$early_cpio_dir/d/kernel/firmware/acpi" + mkdir -p $_dest_dir + for table in $acpi_table_dir/*.aml; do + dinfo " Adding ACPI table: $table" + cp $table $_dest_dir + create_early_cpio="yes" + done +fi + rm -f -- "$outfile" dinfo "*** Creating image file ***" if [[ $create_early_cpio = yes ]]; then