Dragonfly & acpi

YONETANI Tomokazu qhwt+dragonfly-kernel at les.ath.cx
Wed Jun 30 04:31:44 PDT 2004


On Tue, Jun 29, 2004 at 10:39:14AM +0100, Hiten Pandya wrote:
> Matthew Dillon wrote:
> >    Hiten, what's the copyright on that tool set?  Is it something we can
> >    (or should) put in base?
> >
> 
> 	We can make it a port override, shouldn't be a problem.  I can
> 	coordinate with Yonetani Tomokazu to commit the acpiconf(8)
> 	utility from FreeBSD-5, which should handle the suspend and
> 	resuming, and other ACPI related utilities.
> 
> 	Most (if not all) are BSD licensed and were developed by the
> 	Japanese ACPI project and improved upon by Nate Lawson of the
> 	FreeBSD project; so in summary, it shouldn't be a problem.

Here's "just compiles and works for me" patch, in case someone need them,
to bring the tools from recent FreeBSD-CURRENT, add /dev/acpi to /dev/MAKEDEV
for acpiconf, and update /etc/rc.suspend and /etc/rc.resume .

$ fetch http://les.ath.cx/DragonFly/in-tree-acpicatools.patch.gz
$ zcat in-tree-acpicatools.patch.gz | patch -d /usr/src -p0

The tools won't get built during buildworld since the patch doesn't add
acpi/ to SUBDIR list in usr.sbin/Makefile.
The acpiconf command invokes /etc/rc.suspend and /etc/rc.resume;
you'll see strange warnings unless you install these two scripts.

TODO/BUGS:
- bring in other endian-related functions from FreeBSD-CURRENT
  and clean up the borrowed functions in acpiconf/acpi.c .
- move the following stuffs from /sys/dev/acpica5/Makefile into
  Makefile.inc in the same directory, so that we can share the
  definitions between acpi modules and tools:
    .PATH, include paths, list of ACPI-CA source codes (SRCS+= lines),
    make rules for modified version of acpi.h and acenv.h

- if you run `acpiconf -d', `acpiconf -e' or `acpiconf -s' no longer
  works unless you reboot. `acpiconf -e' after `acpiconf -d' fails
  with a warning:

    acpi0: interrupt handler already installed
    ACPI-0210: *** Error: Unable to install System Control Interrupt Handler, AE_ALREADY_EXISTS





More information about the Kernel mailing list