ACPI from FreeBSD-STABLE

qhwt at myrealbox.com qhwt at myrealbox.com
Sat Aug 30 01:09:56 PDT 2003


Hello.
Although I'm posting this message to submit@, I'm not asking
for committing anything to DragonflyBSD yet, because ACPI code
is still not completely MFCed to FreeBSD-STABLE. I needed ACPI
on this machine because apm isn't detected by FreebSD-STABLE or
DragonflyBSD.
Anyway, the procedure is something like this:

1. Fetch FreeBSD-STABLE's /sys tree to somewhere(I keep mine under
   ~source/freebsd/stable/src/sys).

2. Make a copy of a few files/directories into DragonflyBSD tree.
   $ cd ~source/freebsd/stable/src/sys
   $ for i in contrib/dev/acpica dev/acpica i386/acpica i386/isa/pmtimer.c \
	kern/subr_power.c sys/power.h; do
	    cp -r $i /sys/`dirname $i`/
    done
   (actually you don't even need to cp them; dropping files/directories
    into right places is enough)

3. Remove garbages from copied files:
   $ cd /sys
   $ sed -i.orig -e '/^__FBSDID/d' -e '/^#include.*<isa/s/<isa/<bus\/isa/' \
	kern/subr_power.c i386/isa/pmtimer.c

4. Apply the patch attached.
   $ zcat fred-acpi.diff | patch -d /sys

5. Add a line to your kernel config file and rebuild the kernel.
   $ echo device acpica >> /path/to/your/CONFIGFILE

6. Optionally, you can bring usr.sbin/acpi from -CURRENT's tree and compile
   acpiconf command.

That's all. I hope nothing is missing, but please tell me if you think you
want to give this a try and things went wrong. As stated above, CPU throttling
doesn't seem to be supported by ACPI on my machine(even with -CURRENT), so
I'll be glad if someone can test it. I'm wondering how Windows achieve CPU
throttling, though.

Regards.
Attachment:
fred-acpi.diff.gz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bin00000.bin
Type: application/octet-stream
Size: 3328 bytes
Desc: "Description: application/gunzip"
URL: <http://lists.dragonflybsd.org/pipermail/submit/attachments/20030830/41bb87da/attachment-0014.bin>


More information about the Submit mailing list