dracut/acpi_override.patch
Raymond Wooninck 3210e44b88 Accepting request 201877 from home:trenn:dracut_test
- Add ACPI table override ability
- Adjust mkinitrd-dracut.sh to SUSE mkinitrd:
  <none> : Before gives a "usage" error -> now scans /boot for kernels
           and builds corresponding inirtrds for them
  -i -k  : Pass a list of kernels and initrd targets
           (not sure it was worth the hassle to be able to pass)
  -b     : Boot directory to search for kernel images
  -d     : Change root file system. Not tested whether dracut's behavior
           matches exactly what our mkinitrd does.
  -s     : Dummy (should even be obsolete in latest mkinitrd)
- Write caller and used parameters to syslog if mkinitrd is called.
  So that those can easily be fixed and checked for correctness.
  This should get reverted again before a bigger release.

OBS-URL: https://build.opensuse.org/request/show/201877
OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=56
2013-10-02 12:32:19 +00:00

39 lines
1.1 KiB
Diff

dracut: Implement ACPI table overriding
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 <trenn@suse.de>
Index: dracut-033/dracut.sh
===================================================================
--- dracut-033.orig/dracut.sh
+++ dracut-033/dracut.sh
@@ -1322,6 +1322,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