Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84181
b: refs/heads/master
c: d89e9d6
h: refs/heads/master
i:
  84179: 13dc325
v: v3
  • Loading branch information
Len Brown committed Feb 7, 2008
1 parent 939c896 commit 48d1fec
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 113 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9cbc7960288d28aec95257af59854e1d14ba23b8
refs/heads/master: d89e9d6b4930c6505ac3ed35f57ab7f4311d6cf6
99 changes: 0 additions & 99 deletions trunk/Documentation/acpi/dsdt-initrd.txt

This file was deleted.

15 changes: 15 additions & 0 deletions trunk/Documentation/acpi/dsdt-override.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Linux supports two methods of overriding the BIOS DSDT:

CONFIG_ACPI_CUSTOM_DSDT builds the image into the kernel.

CONFIG_ACPI_CUSTOM_DSDT_INITRD adds the image to the initrd.

When to use these methods is described in detail on the
Linux/ACPI home page:
http://www.lesswatts.org/projects/acpi/overridingDSDT.php

Note that if both options are used, the DSDT supplied
by the INITRD method takes precedence.

Documentation/initramfs-add-dsdt.sh is provided for convenience
for use with the CONFIG_ACPI_CUSTOM_DSDT_INITRD method.
43 changes: 43 additions & 0 deletions trunk/Documentation/acpi/initramfs-add-dsdt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash
# Adds a DSDT file to the initrd (if it's an initramfs)
# first argument is the name of archive
# second argument is the name of the file to add
# The file will be copied as /DSDT.aml

# 20060126: fix "Premature end of file" with some old cpio (Roland Robic)
# 20060205: this time it should really work

# check the arguments
if [ $# -ne 2 ]; then
program_name=$(basename $0)
echo "\
$program_name: too few arguments
Usage: $program_name initrd-name.img DSDT-to-add.aml
Adds a DSDT file to an initrd (in initramfs format)
initrd-name.img: filename of the initrd in initramfs format
DSDT-to-add.aml: filename of the DSDT file to add
" 1>&2
exit 1
fi

# we should check it's an initramfs

tempcpio=$(mktemp -d)
# cleanup on exit, hangup, interrupt, quit, termination
trap 'rm -rf $tempcpio' 0 1 2 3 15

# extract the archive
gunzip -c "$1" > "$tempcpio"/initramfs.cpio || exit 1

# copy the DSDT file at the root of the directory so that we can call it "/DSDT.aml"
cp -f "$2" "$tempcpio"/DSDT.aml

# add the file
cd "$tempcpio"
(echo DSDT.aml | cpio --quiet -H newc -o -A -O "$tempcpio"/initramfs.cpio) || exit 1
cd "$OLDPWD"

# re-compress the archive
gzip -c "$tempcpio"/initramfs.cpio > "$1"

22 changes: 9 additions & 13 deletions trunk/drivers/acpi/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,10 @@ config ACPI_CUSTOM_DSDT
depends on !STANDALONE
default n
help
This option is to load a custom ACPI DSDT
If you don't know what that is, say N.
This option supports a custom DSDT by linking it into the kernel.
See Documentation/acpi/dsdt-override.txt

If unsure, say N.

config ACPI_CUSTOM_DSDT_FILE
string "Custom DSDT Table file to include"
Expand All @@ -279,17 +281,11 @@ config ACPI_CUSTOM_DSDT_INITRD
depends on BLK_DEV_INITRD
default n
help
The DSDT (Differentiated System Description Table) often needs to be
overridden because of broken BIOS implementations. If this feature is
activated you will be able to provide a customized DSDT by adding it
to your initramfs. If your mkinitrd tool does not support this feature
a script is provided in the documentation. For more details see
<file:Documentation/dsdt-initrd.txt> or <http://gaugusch.at/kernel.shtml>.
If there is no table found, it will fall-back to the custom DSDT
in-kernel (if activated) or to the DSDT from the BIOS.

Even if you do not need a new one at the moment, you may want to use a
better DSDT later. It is safe to say Y here.
This option supports a custom DSDT by optionally loading it from initrd.
See Documentation/acpi/dsdt-override.txt

If you are not using this feature now, but may use it later,
it is safe to say Y here.

config ACPI_BLACKLIST_YEAR
int "Disable ACPI for systems before Jan 1st this year" if X86_32
Expand Down

0 comments on commit 48d1fec

Please sign in to comment.