]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut: Implement ACPI table overriding
authorThomas Renninger <trenn@suse.de>
Fri, 27 Sep 2013 18:10:39 +0000 (20:10 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 2 Oct 2013 10:47:11 +0000 (12:47 +0200)
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

index e43227e834092a2c8e49d600525be85b0333fc4c..b4b3e13def71c1955975eb606fdcf3f4904ed255 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -1337,6 +1337,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