From 7ae6f8740db49db50a0f4ade9fde49718e7e3c44 Mon Sep 17 00:00:00 2001 From: Tomas Hruby Date: Thu, 2 Sep 2010 15:44:36 +0000 Subject: [PATCH] ACPI driver loaded at boot time - the acpi driver is part of the ramdisk and if present the rc script starts it before pci is started as pci needs if APIC mode is turned on. --- drivers/ramdisk/Makefile | 16 ++++++++++++++-- drivers/ramdisk/proto | 3 ++- drivers/ramdisk/proto.sh | 7 ++++++- drivers/ramdisk/rc | 4 ++++ etc/system.conf | 10 ++++++++++ 5 files changed, 36 insertions(+), 4 deletions(-) diff --git a/drivers/ramdisk/Makefile b/drivers/ramdisk/Makefile index e04b1490b..dcc6fba72 100644 --- a/drivers/ramdisk/Makefile +++ b/drivers/ramdisk/Makefile @@ -2,6 +2,12 @@ PROGRAMS=ahci at_wini bios_wini cdprobe dev2name floppy loadramdisk mount \ newroot pci sh service sysenv mfs ext2 + +# acpi is not compiled with ack +.if ${COMPILER_TYPE} == "gnu" +PROGRAMS += acpi +.endif + EXTRA=system.conf passwd rs.single CPPFLAGS+= -I${MINIXSRCDIR}/servers -I${MINIXSRCDIR} @@ -22,7 +28,7 @@ image.c: bintoc image bintoc: bintoc.c $(CC) -o $@ bintoc.c -image: proto.gen mtab rc $(PROGRAMS) $(EXTRA) +image: proto.gen mtab rc $(EXTRA) mkfs.mfs image proto.gen || { rm -f image; false; } ahci: ../ahci/ahci @@ -49,6 +55,12 @@ floppy: ../floppy/floppy ../floppy/floppy: $(MAKE) -C ../floppy +acpi: ../acpi/acpi + install -s ../$@/$@ $@ + +../acpi/acpi: + $(MAKE) -C ../acpi + pci: ../pci/pci install -s ../$@/$@ $@ @@ -124,7 +136,7 @@ passwd: ../../etc/passwd rs.single: ../../etc/rs.single install -s ../../etc/$@ $@ -proto.gen: $(MAKEDEV) proto.sh proto +proto.gen: $(PROGRAMS) $(MAKEDEV) proto.sh proto sh -e proto.sh >proto.gen .include diff --git a/drivers/ramdisk/proto b/drivers/ramdisk/proto index 4ec5051e4..3e0f9f30e 100644 --- a/drivers/ramdisk/proto +++ b/drivers/ramdisk/proto @@ -1,5 +1,5 @@ boot -320 440 +420 440 d--755 0 0 bin d--755 0 0 cdprobe ---755 0 0 cdprobe @@ -12,6 +12,7 @@ d--755 0 0 sysenv ---755 0 0 sysenv $ sbin d--755 0 0 + @ACPI@ ahci ---755 0 0 ahci at_wini ---755 0 0 at_wini bios_wini ---755 0 0 bios_wini diff --git a/drivers/ramdisk/proto.sh b/drivers/ramdisk/proto.sh index 1a8f9e56e..75b646c63 100644 --- a/drivers/ramdisk/proto.sh +++ b/drivers/ramdisk/proto.sh @@ -1,6 +1,11 @@ #!/bin/sh PATH=/bin:/sbin:/usr/bin:/usr/sbin -sed -n '1,/@DEV/p' /dev/log exec 2>/dev/log exec