Blame SOURCES/0009-dracut-Implement-ACPI-table-overriding.patch

a56a5e
From ebc7f823c0013dfe7fcefe82db48bf4832f5dcec Mon Sep 17 00:00:00 2001
90b079
From: Thomas Renninger <trenn@suse.de>
90b079
Date: Fri, 27 Sep 2013 20:10:39 +0200
90b079
Subject: [PATCH] dracut: Implement ACPI table overriding
90b079
90b079
An example config file for this feature could be:
90b079
90b079
/etc/dracut.conf.d/03-acpi-override.conf
90b079
90b079
with this content:
90b079
acpi_override="yes"
90b079
acpi_table_dir="/etc/dracut.conf.d/acpi_tables"
90b079
90b079
Then all files ending with *.aml will be put into the early cpio
90b079
(kernel/firmware/acpi) and will be used to replace the BIOS provided tables
90b079
if the kernel supports this feature.
90b079
90b079
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
90b079
Signed-off-by: Thomas Renninger <trenn@suse.de>
90b079
---
90b079
 dracut.sh | 11 +++++++++++
90b079
 1 file changed, 11 insertions(+)
90b079
90b079
diff --git a/dracut.sh b/dracut.sh
90b079
index e43227e..b4b3e13 100755
90b079
--- a/dracut.sh
90b079
+++ b/dracut.sh
90b079
@@ -1337,6 +1337,17 @@ if [[ $early_microcode = yes ]]; then
90b079
     done
90b079
 fi
90b079
 
90b079
+if [[ $acpi_override = yes ]] && [[ -d $acpi_table_dir ]]; then
90b079
+    dinfo "*** Packaging ACPI tables to override BIOS provided ones ***"
90b079
+    _dest_dir="$early_cpio_dir/d/kernel/firmware/acpi"
90b079
+    mkdir -p $_dest_dir
90b079
+    for table in $acpi_table_dir/*.aml; do
90b079
+        dinfo "   Adding ACPI table: $table"
90b079
+        cp $table $_dest_dir
90b079
+        create_early_cpio="yes"
90b079
+    done
90b079
+fi
90b079
+
90b079
 rm -f -- "$outfile"
90b079
 dinfo "*** Creating image file ***"
90b079
 if [[ $create_early_cpio = yes ]]; then