Start the ACPI driver in Qt5 run scripts if needed

Fixes #1219.
This commit is contained in:
Christian Prochaska 2014-08-01 14:54:19 +02:00 committed by Norman Feske
parent dc2961338d
commit bd6ffb8261

View File

@ -3,6 +3,11 @@
# Helper functions
#
proc use_acpi_drv { feature_arg } {
upvar $feature_arg feature
return [have_spec acpi]
}
proc use_audio_out_drv { feature_arg } {
upvar $feature_arg feature
return [info exists feature(Audio_out)]
@ -30,10 +35,14 @@ proc use_nic_drv { feature_arg } {
![use_usb_drv feature]}]
}
proc use_pci_device_pd { feature_arg } {
upvar $feature_arg feature
return [expr [use_pci_drv feature] && [have_spec nova]]
}
proc use_pci_drv { feature_arg } {
upvar $feature_arg feature
return [expr {[use_nic_drv feature] &&
[have_spec pci]}]
return [have_spec pci]
}
proc use_ps2_drv { feature_arg } {
@ -63,6 +72,7 @@ proc drivers_build_components { feature_arg } {
set build_components { }
lappend_if [use_acpi_drv feature] build_components drivers/acpi
lappend_if [use_audio_out_drv feature] build_components drivers/audio_out
lappend_if [use_fb_drv feature] build_components drivers/framebuffer
lappend_if [use_fb_sdl feature] build_components drivers/framebuffer
@ -111,6 +121,21 @@ proc drivers_start_nodes { feature_arg } {
set start_nodes { }
append_if [use_acpi_drv feature] start_nodes {
<start name="acpi">
<resource name="RAM" quantum="10M"/>
<binary name="acpi_drv"/>
<provides>
<service name="PCI"/>
<service name="IRQ" />
</provides>
<route>
<service name="PCI"> <any-child /> </service>
<any-service> <parent/> <any-child /> </any-service>
</route>
</start>
}
append_if [use_audio_out_drv feature] start_nodes {
<start name="audio_out_drv">
<resource name="RAM" quantum="4M"/>
@ -150,7 +175,7 @@ proc drivers_start_nodes { feature_arg } {
</start>
}
append_if [use_pci_drv feature] start_nodes {
append_if [expr [use_pci_drv feature] && ![use_acpi_drv feature]] start_nodes {
<start name="pci_drv">
<resource name="RAM" quantum="2M"/>
<provides><service name="PCI"/></provides>
@ -206,12 +231,14 @@ proc drivers_boot_modules { feature_arg } {
set boot_modules { }
lappend_if [use_acpi_drv feature] boot_modules acpi_drv
lappend_if [use_audio_out_drv feature] boot_modules audio_out_drv
lappend_if [use_fb_drv feature] boot_modules fb_drv
lappend_if [use_fb_sdl feature] boot_modules fb_sdl
lappend_if [use_gpio_drv feature] boot_modules gpio_drv
lappend_if [use_nic_drv feature] boot_modules nic_drv
lappend_if [use_pci_drv feature] boot_modules pci_drv
lappend_if [use_pci_device_pd feature] boot_modules pci_device_pd
lappend_if [use_ps2_drv feature] boot_modules ps2_drv
lappend_if [use_timer feature] boot_modules timer
lappend_if [use_usb_drv feature] boot_modules usb_drv