diff --git a/repos/dde_linux/run/lxip_http_srv.run b/repos/dde_linux/run/lxip_http_srv.run index dfcc707d50..be5dbfa592 100644 --- a/repos/dde_linux/run/lxip_http_srv.run +++ b/repos/dde_linux/run/lxip_http_srv.run @@ -7,6 +7,10 @@ requires_installation_of lynx # Build # +proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv } + if {[have_spec rpi] && [have_spec foc]} { return foc_gpio_drv } + return gpio_drv } + set build_components { core init drivers/timer drivers/nic @@ -58,12 +62,12 @@ set config { } -append_if [have_spec gpio] config { - - - +append_if [have_spec gpio] config " + + + - } + " append_if $use_usb_driver config { @@ -103,7 +107,7 @@ set boot_modules { # platform-specific modules lappend_if $use_usb_driver boot_modules usb_drv lappend_if $use_nic_driver boot_modules nic_drv -lappend_if [have_spec gpio] boot_modules gpio_drv +lappend_if [have_spec gpio] boot_modules [gpio_drv] append_platform_drv_boot_modules diff --git a/repos/dde_linux/run/lxip_udp_echo.run b/repos/dde_linux/run/lxip_udp_echo.run index d4044f57db..95aefb59a0 100644 --- a/repos/dde_linux/run/lxip_udp_echo.run +++ b/repos/dde_linux/run/lxip_udp_echo.run @@ -11,6 +11,10 @@ set build_components { test/lxip/udp_echo } +proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv } + if {[have_spec rpi] && [have_spec foc]} { return foc_gpio_drv } + return gpio_drv } + lappend_if $use_usb_driver build_components drivers/usb lappend_if [have_spec gpio] build_components drivers/gpio @@ -57,12 +61,12 @@ set config { } -append_if [have_spec gpio] config { - - - +append_if [have_spec gpio] config " + + + - } + " append_if $use_usb_driver config { @@ -103,7 +107,7 @@ set boot_modules { # platform-specific modules lappend_if $use_usb_driver boot_modules usb_drv lappend_if $use_nic_driver boot_modules nic_drv -lappend_if [have_spec gpio] boot_modules gpio_drv +lappend_if [have_spec gpio] boot_modules [gpio_drv] append_platform_drv_boot_modules diff --git a/repos/dde_linux/run/usb_hid.run b/repos/dde_linux/run/usb_hid.run index 761a56aa05..5d3fce9cae 100644 --- a/repos/dde_linux/run/usb_hid.run +++ b/repos/dde_linux/run/usb_hid.run @@ -71,6 +71,10 @@ append_platform_drv_build_components build $build_components +proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv } + if {[have_spec rpi] && [have_spec foc]} { return foc_gpio_drv } + return gpio_drv } + create_boot_directory # @@ -94,12 +98,12 @@ append config { } -append_if [have_spec gpio] config { - - - +append_if [have_spec gpio] config " + + + - } + " append_platform_drv_config @@ -131,7 +135,7 @@ set boot_modules { core ld.lib.so init timer usb_drv test-input } -lappend_if [have_spec gpio] boot_modules gpio_drv +lappend_if [have_spec gpio] boot_modules [gpio_drv] append_platform_drv_boot_modules diff --git a/repos/dde_linux/run/usb_net.run b/repos/dde_linux/run/usb_net.run index f342b54fc6..1ae8b3991a 100644 --- a/repos/dde_linux/run/usb_net.run +++ b/repos/dde_linux/run/usb_net.run @@ -17,6 +17,10 @@ set build_components { test/lwip/http_srv } +proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv } + if {[have_spec rpi] && [have_spec foc]} { return foc_gpio_drv } + return gpio_drv } + source ${genode_dir}/repos/base/run/platform_drv.inc append_platform_drv_build_components @@ -70,12 +74,12 @@ set config { append_platform_drv_config -append_if [have_spec gpio] config { - - - +append_if [have_spec gpio] config " + + + - } + " append config { @@ -94,7 +98,7 @@ set boot_modules { } append_platform_drv_boot_modules -lappend_if [have_spec gpio] boot_modules gpio_drv +lappend_if [have_spec gpio] boot_modules [gpio_drv] build_boot_image $boot_modules diff --git a/repos/dde_linux/run/usb_storage.run b/repos/dde_linux/run/usb_storage.run index 6f57a1f3f5..fce5e8aebe 100644 --- a/repos/dde_linux/run/usb_storage.run +++ b/repos/dde_linux/run/usb_storage.run @@ -17,6 +17,10 @@ set build_components { lappend_if [have_spec gpio] build_components drivers/gpio +proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv } + if {[have_spec rpi] && [have_spec foc]} { return foc_gpio_drv } + return gpio_drv } + source ${genode_dir}/repos/base/run/platform_drv.inc append_platform_drv_build_components @@ -47,12 +51,12 @@ set config { append_platform_drv_config -append_if [have_spec gpio] config { - - - +append_if [have_spec gpio] config " + + + - } + " append config { @@ -82,6 +86,8 @@ set boot_modules { core ld.lib.so init timer usb_drv test-blk-cli } +lappend_if [have_spec gpio] boot_modules [gpio_drv] + append_platform_drv_boot_modules build_boot_image $boot_modules diff --git a/repos/dde_linux/run/usb_terminal.run b/repos/dde_linux/run/usb_terminal.run index 44c2136fef..25330cb1d1 100644 --- a/repos/dde_linux/run/usb_terminal.run +++ b/repos/dde_linux/run/usb_terminal.run @@ -11,6 +11,10 @@ if {[have_include power_on/qemu]} { set usb_raw_device $::env(USB_RAW_DEVICE) } +proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv } + if {[have_spec rpi] && [have_spec foc]} { return foc_gpio_drv } + return gpio_drv } + # # Build # @@ -52,12 +56,12 @@ append config { } -append_if [have_spec gpio] config { - - - +append_if [have_spec gpio] config " + + + - } + " append_platform_drv_config @@ -96,7 +100,7 @@ set boot_modules { usb_terminal } -lappend_if [have_spec gpio] boot_modules gpio_drv +lappend_if [have_spec gpio] boot_modules [gpio_drv] append_platform_drv_boot_modules diff --git a/repos/dde_linux/run/wifi.run b/repos/dde_linux/run/wifi.run index 6edadf0357..3f09222d72 100644 --- a/repos/dde_linux/run/wifi.run +++ b/repos/dde_linux/run/wifi.run @@ -12,6 +12,10 @@ set build_components { lib/vfs/jitterentropy } +proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv } + if {[have_spec rpi] && [have_spec foc]} { return foc_gpio_drv } + return gpio_drv } + lappend_if [have_spec gpio] build_components drivers/gpio source ${genode_dir}/repos/base/run/platform_drv.inc @@ -102,12 +106,12 @@ append config { append_platform_drv_config -append_if [have_spec gpio] config { - - - +append_if [have_spec gpio] config " + + + - } + " append config { @@ -143,7 +147,7 @@ set boot_modules { append boot_modules $firmware_modules -lappend_if [have_spec gpio] boot_modules gpio_drv +lappend_if [have_spec gpio] boot_modules [gpio_drv] append_platform_drv_boot_modules diff --git a/repos/gems/run/cpu_load_display.run b/repos/gems/run/cpu_load_display.run index df1a7b02c3..8854647a67 100644 --- a/repos/gems/run/cpu_load_display.run +++ b/repos/gems/run/cpu_load_display.run @@ -18,6 +18,10 @@ set build_components { app/pointer } +proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv } + if {[have_spec rpi] && [have_spec foc]} { return foc_gpio_drv } + return gpio_drv } + source ${genode_dir}/repos/base/run/platform_drv.inc lappend_if [need_usb_hid] build_components drivers/usb @@ -69,12 +73,12 @@ append_if [have_spec framebuffer] config { } -append_if [have_spec gpio] config { - - - +append_if [have_spec gpio] config " + + + - } + " append_if [have_spec imx53] config { @@ -227,7 +231,7 @@ lappend_if [have_spec linux] boot_modules fb_sdl lappend_if [have_spec ps2] boot_modules ps2_drv lappend_if [have_spec framebuffer] boot_modules fb_drv lappend_if [need_usb_hid] boot_modules usb_drv -lappend_if [have_spec gpio] boot_modules gpio_drv +lappend_if [have_spec gpio] boot_modules [gpio_drv] lappend_if [have_spec imx53] boot_modules input_drv build_boot_image $boot_modules diff --git a/repos/gems/run/cpu_sampler_noux.run b/repos/gems/run/cpu_sampler_noux.run index 36ebf0cf95..5b0b8f10a8 100644 --- a/repos/gems/run/cpu_sampler_noux.run +++ b/repos/gems/run/cpu_sampler_noux.run @@ -51,6 +51,10 @@ exec tar cfv bin/diffutils.tar -h -C bin/diffutils . create_boot_directory +proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv } + if {[have_spec rpi] && [have_spec foc]} { return foc_gpio_drv } + return gpio_drv } + append config { @@ -86,12 +90,12 @@ append_if [have_spec ps2] config { } -append_if [have_spec gpio] config { - - - +append_if [have_spec gpio] config " + + + - } + " append_if [need_usb_hid] config { @@ -237,7 +241,7 @@ set boot_modules { lappend_if [have_spec ps2] boot_modules ps2_drv lappend_if [have_spec framebuffer] boot_modules fb_drv lappend_if [need_usb_hid] boot_modules usb_drv -lappend_if [have_spec gpio] boot_modules gpio_drv +lappend_if [have_spec gpio] boot_modules [gpio_drv] append_platform_drv_boot_modules diff --git a/repos/gems/run/decorator_stress.run b/repos/gems/run/decorator_stress.run index 4cb64831fd..19d6a5083f 100644 --- a/repos/gems/run/decorator_stress.run +++ b/repos/gems/run/decorator_stress.run @@ -30,6 +30,10 @@ create_boot_directory # Generate config # +proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv } + if {[have_spec rpi] && [have_spec foc]} { return foc_gpio_drv } + return gpio_drv } + append config { @@ -64,12 +68,12 @@ append_if [have_spec framebuffer] config { } -append_if [have_spec gpio] config { - - - +append_if [have_spec gpio] config " + + + - } + " append_if [have_spec imx53] config { @@ -164,7 +168,7 @@ lappend_if [have_spec linux] boot_modules fb_sdl lappend_if [have_spec ps2] boot_modules ps2_drv lappend_if [have_spec framebuffer] boot_modules fb_drv lappend_if [need_usb_hid] boot_modules usb_drv -lappend_if [have_spec gpio] boot_modules gpio_drv +lappend_if [have_spec gpio] boot_modules [gpio_drv] lappend_if [have_spec imx53] boot_modules input_drv build_boot_image $boot_modules diff --git a/repos/gems/run/http_blk.run b/repos/gems/run/http_blk.run index a74bcf9952..e0e19b5568 100644 --- a/repos/gems/run/http_blk.run +++ b/repos/gems/run/http_blk.run @@ -39,6 +39,10 @@ build $build_components create_boot_directory +proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv } + if {[have_spec rpi] && [have_spec foc]} { return foc_gpio_drv } + return gpio_drv } + append config { @@ -60,12 +64,12 @@ append config { } -append_if [have_spec gpio] config { - - - +append_if [have_spec gpio] config " + + + - } + " append_if $use_usb_driver config { @@ -181,7 +185,7 @@ set boot_modules { } # platform-specific modules -lappend_if [have_spec gpio] boot_modules gpio_drv +lappend_if [have_spec gpio] boot_modules [gpio_drv] lappend_if $use_usb_driver boot_modules usb_drv lappend_if $use_nic_driver boot_modules nic_drv diff --git a/repos/gems/run/wm.run b/repos/gems/run/wm.run index 18fc8b8936..c7a596c2b8 100644 --- a/repos/gems/run/wm.run +++ b/repos/gems/run/wm.run @@ -22,6 +22,10 @@ source ${genode_dir}/repos/base/run/platform_drv.inc lappend_if [need_usb_hid] build_components drivers/usb lappend_if [have_spec gpio] build_components drivers/gpio +proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv } + if {[have_spec rpi] && [have_spec foc]} { return foc_gpio_drv } + return gpio_drv } + append_platform_drv_build_components build $build_components @@ -66,12 +70,12 @@ append_if [have_spec framebuffer] config { } -append_if [have_spec gpio] config { - - - +append_if [have_spec gpio] config " + + + - } + " append_if [have_spec imx53] config { @@ -272,7 +276,7 @@ lappend_if [have_spec linux] boot_modules fb_sdl lappend_if [have_spec ps2] boot_modules ps2_drv lappend_if [have_spec framebuffer] boot_modules fb_drv lappend_if [need_usb_hid] boot_modules usb_drv -lappend_if [have_spec gpio] boot_modules gpio_drv +lappend_if [have_spec gpio] boot_modules [gpio_drv] lappend_if [have_spec imx53] boot_modules input_drv build_boot_image $boot_modules diff --git a/repos/libports/run/lwip.run b/repos/libports/run/lwip.run index 19f47e7144..bf042e0afe 100644 --- a/repos/libports/run/lwip.run +++ b/repos/libports/run/lwip.run @@ -41,6 +41,10 @@ set build_components { lappend_if $use_usb_driver build_components drivers/usb lappend_if [have_spec gpio] build_components drivers/gpio +proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv } + if {[have_spec rpi] && [have_spec foc]} { return foc_gpio_drv } + return gpio_drv } + source ${genode_dir}/repos/base/run/platform_drv.inc append_platform_drv_build_components @@ -81,12 +85,12 @@ set config { } -append_if [have_spec gpio] config { - - - +append_if [have_spec gpio] config " + + + - } + " append_if $use_usb_driver config { @@ -126,7 +130,7 @@ set boot_modules { # platform-specific modules lappend_if $use_usb_driver boot_modules usb_drv lappend_if $use_nic_driver boot_modules nic_drv -lappend_if [have_spec gpio] boot_modules gpio_drv +lappend_if [have_spec gpio] boot_modules [gpio_drv] append_platform_drv_boot_modules diff --git a/repos/libports/run/nic_router.run b/repos/libports/run/nic_router.run index a8d99af3c8..67424cc03a 100644 --- a/repos/libports/run/nic_router.run +++ b/repos/libports/run/nic_router.run @@ -25,6 +25,10 @@ set build_components { test/lxip/udp_client } +proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv } + if {[have_spec rpi] && [have_spec foc]} { return foc_gpio_drv } + return gpio_drv } + lappend_if $use_usb_driver build_components drivers/usb lappend_if [have_spec gpio] build_components drivers/gpio @@ -56,12 +60,12 @@ append config { } -append_if [have_spec gpio] config { - - - +append_if [have_spec gpio] config " + + + - } + " append_if $use_usb_driver config { @@ -377,7 +381,7 @@ set boot_modules { # platform-specific modules lappend_if $use_usb_driver boot_modules usb_drv lappend_if $use_nic_driver boot_modules nic_drv -lappend_if [have_spec gpio] boot_modules gpio_drv +lappend_if [have_spec gpio] boot_modules [gpio_drv] append_platform_drv_boot_modules diff --git a/repos/libports/run/qt5_drivers.inc b/repos/libports/run/qt5_drivers.inc index a9a69e37c6..7d07f747ce 100644 --- a/repos/libports/run/qt5_drivers.inc +++ b/repos/libports/run/qt5_drivers.inc @@ -102,6 +102,10 @@ proc drivers_build_components { feature_arg } { return $build_components } +proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv } + if {[have_spec rpi] && [have_spec foc]} { return foc_gpio_drv } + return gpio_drv } + # # Configuration # @@ -164,13 +168,12 @@ proc drivers_start_nodes { feature_arg } { } - append_if [use_gpio_drv feature] start_nodes { - - - + append_if [use_gpio_drv feature] start_nodes " + + + - - } + " if { [use_input_merger feature] } { append start_nodes { @@ -267,7 +270,7 @@ proc drivers_boot_modules { feature_arg } { lappend_if [use_audio_drv feature] boot_modules audio_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_gpio_drv feature] boot_modules [gpio_drv] lappend_if [use_input_merger feature] boot_modules input_merger lappend_if [use_nic_drv feature] boot_modules nic_drv lappend_if [use_ps2_drv feature] boot_modules ps2_drv diff --git a/repos/libports/run/smartcard.run b/repos/libports/run/smartcard.run index 25c69a9e00..78aac567a8 100644 --- a/repos/libports/run/smartcard.run +++ b/repos/libports/run/smartcard.run @@ -26,6 +26,10 @@ set build_components { test/smartcard } +proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv } + if {[have_spec rpi] && [have_spec foc]} { return foc_gpio_drv } + return gpio_drv } + lappend_if [have_spec gpio] build_components drivers/gpio source ${genode_dir}/repos/base/run/platform_drv.inc @@ -56,12 +60,12 @@ append config { } -append_if [have_spec gpio] config { - - - +append_if [have_spec gpio] config " + + + - } + " append_platform_drv_config @@ -113,7 +117,7 @@ set boot_modules { Info.plist } -lappend_if [have_spec gpio] boot_modules gpio_drv +lappend_if [have_spec gpio] boot_modules [gpio_drv] append_platform_drv_boot_modules diff --git a/repos/libports/run/test-ping_client.run b/repos/libports/run/test-ping_client.run index a588d1d78b..6ce789e307 100644 --- a/repos/libports/run/test-ping_client.run +++ b/repos/libports/run/test-ping_client.run @@ -22,6 +22,10 @@ set build_components { lappend_if [expr [have_spec omap4] || [have_spec arndale]] build_components drivers/usb lappend_if [have_spec gpio] build_components drivers/gpio +proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv } + if {[have_spec rpi] && [have_spec foc]} { return foc_gpio_drv } + return gpio_drv } + source ${genode_dir}/repos/base/run/platform_drv.inc append_platform_drv_build_components @@ -54,12 +58,12 @@ set config { } -append_if [have_spec gpio] config { - - - +append_if [have_spec gpio] config " + + + - } + " append_if [expr [have_spec omap4] || [have_spec arndale]] config { @@ -135,7 +139,7 @@ set boot_modules { # platform-specific modules lappend_if [expr [have_spec omap4] || [have_spec arndale]] boot_modules usb_drv lappend_if [expr ![have_spec omap4] && ![have_spec arndale]] boot_modules nic_drv -lappend_if [have_spec gpio] boot_modules gpio_drv +lappend_if [have_spec gpio] boot_modules [gpio_drv] append_platform_drv_boot_modules diff --git a/repos/libports/run/test-ping_server.run b/repos/libports/run/test-ping_server.run index 23ba70992a..0f17255cf3 100644 --- a/repos/libports/run/test-ping_server.run +++ b/repos/libports/run/test-ping_server.run @@ -22,6 +22,10 @@ set build_components { lappend_if [expr [have_spec omap4] || [have_spec arndale]] build_components drivers/usb lappend_if [have_spec gpio] build_components drivers/gpio +proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv } + if {[have_spec rpi] && [have_spec foc]} { return foc_gpio_drv } + return gpio_drv } + source ${genode_dir}/repos/base/run/platform_drv.inc append_platform_drv_build_components @@ -63,12 +67,12 @@ set config { } -append_if [have_spec gpio] config { - - - +append_if [have_spec gpio] config " + + + - } + " append_if [expr [have_spec omap4] || [have_spec arndale]] config { @@ -109,7 +113,7 @@ set boot_modules { # platform-specific modules lappend_if [expr [have_spec omap4] || [have_spec arndale]] boot_modules usb_drv lappend_if [expr ![have_spec omap4] && ![have_spec arndale]] boot_modules nic_drv -lappend_if [have_spec gpio] boot_modules gpio_drv +lappend_if [have_spec gpio] boot_modules [gpio_drv] append_platform_drv_boot_modules diff --git a/repos/os/run/demo.run b/repos/os/run/demo.run index 9474e70ff0..d9d1131d6b 100644 --- a/repos/os/run/demo.run +++ b/repos/os/run/demo.run @@ -17,6 +17,10 @@ set build_components { server/report_rom server/rom_filter } +proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv } + if {[have_spec rpi] && [have_spec foc]} { return foc_gpio_drv } + return gpio_drv } + source ${genode_dir}/repos/base/run/platform_drv.inc lappend_if [need_usb_hid] build_components drivers/usb @@ -66,12 +70,12 @@ append_if [have_spec framebuffer] config { } -append_if [have_spec gpio] config { - - - +append_if [have_spec gpio] config " + + + - } + " append_if [have_spec imx53] config { @@ -255,7 +259,7 @@ lappend_if [have_spec linux] boot_modules fb_sdl lappend_if [have_spec ps2] boot_modules ps2_drv lappend_if [have_spec framebuffer] boot_modules fb_drv lappend_if [need_usb_hid] boot_modules usb_drv -lappend_if [have_spec gpio] boot_modules gpio_drv +lappend_if [have_spec gpio] boot_modules [gpio_drv] lappend_if [have_spec imx53] boot_modules input_drv append_platform_drv_boot_modules diff --git a/repos/os/run/fb_bench.run b/repos/os/run/fb_bench.run index 2c9e9a153d..5f3dc69477 100644 --- a/repos/os/run/fb_bench.run +++ b/repos/os/run/fb_bench.run @@ -22,6 +22,10 @@ create_boot_directory # Generate config # +proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv } + if {[have_spec rpi] && [have_spec foc]} { return foc_gpio_drv } + return gpio_drv } + append config { @@ -44,12 +48,12 @@ append config { } -append_if [have_spec gpio] config { - - - +append_if [have_spec gpio] config " + + + - } + " append_if [have_spec sdl] config { @@ -86,7 +90,7 @@ append_platform_drv_boot_modules lappend_if [have_spec sdl] boot_modules fb_sdl lappend_if [have_spec framebuffer] boot_modules fb_drv -lappend_if [have_spec gpio] boot_modules gpio_drv +lappend_if [have_spec gpio] boot_modules [gpio_drv] build_boot_image $boot_modules diff --git a/repos/os/run/gpio_drv.run b/repos/os/run/gpio_drv.run index 4fb927c39e..5ea3662505 100644 --- a/repos/os/run/gpio_drv.run +++ b/repos/os/run/gpio_drv.run @@ -12,6 +12,10 @@ set build_components { test/gpio_drv } +proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv } + if {[have_spec rpi] && [have_spec foc]} { return foc_gpio_drv } + return gpio_drv } + build $build_components create_boot_directory @@ -39,8 +43,12 @@ append config { - - + } + +append config " + " + +append config { @@ -64,9 +72,11 @@ install_config $config set boot_modules { core ld.lib.so init timer - gpio_drv test-omap4_gpio_drv } +append boot_modules [gpio_drv] + build_boot_image $boot_modules +run_genode_until forever diff --git a/repos/os/run/gpio_led.run b/repos/os/run/gpio_led.run index 132303aeaf..e284ea9fe8 100644 --- a/repos/os/run/gpio_led.run +++ b/repos/os/run/gpio_led.run @@ -12,6 +12,10 @@ set build_components { test/gpio_led } +proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv } + if {[have_spec rpi] && [have_spec foc]} { return foc_gpio_drv } + return gpio_drv } + build $build_components create_boot_directory @@ -40,8 +44,12 @@ append config { - - + } + +append config " + " + +append config { @@ -64,8 +72,11 @@ install_config $config set boot_modules { core ld.lib.so init timer - gpio_drv led_gpio_drv } +append boot_modules [gpio_drv] + build_boot_image $boot_modules + +run_genode_until forever diff --git a/repos/os/run/gpio_signal.run b/repos/os/run/gpio_signal.run index 1f68f8f28c..922f57b6a6 100644 --- a/repos/os/run/gpio_signal.run +++ b/repos/os/run/gpio_signal.run @@ -12,6 +12,10 @@ set build_components { test/gpio_signal } +proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv } + if {[have_spec rpi] && [have_spec foc]} { return foc_gpio_drv } + return gpio_drv } + build $build_components create_boot_directory @@ -40,8 +44,12 @@ append config { - - + } + +append config " + " + +append config { @@ -67,8 +75,11 @@ install_config $config set boot_modules { core ld.lib.so init timer - gpio_drv signal_gpio_drv } +append boot_modules [gpio_drv] + build_boot_image $boot_modules + +run_genode_until forever diff --git a/repos/os/run/usb_block.run b/repos/os/run/usb_block.run index 52d1443426..77370bb9b6 100644 --- a/repos/os/run/usb_block.run +++ b/repos/os/run/usb_block.run @@ -14,6 +14,10 @@ set build_components { test/blk/bench } +proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv } + if {[have_spec rpi] && [have_spec foc]} { return foc_gpio_drv } + return gpio_drv } + lappend_if [have_spec gpio] build_components drivers/gpio source ${genode_dir}/repos/base/run/platform_drv.inc @@ -46,12 +50,12 @@ set config { append_platform_drv_config -append_if [have_spec gpio] config { - - - +append_if [have_spec gpio] config " + + + - } + " append config { @@ -137,6 +141,8 @@ set boot_modules { ld.lib.so libc.lib.so } +lappend_if [have_spec gpio] boot_modules [gpio_drv] + append_platform_drv_boot_modules build_boot_image $boot_modules diff --git a/repos/ports/run/genode_org.run b/repos/ports/run/genode_org.run index 252a631abd..213a328ee5 100644 --- a/repos/ports/run/genode_org.run +++ b/repos/ports/run/genode_org.run @@ -30,6 +30,10 @@ lappend_if $use_usb_driver build_components drivers/usb lappend_if $use_nic_driver build_components drivers/nic lappend_if [have_spec gpio] build_components drivers/gpio +proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv } + if {[have_spec rpi] && [have_spec foc]} { return foc_gpio_drv } + return gpio_drv } + source ${genode_dir}/repos/base/run/platform_drv.inc append_platform_drv_build_components @@ -58,12 +62,12 @@ append config { } -append_if [have_spec gpio] config { - - - +append_if [have_spec gpio] config " + + + - } + " append_if $use_usb_driver config { @@ -164,7 +168,7 @@ set boot_modules { # platform-specific modules lappend_if $use_usb_driver boot_modules usb_drv lappend_if $use_nic_driver boot_modules nic_drv -lappend_if [have_spec gpio] boot_modules gpio_drv +lappend_if [have_spec gpio] boot_modules [gpio_drv] append_platform_drv_boot_modules diff --git a/repos/ports/run/netperf.inc b/repos/ports/run/netperf.inc index 4373a6ce59..28cf85fb6d 100644 --- a/repos/ports/run/netperf.inc +++ b/repos/ports/run/netperf.inc @@ -7,6 +7,10 @@ # setting environment variable FORCE_QEMU permits running netperf in qemu set force_qemu [info exists ::env(FORCE_QEMU)] +proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv } + if {[have_spec rpi] && [have_spec foc]} { return foc_gpio_drv } + return gpio_drv } + if {[expr [have_include "power_on/qemu"] && !$force_qemu]} { puts "\nNetperf running on Qemu is not recommended.\n" exit @@ -122,12 +126,12 @@ set config { } -append_if [have_spec gpio] config { - - - +append_if [have_spec gpio] config " + + + - } + " append_if $use_nic_bridge config { @@ -268,7 +272,7 @@ append boot_modules " $netperf_stack " lappend_if $use_nic_bridge boot_modules nic_bridge # platform-specific modules -lappend_if [have_spec gpio] boot_modules gpio_drv +lappend_if [have_spec gpio] boot_modules [gpio_drv] lappend_if $use_usb_driver boot_modules usb_drv lappend_if $use_nic_driver boot_modules nic_drv diff --git a/repos/ports/run/noux_bash.run b/repos/ports/run/noux_bash.run index d64e5c21a6..5045f148d6 100644 --- a/repos/ports/run/noux_bash.run +++ b/repos/ports/run/noux_bash.run @@ -17,6 +17,10 @@ lappend_if [have_spec x86] build_components drivers/rtc lappend_if [need_usb_hid] build_components drivers/usb lappend_if [have_spec gpio] build_components drivers/gpio +proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv } + if {[have_spec rpi] && [have_spec foc]} { return foc_gpio_drv } + return gpio_drv } + # # Build Noux packages only once # @@ -99,12 +103,12 @@ append_if [have_spec ps2] config { } -append_if [have_spec gpio] config { - - - +append_if [have_spec gpio] config " + + + - } + " append_if [need_usb_hid] config { @@ -208,7 +212,7 @@ lappend_if [have_spec ps2] boot_modules ps2_drv lappend_if [have_spec x86] boot_modules rtc_drv lappend_if [have_spec framebuffer] boot_modules fb_drv lappend_if [need_usb_hid] boot_modules usb_drv -lappend_if [have_spec gpio] boot_modules gpio_drv +lappend_if [have_spec gpio] boot_modules [gpio_drv] append_platform_drv_boot_modules diff --git a/repos/ports/run/noux_gdb.run b/repos/ports/run/noux_gdb.run index 9561760cfe..c0d91b5e7b 100644 --- a/repos/ports/run/noux_gdb.run +++ b/repos/ports/run/noux_gdb.run @@ -26,6 +26,10 @@ set build_components { app/gdb_monitor } +proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv } + if {[have_spec rpi] && [have_spec foc]} { return foc_gpio_drv } + return gpio_drv } + lappend_if [have_spec gpio] build_components drivers/gpio lappend_if [have_spec nova] build_components lib/ld/nova @@ -108,12 +112,12 @@ append_if [have_spec ps2] config { } -append_if [have_spec gpio] config { - - - +append_if [have_spec gpio] config " + + + - } + " append_if [expr ![have_spec ps2] && [have_spec usb]] config { @@ -227,7 +231,7 @@ lappend_if [have_spec linux] boot_modules fb_sdl lappend_if [have_spec framebuffer] boot_modules fb_drv lappend_if [have_spec ps2] boot_modules ps2_drv lappend_if [have_spec usb] boot_modules usb_drv -lappend_if [have_spec gpio] boot_modules gpio_drv +lappend_if [have_spec gpio] boot_modules [gpio_drv] append_platform_drv_boot_modules diff --git a/repos/ports/run/noux_net_netcat.run b/repos/ports/run/noux_net_netcat.run index f54fe7638c..1d85bed51d 100644 --- a/repos/ports/run/noux_net_netcat.run +++ b/repos/ports/run/noux_net_netcat.run @@ -13,6 +13,10 @@ set build_components { noux-pkg/netcat } +proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv } + if {[have_spec rpi] && [have_spec foc]} { return foc_gpio_drv } + return gpio_drv } + lappend_if $use_usb_driver build_components drivers/usb lappend_if $use_nic_driver build_components drivers/nic lappend_if [have_spec gpio] build_components drivers/gpio @@ -108,12 +112,12 @@ append_if $use_nic_driver config { } -append_if [have_spec gpio] config { - - - +append_if [have_spec gpio] config " + + + - } + " append_if $use_usb_driver config { @@ -168,7 +172,7 @@ set boot_modules { lappend_if $use_nic_driver boot_modules nic_drv lappend_if $use_usb_driver boot_modules usb_drv lappend_if [have_include "power_on/qemu"] boot_modules uart_drv -lappend_if [have_spec gpio] boot_modules gpio_drv +lappend_if [have_spec gpio] boot_modules [gpio_drv] append_platform_drv_boot_modules diff --git a/repos/ports/run/noux_trace_fs.run b/repos/ports/run/noux_trace_fs.run index da4f74b2bf..2d6b5dfd7e 100644 --- a/repos/ports/run/noux_trace_fs.run +++ b/repos/ports/run/noux_trace_fs.run @@ -7,6 +7,10 @@ if {[have_spec linux]} { exit 0 } +proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv } + if {[have_spec rpi] && [have_spec foc]} { return foc_gpio_drv } + return gpio_drv } + # # On OMAP4 where no PS/2 is available, we rely on USB HID # @@ -106,12 +110,12 @@ append_if [have_spec ps2] config { } -append_if [have_spec gpio] config { - - - +append_if [have_spec gpio] config " + + + - } + " append_if [use_usb_input] config { @@ -218,7 +222,7 @@ lappend_if [have_spec linux] boot_modules fb_sdl lappend_if [have_spec ps2] boot_modules ps2_drv lappend_if [have_spec framebuffer] boot_modules fb_drv lappend_if [use_usb_input ] boot_modules usb_drv -lappend_if [have_spec gpio] boot_modules gpio_drv +lappend_if [have_spec gpio] boot_modules [gpio_drv] append_platform_drv_boot_modules diff --git a/tool/run/boot_dir/foc b/tool/run/boot_dir/foc index 417deae6e6..ff2805c377 100644 --- a/tool/run/boot_dir/foc +++ b/tool/run/boot_dir/foc @@ -1,7 +1,6 @@ proc binary_name_ld_lib_so { } { return "ld-foc.lib.so" } proc binary_name_core_o { } { return "foc/core.o" } proc binary_name_timer { } { return "foc_timer_drv" } -proc binary_name_gpio_drv { } { return "foc_gpio_drv" } proc run_boot_string { } { return "\nL4 Bootstrapper" } diff --git a/tool/run/boot_dir/hw b/tool/run/boot_dir/hw index 6db3251d70..a11250d636 100644 --- a/tool/run/boot_dir/hw +++ b/tool/run/boot_dir/hw @@ -1,7 +1,6 @@ proc binary_name_ld_lib_so { } { return "ld-hw.lib.so" } proc binary_name_core_o { } { return "hw/core.o" } proc binary_name_timer { } { return "hw_timer_drv" } -proc binary_name_gpio_drv { } { return "hw_gpio_drv" } proc run_boot_string { } { return "\nkernel initialized" }