linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Renninger <trenn@suse.de>
To: harald@redhat.com
Cc: initramfs@vger.kernel.org, linux-acpi@vger.kernel.org,
	konrad.wilk@oracle.com, Thomas Renninger <trenn@suse.de>
Subject: [PATCH 3/4] dracut: Implement ACPI table overriding
Date: Fri, 27 Sep 2013 20:10:39 +0200	[thread overview]
Message-ID: <1380305440-63843-4-git-send-email-trenn@suse.de> (raw)
In-Reply-To: <1380305440-63843-1-git-send-email-trenn@suse.de>

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 <konrad.wilk@oracle.com>
Signed-off-by: Thomas Renninger <trenn@suse.de>
---
 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
-- 
1.7.6.1


  parent reply	other threads:[~2013-09-27 18:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-27 18:10 [RESEND] Implement ACPI table overriding via initramfs Thomas Renninger
2013-09-27 18:10 ` [PATCH 1/4] dracut: Generlize microcode early cpio usage Thomas Renninger
2013-09-27 18:10 ` [PATCH 2/4] dracut: Do not create early_cpio if no suitable microcode exist in hostonly case Thomas Renninger
2013-09-27 18:10 ` Thomas Renninger [this message]
     [not found] ` <1380305440-63843-1-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org>
2013-09-27 18:10   ` [PATCH 4/4] dracut.conf.5.asc: Add ACPI table override and uncompressed cpio doc Thomas Renninger
2013-10-02 10:56   ` [RESEND] Implement ACPI table overriding via initramfs Harald Hoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1380305440-63843-4-git-send-email-trenn@suse.de \
    --to=trenn@suse.de \
    --cc=harald@redhat.com \
    --cc=initramfs@vger.kernel.org \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-acpi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).