proc have_platform_drv {} { if {[have_spec linux]} { return 0 } return [expr [have_spec arndale] \ || [have_spec imx53] \ || [have_spec rpi] \ || [have_spec odroid_x2] \ || [have_spec x86]] } ## # Return 1 if the scenario depends on the USB driver on the used platform # # On most ARM platform, user input is provided by an USB HID device. On other # platforms, the USB driver may be omitted. # proc need_usb_hid { } { # covered by fb_sdl if {[have_spec linux]} { return 0 } # covered by ps2_drv if {[have_spec x86]} { return 0 } if {[have_spec pbxa9]} { return 0 } return [have_spec usb] } proc append_platform_drv_build_components {} { global build_components lappend_if [have_platform_drv] build_components drivers/platform lappend_if [have_spec acpi] build_components drivers/acpi lappend_if [have_spec acpi] build_components server/report_rom lappend_if [have_spec nova] build_components drivers/platform/spec/x86/device_pd } proc append_platform_drv_boot_modules {} { global boot_modules lappend_if [have_platform_drv] boot_modules platform_drv lappend_if [have_spec acpi] boot_modules acpi_drv lappend_if [have_spec acpi] boot_modules report_rom lappend_if [have_spec nova] boot_modules device_pd lappend_if [have_spec muen] boot_modules acpi } proc platform_drv_policy {} { if ([have_spec x86]) { return { } } else { return {} } } proc platform_drv_priority {} { return "" } proc platform_drv_add_routing {} { if {[have_spec acpi]} { return { } } return "" } proc platform_drv_config_config {} { if {[have_spec acpi] || [have_spec arm] || [have_spec muen]} { return { } } return { } } proc append_platform_drv_config {} { global config if {[have_spec acpi]} { append config " " append config { } append config " " append config { } } if {[have_platform_drv]} { append config " " append config { } append_if [have_spec acpi] config { } append_if [have_spec arm] config { } append config { } append config "[platform_drv_add_routing]" append_if [have_spec acpi] config { } append_if [have_spec rpi] config { } append config { } append config [platform_drv_config_config] append config [platform_drv_policy] append config { } } return $config }