diff --git a/repos/os/run/ahci_bench.run b/repos/os/run/ahci_bench.run
index 145e6f3cca..0de83623aa 100644
--- a/repos/os/run/ahci_bench.run
+++ b/repos/os/run/ahci_bench.run
@@ -8,6 +8,12 @@
#
set layer 0
+# driver-internal benchmark is special
+if {[expr ($layer == 0)] && ![have_spec exynos5]} {
+ puts "Driver-internal benchmark (layer 0) only supported on exynos5."
+ exit 0
+}
+
#
# Build
#
@@ -21,6 +27,10 @@ set build_components {
lappend_if [expr ($layer == 1 || $layer == 2)] build_components test/block_bench
lappend_if [expr ($layer == 2)] build_components server/part_blk
+lappend_if [have_spec acpi] build_components drivers/acpi
+lappend_if [have_spec pci] build_components drivers/pci/device_pd
+lappend_if [have_spec pci] build_components drivers/pci
+
build $build_components
create_boot_directory
@@ -37,6 +47,7 @@ set config {
+
@@ -47,23 +58,45 @@ set config {
-
-
-
-
+ }
+
+append_if [expr ![have_spec acpi] && ![have_spec pci]] config {
+
+
+
+ }
+
+append_if [have_spec acpi] config {
+
+
+
+
+
+
+
+
+
+
+
+ }
+
+append_if [expr ![have_spec acpi] && [have_spec pci]] config {
+
+
+
}
-# start driver internal bench (wich a the driver itself) with layer 0
+# start driver internal bench with layer 0
append_if [expr $layer == 0] config {
}
-# start part_blk with layer 1
+# start part_blk with layer 2
append_if [expr $layer == 2] config {
@@ -73,7 +106,7 @@ append_if [expr $layer == 2] config {
-
+
}
@@ -81,7 +114,15 @@ append_if [expr $layer == 2] config {
append_if [expr ($layer == 1 || $layer == 2)] config {
-
+ }
+
+append_if [expr ($layer == 1 || $layer == 2) && [have_spec acpi]] config {
+
+
+
+ }
+
+append_if [expr ($layer == 1 || $layer == 2)] config {
}
@@ -107,7 +148,12 @@ install_config $config
# Boot modules
#
-set boot_modules { core init timer platform_drv }
+set boot_modules { core init timer }
+
+lappend_if [expr ![have_spec acpi] && ![have_spec pci]] boot_modules platform_drv
+lappend_if [have_spec pci] boot_modules pci_drv
+lappend_if [have_spec pci] boot_modules pci_device_pd
+lappend_if [have_spec acpi] boot_modules acpi_drv
lappend_if [expr ($layer == 0)] boot_modules ahci_bench
lappend_if [expr ($layer == 1 || $layer == 2)] boot_modules ahci