From patchwork Tue Sep 24 17:02:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Renninger X-Patchwork-Id: 2934731 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 92952BFF05 for ; Tue, 24 Sep 2013 17:03:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8EFCA20374 for ; Tue, 24 Sep 2013 17:03:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C4107203A8 for ; Tue, 24 Sep 2013 17:03:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753946Ab3IXRDI (ORCPT ); Tue, 24 Sep 2013 13:03:08 -0400 Received: from cantor2.suse.de ([195.135.220.15]:60687 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754062Ab3IXRDC (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 0E816A52D9; 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 3/3] dracut: Implement ACPI table overriding Date: Tue, 24 Sep 2013 19:02:57 +0200 Message-Id: <1380042177-66221-4-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 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. Signed-off-by: Thomas Renninger --- dracut.sh | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/dracut.sh b/dracut.sh index 671f53f..352b546 100755 --- a/dracut.sh +++ b/dracut.sh @@ -1327,6 +1327,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