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

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