diff --git a/repos/dde_linux/lib/import/import-usb_include.mk b/repos/dde_linux/lib/import/import-usb_include.mk index 779eea321..bad980972 100644 --- a/repos/dde_linux/lib/import/import-usb_include.mk +++ b/repos/dde_linux/lib/import/import-usb_include.mk @@ -1,6 +1,6 @@ USB_CONTRIB_DIR := $(call select_from_ports,dde_linux)/src/lib/usb -LIB_DIR := $(REP_DIR)/src/lib/usb +LIB_DIR := $(REP_DIR)/src/drivers/usb LIB_INC_DIR := $(LIB_DIR)/include # architecture-dependent includes diff --git a/repos/dde_linux/lib/mk/rpi_usb.mk b/repos/dde_linux/lib/mk/rpi_usb.mk index 79c80375c..e63575d7e 100644 --- a/repos/dde_linux/lib/mk/rpi_usb.mk +++ b/repos/dde_linux/lib/mk/rpi_usb.mk @@ -1,5 +1,5 @@ -SRC_CC += spec/rpi/dwc_irq.cc +SRC_CC += dwc_irq.cc -vpath % $(REP_DIR)/src/lib/usb +vpath % $(REP_DIR)/src/lib/rpi_usb CC_CXX_WARN_STRICT = diff --git a/repos/dde_linux/lib/mk/spec/arm_v6/usb.inc b/repos/dde_linux/lib/mk/spec/arm_v6/usb.inc deleted file mode 100644 index e07a2b235..000000000 --- a/repos/dde_linux/lib/mk/spec/arm_v6/usb.inc +++ /dev/null @@ -1,3 +0,0 @@ -include $(REP_DIR)/lib/mk/spec/arm/usb.inc - -INC_DIR += $(LIB_INC_DIR)/spec/arm_v6 diff --git a/repos/dde_linux/lib/mk/spec/arm_v7/usb.inc b/repos/dde_linux/lib/mk/spec/arm_v7/usb.inc deleted file mode 100644 index 207c73c13..000000000 --- a/repos/dde_linux/lib/mk/spec/arm_v7/usb.inc +++ /dev/null @@ -1,3 +0,0 @@ -include $(REP_DIR)/lib/mk/spec/arm/usb.inc - -INC_DIR += $(LIB_INC_DIR)/spec/arm_v7 diff --git a/repos/dde_linux/lib/mk/usb_include.mk b/repos/dde_linux/lib/mk/usb_include.mk index 92b31ef87..c707e2311 100644 --- a/repos/dde_linux/lib/mk/usb_include.mk +++ b/repos/dde_linux/lib/mk/usb_include.mk @@ -1,7 +1,7 @@ ifeq ($(called_from_lib_mk),yes) USB_CONTRIB_DIR := $(call select_from_ports,dde_linux)/src/lib/usb -LX_EMUL_H := $(REP_DIR)/src/lib/usb/include/lx_emul.h +LX_EMUL_H := $(REP_DIR)/src/drivers/usb/include/lx_emul.h # # Determine the header files included by the contrib code. For each diff --git a/repos/dde_linux/recipes/src/usb_drv/content.mk b/repos/dde_linux/recipes/src/usb_drv/content.mk index 9d8f832cb..a3cd1259d 100644 --- a/repos/dde_linux/recipes/src/usb_drv/content.mk +++ b/repos/dde_linux/recipes/src/usb_drv/content.mk @@ -1,13 +1,12 @@ -LIB_MK := $(shell cd $(REP_DIR); find lib -name "usb*") \ - $(foreach SPEC,x86_32 x86_64 arm,lib/mk/spec/$(SPEC)/lx_kit_setjmp.mk) \ - lib/mk/xhci.inc +LIB_MK := lib/import/import-usb_include.mk lib/mk/usb_include.mk lib/mk/rpi_usb.mk \ + $(foreach SPEC,x86_32 x86_64 arm,lib/mk/spec/$(SPEC)/lx_kit_setjmp.mk) PORT_DIR := $(call port_dir,$(REP_DIR)/ports/dde_linux) MIRROR_FROM_REP_DIR := $(LIB_MK) \ - lib/import/import-usb_include.mk src/drivers/usb \ + src/drivers/usb \ src/include src/lx_kit \ - $(shell cd $(REP_DIR); find src/lib/usb -type f) + $(shell cd $(REP_DIR); find src/lib/rpi_usb -type f) MIRROR_FROM_PORT_DIR := $(shell cd $(PORT_DIR); find src/lib/usb -type f | grep -v ".git") MIRROR_FROM_PORT_DIR := $(filter-out $(MIRROR_FROM_REP_DIR),$(MIRROR_FROM_PORT_DIR)) diff --git a/repos/dde_linux/recipes/src/usb_drv/used_apis b/repos/dde_linux/recipes/src/usb_drv/used_apis index ab1ca4e3d..0350de9f9 100644 --- a/repos/dde_linux/recipes/src/usb_drv/used_apis +++ b/repos/dde_linux/recipes/src/usb_drv/used_apis @@ -2,6 +2,8 @@ base os nic_session usb_session +gpio_session +regulator_session input_session block_session platform_session diff --git a/repos/dde_linux/run/usb_hid.run b/repos/dde_linux/run/usb_hid.run index 77d42833e..9006c202a 100644 --- a/repos/dde_linux/run/usb_hid.run +++ b/repos/dde_linux/run/usb_hid.run @@ -49,14 +49,18 @@ if { [get_cmd_switch --autopilot] && [have_include "power_on/qemu"] } { } if { [get_cmd_switch --autopilot] && - ![have_spec arndale] && - ![have_spec panda] && ![have_spec rpi] && ![have_spec x86]} { puts "Run script does not support autopilot mode on this platform" exit 0 } +proc usb_drv_binary { } { + if {[have_spec rpi]} { return rpi_usb_drv } + if {[have_spec x86]} { return usb_drv } + return no_usb_drv_available +} + # # Build # @@ -114,6 +118,7 @@ append config { + } -append_if [have_spec gpio] config " - - - - - " - append_platform_drv_config append config { @@ -146,8 +139,6 @@ set boot_modules { core ld.lib.so init timer usb_drv test-input dynamic_rom } -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_rndis.run b/repos/dde_linux/run/usb_rndis.run index 5016261b6..414753e31 100644 --- a/repos/dde_linux/run/usb_rndis.run +++ b/repos/dde_linux/run/usb_rndis.run @@ -4,6 +4,8 @@ # \date 2017-10-19 # +assert_spec x86 + # # Build # @@ -19,8 +21,6 @@ set build_components { source ${genode_dir}/repos/base/run/platform_drv.inc append_platform_drv_build_components -lappend_if [have_spec gpio] build_components drivers/gpio - build $build_components create_boot_directory @@ -80,13 +80,6 @@ set config { append_platform_drv_config -append_if [have_spec gpio] config " - - - - - " - append config { } @@ -107,7 +100,6 @@ set boot_modules { } append_platform_drv_boot_modules -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 c6cff2126..2f762dfd8 100644 --- a/repos/dde_linux/run/usb_storage.run +++ b/repos/dde_linux/run/usb_storage.run @@ -4,6 +4,8 @@ # \date 2011-06-24 # +assert_spec x86 + # # Build # @@ -14,8 +16,6 @@ set build_components { test/block/client } -lappend_if [have_spec gpio] build_components drivers/gpio - source ${genode_dir}/repos/base/run/platform_drv.inc append_platform_drv_build_components @@ -46,13 +46,6 @@ set config { append_platform_drv_config -append_if [have_spec gpio] config " - - - - - " - append config { @@ -81,8 +74,6 @@ set boot_modules { core ld.lib.so init timer usb_drv test-block-client } -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 5eac87b91..8e6537b26 100644 --- a/repos/dde_linux/run/usb_terminal.run +++ b/repos/dde_linux/run/usb_terminal.run @@ -1,3 +1,4 @@ +assert_spec x86 set usb_raw_device "" # @@ -21,8 +22,6 @@ set build_components { test/terminal_echo } -lappend_if [have_spec gpio] build_components drivers/gpio - source ${genode_dir}/repos/base/run/platform_drv.inc append_platform_drv_build_components @@ -51,13 +50,6 @@ append config { } -append_if [have_spec gpio] config " - - - - - " - append_platform_drv_config append config { diff --git a/repos/dde_linux/src/drivers/nic/fec/target.mk b/repos/dde_linux/src/drivers/nic/fec/target.mk index 0c1289965..82651bfe0 100644 --- a/repos/dde_linux/src/drivers/nic/fec/target.mk +++ b/repos/dde_linux/src/drivers/nic/fec/target.mk @@ -11,7 +11,7 @@ SRC_CC += env.cc irq.cc malloc.cc scheduler.cc timer.cc work.cc printf.cc INC_DIR += $(REP_DIR)/src/include INC_DIR += $(REP_DIR)/src/include/spec/arm INC_DIR += $(REP_DIR)/src/include/spec/arm_v7 -INC_DIR += $(REP_DIR)/src/lib/usb/include/spec/arm +INC_DIR += $(REP_DIR)/src/drivers/usb/include/spec/arm # contrib code LX_CONTRIB_DIR := $(call select_from_ports,dde_linux)/src/drivers/nic/fec diff --git a/repos/dde_linux/src/lib/usb/dummies.c b/repos/dde_linux/src/drivers/usb/dummies.c similarity index 100% rename from repos/dde_linux/src/lib/usb/dummies.c rename to repos/dde_linux/src/drivers/usb/dummies.c diff --git a/repos/dde_linux/src/lib/usb/include/lx_emul.h b/repos/dde_linux/src/drivers/usb/include/lx_emul.h similarity index 100% rename from repos/dde_linux/src/lib/usb/include/lx_emul.h rename to repos/dde_linux/src/drivers/usb/include/lx_emul.h diff --git a/repos/dde_linux/src/lib/usb/include/otg_whitelist.h b/repos/dde_linux/src/drivers/usb/include/otg_whitelist.h similarity index 100% rename from repos/dde_linux/src/lib/usb/include/otg_whitelist.h rename to repos/dde_linux/src/drivers/usb/include/otg_whitelist.h diff --git a/repos/dde_linux/src/lib/usb/include/platform.h b/repos/dde_linux/src/drivers/usb/include/platform.h similarity index 100% rename from repos/dde_linux/src/lib/usb/include/platform.h rename to repos/dde_linux/src/drivers/usb/include/platform.h diff --git a/repos/dde_linux/src/lib/usb/include/signal.h b/repos/dde_linux/src/drivers/usb/include/signal.h similarity index 100% rename from repos/dde_linux/src/lib/usb/include/signal.h rename to repos/dde_linux/src/drivers/usb/include/signal.h diff --git a/repos/dde_linux/src/lib/usb/include/spec/arm/platform/lx_emul.h b/repos/dde_linux/src/drivers/usb/include/spec/arm/platform/lx_emul.h similarity index 100% rename from repos/dde_linux/src/lib/usb/include/spec/arm/platform/lx_emul.h rename to repos/dde_linux/src/drivers/usb/include/spec/arm/platform/lx_emul.h diff --git a/repos/dde_linux/src/lib/usb/include/spec/arm/platform_device/platform_device.h b/repos/dde_linux/src/drivers/usb/include/spec/arm/platform_device/platform_device.h similarity index 100% rename from repos/dde_linux/src/lib/usb/include/spec/arm/platform_device/platform_device.h rename to repos/dde_linux/src/drivers/usb/include/spec/arm/platform_device/platform_device.h diff --git a/repos/dde_linux/src/lib/usb/include/spec/arm_v6/platform/lx_emul_barrier.h b/repos/dde_linux/src/drivers/usb/include/spec/arm_v6/platform/lx_emul_barrier.h similarity index 100% rename from repos/dde_linux/src/lib/usb/include/spec/arm_v6/platform/lx_emul_barrier.h rename to repos/dde_linux/src/drivers/usb/include/spec/arm_v6/platform/lx_emul_barrier.h diff --git a/repos/dde_linux/src/lib/usb/include/spec/arm_v7/platform/lx_emul_barrier.h b/repos/dde_linux/src/drivers/usb/include/spec/arm_v7/platform/lx_emul_barrier.h similarity index 100% rename from repos/dde_linux/src/lib/usb/include/spec/arm_v7/platform/lx_emul_barrier.h rename to repos/dde_linux/src/drivers/usb/include/spec/arm_v7/platform/lx_emul_barrier.h diff --git a/repos/dde_linux/src/lib/usb/include/spec/foc_rpi/usb_irq.h b/repos/dde_linux/src/drivers/usb/include/spec/foc_rpi/usb_irq.h similarity index 100% rename from repos/dde_linux/src/lib/usb/include/spec/foc_rpi/usb_irq.h rename to repos/dde_linux/src/drivers/usb/include/spec/foc_rpi/usb_irq.h diff --git a/repos/dde_linux/src/lib/usb/include/spec/odroid_x2/usb_masks.h b/repos/dde_linux/src/drivers/usb/include/spec/odroid_x2/usb_masks.h similarity index 100% rename from repos/dde_linux/src/lib/usb/include/spec/odroid_x2/usb_masks.h rename to repos/dde_linux/src/drivers/usb/include/spec/odroid_x2/usb_masks.h diff --git a/repos/dde_linux/src/lib/usb/include/spec/x86/platform/lx_emul.h b/repos/dde_linux/src/drivers/usb/include/spec/x86/platform/lx_emul.h similarity index 100% rename from repos/dde_linux/src/lib/usb/include/spec/x86/platform/lx_emul.h rename to repos/dde_linux/src/drivers/usb/include/spec/x86/platform/lx_emul.h diff --git a/repos/dde_linux/src/lib/usb/include/storage/scsi.h b/repos/dde_linux/src/drivers/usb/include/storage/scsi.h similarity index 100% rename from repos/dde_linux/src/lib/usb/include/storage/scsi.h rename to repos/dde_linux/src/drivers/usb/include/storage/scsi.h diff --git a/repos/dde_linux/src/lib/usb/include/usb_nic_component.h b/repos/dde_linux/src/drivers/usb/include/usb_nic_component.h similarity index 100% rename from repos/dde_linux/src/lib/usb/include/usb_nic_component.h rename to repos/dde_linux/src/drivers/usb/include/usb_nic_component.h diff --git a/repos/dde_linux/src/lib/usb/input/evdev.cc b/repos/dde_linux/src/drivers/usb/input/evdev.cc similarity index 100% rename from repos/dde_linux/src/lib/usb/input/evdev.cc rename to repos/dde_linux/src/drivers/usb/input/evdev.cc diff --git a/repos/dde_linux/src/lib/usb/input/input_component.cc b/repos/dde_linux/src/drivers/usb/input/input_component.cc similarity index 100% rename from repos/dde_linux/src/lib/usb/input/input_component.cc rename to repos/dde_linux/src/drivers/usb/input/input_component.cc diff --git a/repos/dde_linux/src/lib/usb/input/led_state.h b/repos/dde_linux/src/drivers/usb/input/led_state.h similarity index 100% rename from repos/dde_linux/src/lib/usb/input/led_state.h rename to repos/dde_linux/src/drivers/usb/input/led_state.h diff --git a/repos/dde_linux/src/lib/usb/lx_emul.cc b/repos/dde_linux/src/drivers/usb/lx_emul.cc similarity index 100% rename from repos/dde_linux/src/lib/usb/lx_emul.cc rename to repos/dde_linux/src/drivers/usb/lx_emul.cc diff --git a/repos/dde_linux/src/drivers/usb/main.cc b/repos/dde_linux/src/drivers/usb/main.cc index 0a5d25303..ac963204c 100644 --- a/repos/dde_linux/src/drivers/usb/main.cc +++ b/repos/dde_linux/src/drivers/usb/main.cc @@ -13,8 +13,126 @@ #include #include +#include +#include -extern void start_usb_driver(Genode::Env &env); +/* Local */ +#include +#include + +#include +#include +#include +#include +#include +#include +#include + + +using namespace Genode; + +extern "C" int subsys_usb_init(); +extern "C" void subsys_input_init(); +extern "C" void module_evdev_init(); +extern "C" void module_hid_init(); +extern "C" void module_hid_init_core(); +extern "C" void module_hid_generic_init(); +extern "C" void module_usb_storage_driver_init(); +extern "C" void module_wacom_driver_init(); +extern "C" void module_ch_driver_init(); +extern "C" void module_ms_driver_init(); +extern "C" void module_mt_driver_init(); +extern "C" void module_raw_driver_init(); +extern "C" void module_led_init(); + +extern "C" void start_input_service(void *ep, void *services); + +struct workqueue_struct *system_power_efficient_wq; +struct workqueue_struct *system_wq; +struct workqueue_struct *tasklet_wq; + +void breakpoint() { Genode::log("BREAK"); } + + +static void run_linux(void *s) +{ + Services *services = (Services *)s; + + system_power_efficient_wq = alloc_workqueue("system_power_efficient_wq", 0, 0); + system_wq = alloc_workqueue("system_wq", 0, 0); + tasklet_wq = alloc_workqueue("tasklet_wq", 0, 0); + + /* + * The RAW driver is initialized first to make sure that it doesn't miss + * notifications about added devices. + */ + if (services->raw) + /* low level interface */ + module_raw_driver_init(); + + /* USB */ + subsys_usb_init(); + + /* input + HID */ + if (services->hid) { + subsys_input_init(); + module_evdev_init(); + module_led_init(); + + /* HID */ + module_hid_init_core(); + module_hid_init(); + module_hid_generic_init(); + module_ch_driver_init(); + module_ms_driver_init(); + module_mt_driver_init(); + module_wacom_driver_init(); + } + + /* storage */ + if (services->stor) + module_usb_storage_driver_init(); + + /* host controller */ + platform_hcd_init(Lx_kit::env().env(), services); + + while (true) + Lx::scheduler().current()->block_and_schedule(); +} + + +void start_usb_driver(Genode::Env &env) +{ + /* initialize USB env */ + Lx_kit::construct_env(env); + + /* sets up backend alloc needed by malloc */ + backend_alloc_init(env, env.ram(), Lx_kit::env().heap()); + + Lx::malloc_init(env, Lx_kit::env().heap()); + + static Services services(env); + + if (services.hid) + start_input_service(&env.ep().rpc_ep(), &services); + + Storage::init(env); + Nic::init(env); + + if (services.raw) + Raw::init(env, services.raw_report_device_list); + + Lx::Scheduler &sched = Lx::scheduler(&env); + Lx::Timer &timer = Lx::timer(&env, &env.ep(), &Lx_kit::env().heap(), &jiffies); + + Lx::Irq::irq(&env.ep(), &Lx_kit::env().heap()); + Lx::Work::work_queue(&Lx_kit::env().heap()); + + static Lx::Task linux(run_linux, &services, "linux", Lx::Task::PRIORITY_0, + Lx::scheduler()); + + Lx::scheduler().schedule(); +} namespace Usb_driver { diff --git a/repos/dde_linux/src/lib/usb/nic/nic.cc b/repos/dde_linux/src/drivers/usb/nic/nic.cc similarity index 100% rename from repos/dde_linux/src/lib/usb/nic/nic.cc rename to repos/dde_linux/src/drivers/usb/nic/nic.cc diff --git a/repos/dde_linux/src/lib/usb/raw/raw.cc b/repos/dde_linux/src/drivers/usb/raw/raw.cc similarity index 100% rename from repos/dde_linux/src/lib/usb/raw/raw.cc rename to repos/dde_linux/src/drivers/usb/raw/raw.cc diff --git a/repos/dde_linux/src/lib/usb/raw/raw.h b/repos/dde_linux/src/drivers/usb/raw/raw.h similarity index 100% rename from repos/dde_linux/src/lib/usb/raw/raw.h rename to repos/dde_linux/src/drivers/usb/raw/raw.h diff --git a/repos/dde_linux/src/lib/usb/raw/raw_driver.c b/repos/dde_linux/src/drivers/usb/raw/raw_driver.c similarity index 100% rename from repos/dde_linux/src/lib/usb/raw/raw_driver.c rename to repos/dde_linux/src/drivers/usb/raw/raw_driver.c diff --git a/repos/dde_linux/src/lib/usb/spec/arm/platform_device.cc b/repos/dde_linux/src/drivers/usb/spec/arm/platform_device.cc similarity index 100% rename from repos/dde_linux/src/lib/usb/spec/arm/platform_device.cc rename to repos/dde_linux/src/drivers/usb/spec/arm/platform_device.cc diff --git a/repos/dde_linux/src/lib/usb/spec/arm/platform_generic.cc b/repos/dde_linux/src/drivers/usb/spec/arm/platform_generic.cc similarity index 100% rename from repos/dde_linux/src/lib/usb/spec/arm/platform_generic.cc rename to repos/dde_linux/src/drivers/usb/spec/arm/platform_generic.cc diff --git a/repos/dde_linux/lib/mk/spec/arm/usb.inc b/repos/dde_linux/src/drivers/usb/spec/arm/target.inc similarity index 84% rename from repos/dde_linux/lib/mk/spec/arm/usb.inc rename to repos/dde_linux/src/drivers/usb/spec/arm/target.inc index de61d4069..0d6974c10 100644 --- a/repos/dde_linux/lib/mk/spec/arm/usb.inc +++ b/repos/dde_linux/src/drivers/usb/spec/arm/target.inc @@ -1,4 +1,4 @@ -include $(REP_DIR)/lib/mk/usb.inc +include $(REP_DIR)/src/drivers/usb/target.inc SRC_CC += platform_device.cc platform_generic.cc diff --git a/repos/dde_linux/src/drivers/usb/spec/arm_v6/target.inc b/repos/dde_linux/src/drivers/usb/spec/arm_v6/target.inc new file mode 100644 index 000000000..6a81ffd87 --- /dev/null +++ b/repos/dde_linux/src/drivers/usb/spec/arm_v6/target.inc @@ -0,0 +1,3 @@ +include $(REP_DIR)/src/drivers/usb/spec/arm/target.inc + +INC_DIR += $(LIB_INC_DIR)/spec/arm_v6 diff --git a/repos/dde_linux/src/drivers/usb/spec/arm_v7/target.inc b/repos/dde_linux/src/drivers/usb/spec/arm_v7/target.inc new file mode 100644 index 000000000..04b6884ae --- /dev/null +++ b/repos/dde_linux/src/drivers/usb/spec/arm_v7/target.inc @@ -0,0 +1,3 @@ +include $(REP_DIR)/src/drivers/usb/spec/arm/target.inc + +INC_DIR += $(LIB_INC_DIR)/spec/arm_v7 diff --git a/repos/dde_linux/src/lib/usb/spec/arndale/platform.cc b/repos/dde_linux/src/drivers/usb/spec/arndale/platform.cc similarity index 99% rename from repos/dde_linux/src/lib/usb/spec/arndale/platform.cc rename to repos/dde_linux/src/drivers/usb/spec/arndale/platform.cc index cc017f3b3..96d7f6b28 100644 --- a/repos/dde_linux/src/lib/usb/spec/arndale/platform.cc +++ b/repos/dde_linux/src/drivers/usb/spec/arndale/platform.cc @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/repos/dde_linux/src/drivers/usb/spec/arndale/regulator/consts.h b/repos/dde_linux/src/drivers/usb/spec/arndale/regulator/consts.h new file mode 100644 index 000000000..1eb9fc872 --- /dev/null +++ b/repos/dde_linux/src/drivers/usb/spec/arndale/regulator/consts.h @@ -0,0 +1 @@ +#include diff --git a/repos/dde_linux/lib/mk/spec/arndale/usb.mk b/repos/dde_linux/src/drivers/usb/spec/arndale/target.mk similarity index 79% rename from repos/dde_linux/lib/mk/spec/arndale/usb.mk rename to repos/dde_linux/src/drivers/usb/spec/arndale/target.mk index 025790f5d..5db8b9ea3 100644 --- a/repos/dde_linux/lib/mk/spec/arndale/usb.mk +++ b/repos/dde_linux/src/drivers/usb/spec/arndale/target.mk @@ -1,9 +1,12 @@ +TARGET = arndale_usb_drv +REQUIRES = arm_v7 + SRC_C += $(addprefix net/usb/, usbnet.c asix_devices.c asix_common.c ax88172a.c \ ax88179_178a.c) SRC_C += usb/host/ehci-exynos.c -include $(REP_DIR)/lib/mk/xhci.inc -include $(REP_DIR)/lib/mk/spec/arm_v7/usb.inc +include $(REP_DIR)/src/drivers/usb/xhci.inc +include $(REP_DIR)/src/drivers/usb/spec/arm_v7/target.inc CC_OPT += -DCONFIG_USB_EHCI_TT_NEWSCHED -DCONFIG_USB_DWC3_HOST=1 \ -DCONFIG_USB_DWC3_GADGET=0 -DCONFIG_USB_OTG_UTILS -DCONFIG_USB_XHCI_PLATFORM -DDWC3_QUIRK @@ -17,5 +20,3 @@ SRC_C += $(addprefix usb/dwc3/, dwc3-exynos.c host.c core.c) SRC_C += usb/host/xhci-plat.c vpath platform.cc $(LIB_DIR)/spec/arndale - -CC_CXX_WARN_STRICT = diff --git a/repos/dde_linux/src/lib/usb/spec/odroid_x2/platform.cc b/repos/dde_linux/src/drivers/usb/spec/odroid_x2/platform.cc similarity index 99% rename from repos/dde_linux/src/lib/usb/spec/odroid_x2/platform.cc rename to repos/dde_linux/src/drivers/usb/spec/odroid_x2/platform.cc index 383a5f990..17ff93e21 100644 --- a/repos/dde_linux/src/lib/usb/spec/odroid_x2/platform.cc +++ b/repos/dde_linux/src/drivers/usb/spec/odroid_x2/platform.cc @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/repos/dde_linux/src/drivers/usb/spec/odroid_x2/regulator/consts.h b/repos/dde_linux/src/drivers/usb/spec/odroid_x2/regulator/consts.h new file mode 100644 index 000000000..268d72f3b --- /dev/null +++ b/repos/dde_linux/src/drivers/usb/spec/odroid_x2/regulator/consts.h @@ -0,0 +1 @@ +#include diff --git a/repos/dde_linux/lib/mk/spec/odroid_x2/usb.mk b/repos/dde_linux/src/drivers/usb/spec/odroid_x2/target.mk similarity index 72% rename from repos/dde_linux/lib/mk/spec/odroid_x2/usb.mk rename to repos/dde_linux/src/drivers/usb/spec/odroid_x2/target.mk index fcdd0e97c..fc1d8aa6a 100644 --- a/repos/dde_linux/lib/mk/spec/odroid_x2/usb.mk +++ b/repos/dde_linux/src/drivers/usb/spec/odroid_x2/target.mk @@ -1,7 +1,10 @@ +TARGET = odroid_x2_usb_drv +REQUIRES = arm_v7 + SRC_C += $(addprefix net/usb/, usbnet.c smsc95xx.c) SRC_C += usb/host/ehci-exynos.c -include $(REP_DIR)/lib/mk/spec/arm_v7/usb.inc +include $(REP_DIR)/src/drivers/usb/spec/arm_v7/target.inc CC_OPT += -DCONFIG_USB_EHCI_TT_NEWSCHED \ @@ -12,5 +15,3 @@ SRC_CC += platform.cc INC_DIR += $(LIB_INC_DIR)/spec/odroid_x2 vpath platform.cc $(LIB_DIR)/spec/odroid_x2 - -CC_CXX_WARN_STRICT = diff --git a/repos/dde_linux/src/lib/usb/spec/panda/platform.cc b/repos/dde_linux/src/drivers/usb/spec/panda/platform.cc similarity index 100% rename from repos/dde_linux/src/lib/usb/spec/panda/platform.cc rename to repos/dde_linux/src/drivers/usb/spec/panda/platform.cc diff --git a/repos/dde_linux/lib/mk/spec/panda/usb.mk b/repos/dde_linux/src/drivers/usb/spec/panda/target.mk similarity index 71% rename from repos/dde_linux/lib/mk/spec/panda/usb.mk rename to repos/dde_linux/src/drivers/usb/spec/panda/target.mk index eb3affe4b..400e01e88 100644 --- a/repos/dde_linux/lib/mk/spec/panda/usb.mk +++ b/repos/dde_linux/src/drivers/usb/spec/panda/target.mk @@ -1,7 +1,10 @@ +TARGET = panda_usb_drv +REQUIRES = arm_v7 + SRC_C += $(addprefix net/usb/, usbnet.c smsc95xx.c) SRC_C += usb/host/ehci-omap.c -include $(REP_DIR)/lib/mk/spec/arm_v7/usb.inc +include $(REP_DIR)/src/drivers/usb/spec/arm_v7/target.inc CC_OPT += -DCONFIG_USB_EHCI_HCD_OMAP -DCONFIG_USB_EHCI_TT_NEWSCHED -DVERBOSE_DEBUG SRC_CC += platform.cc diff --git a/repos/dde_linux/src/lib/usb/spec/rpi/platform.cc b/repos/dde_linux/src/drivers/usb/spec/rpi/platform.cc similarity index 100% rename from repos/dde_linux/src/lib/usb/spec/rpi/platform.cc rename to repos/dde_linux/src/drivers/usb/spec/rpi/platform.cc diff --git a/repos/dde_linux/src/drivers/usb/spec/rpi/platform_session/client.h b/repos/dde_linux/src/drivers/usb/spec/rpi/platform_session/client.h new file mode 100644 index 000000000..8d56b8ee5 --- /dev/null +++ b/repos/dde_linux/src/drivers/usb/spec/rpi/platform_session/client.h @@ -0,0 +1 @@ +#include diff --git a/repos/dde_linux/src/drivers/usb/spec/rpi/platform_session/platform_session.h b/repos/dde_linux/src/drivers/usb/spec/rpi/platform_session/platform_session.h new file mode 100644 index 000000000..15d3b5bc2 --- /dev/null +++ b/repos/dde_linux/src/drivers/usb/spec/rpi/platform_session/platform_session.h @@ -0,0 +1 @@ +#include diff --git a/repos/dde_linux/lib/mk/spec/rpi/usb.mk b/repos/dde_linux/src/drivers/usb/spec/rpi/target.mk similarity index 91% rename from repos/dde_linux/lib/mk/spec/rpi/usb.mk rename to repos/dde_linux/src/drivers/usb/spec/rpi/target.mk index e6f83641d..c455faca4 100644 --- a/repos/dde_linux/lib/mk/spec/rpi/usb.mk +++ b/repos/dde_linux/src/drivers/usb/spec/rpi/target.mk @@ -1,3 +1,6 @@ +TARGET = rpi_usb_drv +REQUIRES = arm_v6 + SRC_C += \ usb/host/dwc_otg/dwc_otg/dwc_otg_adp.c \ usb/host/dwc_otg/dwc_otg/dwc_otg_attr.c \ @@ -9,9 +12,7 @@ SRC_C += \ usb/host/dwc_otg/dwc_otg/dwc_otg_hcd_ddma.c \ usb/host/dwc_otg/dwc_otg/dwc_otg_hcd_intr.c \ usb/host/dwc_otg/dwc_otg/dwc_otg_hcd_linux.c \ - usb/host/dwc_otg/dwc_otg/dwc_otg_hcd_queue.c - -SRC_C += \ + usb/host/dwc_otg/dwc_otg/dwc_otg_hcd_queue.c \ usb/host/dwc_otg/dwc_common_port/dwc_cc.c \ usb/host/dwc_otg/dwc_common_port/dwc_common_linux.c \ usb/host/dwc_otg/dwc_common_port/dwc_crypto.c \ @@ -22,7 +23,7 @@ SRC_C += \ SRC_C += net/usb/usbnet.c net/usb/smsc95xx.c -include $(REP_DIR)/lib/mk/spec/arm_v6/usb.inc +include $(REP_DIR)/src/drivers/usb/spec/arm_v6/target.inc CC_OPT += -DDWC_LINUX -DPLATFORM_INTERFACE @@ -47,5 +48,3 @@ vpath %.c $(LX_CONTRIB_DIR)/drivers/net/usb CC_CXX_OPT += -std=gnu++11 LIBS += rpi_usb - -CC_CXX_WARN_STRICT = diff --git a/repos/dde_linux/src/lib/usb/spec/x86/pci_driver.cc b/repos/dde_linux/src/drivers/usb/spec/x86/pci_driver.cc similarity index 100% rename from repos/dde_linux/src/lib/usb/spec/x86/pci_driver.cc rename to repos/dde_linux/src/drivers/usb/spec/x86/pci_driver.cc diff --git a/repos/dde_linux/src/lib/usb/spec/x86/platform.cc b/repos/dde_linux/src/drivers/usb/spec/x86/platform.cc similarity index 100% rename from repos/dde_linux/src/lib/usb/spec/x86/platform.cc rename to repos/dde_linux/src/drivers/usb/spec/x86/platform.cc diff --git a/repos/dde_linux/lib/mk/spec/x86/usb.inc b/repos/dde_linux/src/drivers/usb/spec/x86/target.inc similarity index 85% rename from repos/dde_linux/lib/mk/spec/x86/usb.inc rename to repos/dde_linux/src/drivers/usb/spec/x86/target.inc index 04bc44abb..cdc405def 100644 --- a/repos/dde_linux/lib/mk/spec/x86/usb.inc +++ b/repos/dde_linux/src/drivers/usb/spec/x86/target.inc @@ -16,8 +16,8 @@ SRC_CC += pci_driver.cc platform.cc SRC_CC += pci.cc mapped_io_mem_range.cc -include $(REP_DIR)/lib/mk/xhci.inc -include $(REP_DIR)/lib/mk/usb.inc +include $(REP_DIR)/src/drivers/usb/xhci.inc +include $(REP_DIR)/src/drivers/usb/target.inc CC_OPT += -DCONFIG_PCI -DCONFIG_USB_EHCI_PCI=1 -DCONFIG_USB_XHCI_HCD=1 diff --git a/repos/dde_linux/lib/mk/spec/x86_32/usb.mk b/repos/dde_linux/src/drivers/usb/spec/x86_32/target.mk similarity index 54% rename from repos/dde_linux/lib/mk/spec/x86_32/usb.mk rename to repos/dde_linux/src/drivers/usb/spec/x86_32/target.mk index 33336ee68..1ed3c7a09 100644 --- a/repos/dde_linux/lib/mk/spec/x86_32/usb.mk +++ b/repos/dde_linux/src/drivers/usb/spec/x86_32/target.mk @@ -1,7 +1,7 @@ +TARGET = usb_drv +REQUIRES = x86_32 + INC_DIR += $(LIB_INC_DIR)/spec/x86_32 $(LIB_INC_DIR)/spec/x86 INC_DIR += $(REP_DIR)/src/include/spec/x86_32 -include $(REP_DIR)/lib/mk/spec/x86/usb.inc - - -CC_CXX_WARN_STRICT = +include $(REP_DIR)/src/drivers/usb/spec/x86/target.inc diff --git a/repos/dde_linux/lib/mk/spec/x86_64/usb.mk b/repos/dde_linux/src/drivers/usb/spec/x86_64/target.mk similarity index 54% rename from repos/dde_linux/lib/mk/spec/x86_64/usb.mk rename to repos/dde_linux/src/drivers/usb/spec/x86_64/target.mk index a85048e27..c0f00197f 100644 --- a/repos/dde_linux/lib/mk/spec/x86_64/usb.mk +++ b/repos/dde_linux/src/drivers/usb/spec/x86_64/target.mk @@ -1,6 +1,7 @@ +TARGET = usb_drv +REQUIRES = x86_64 + INC_DIR += $(LIB_INC_DIR)/spec/x86_64 $(LIB_INC_DIR)/spec/x86 INC_DIR += $(REP_DIR)/src/include/spec/x86_64 -include $(REP_DIR)/lib/mk/spec/x86/usb.inc - -CC_CXX_WARN_STRICT = +include $(REP_DIR)/src/drivers/usb/spec/x86/target.inc diff --git a/repos/dde_linux/src/lib/usb/storage/scsi.c b/repos/dde_linux/src/drivers/usb/storage/scsi.c similarity index 100% rename from repos/dde_linux/src/lib/usb/storage/scsi.c rename to repos/dde_linux/src/drivers/usb/storage/scsi.c diff --git a/repos/dde_linux/src/lib/usb/storage/storage.cc b/repos/dde_linux/src/drivers/usb/storage/storage.cc similarity index 100% rename from repos/dde_linux/src/lib/usb/storage/storage.cc rename to repos/dde_linux/src/drivers/usb/storage/storage.cc diff --git a/repos/dde_linux/lib/mk/usb.inc b/repos/dde_linux/src/drivers/usb/target.inc similarity index 94% rename from repos/dde_linux/lib/mk/usb.inc rename to repos/dde_linux/src/drivers/usb/target.inc index 98a6069f1..f72e792cb 100644 --- a/repos/dde_linux/lib/mk/usb.inc +++ b/repos/dde_linux/src/drivers/usb/target.inc @@ -1,8 +1,13 @@ -LIB_DIR = $(REP_DIR)/src/lib/usb +SRC_CC += main.cc +LIBS = base + +CC_CXX_WARN_STRICT = + +LIB_DIR = $(REP_DIR)/src/drivers/usb LIB_INC_DIR = $(LIB_DIR)/include LIBS += usb_include lx_kit_setjmp -SRC_CC += main.cc lx_emul.cc storage.cc \ +SRC_CC += lx_emul.cc storage.cc \ input_component.cc evdev.cc nic.cc raw.cc SRC_C += dummies.c scsi.c raw_driver.c @@ -14,6 +19,7 @@ USB_DIR := $(DRIVERS_DIR)/usb # The order of include-search directories is important, we need to look into # 'contrib' before falling back to our custom 'lx_emul.h' header. # +INC_DIR += $(PRG_DIR) INC_DIR += $(LIB_INC_DIR) $(REP_DIR)/src/include INC_DIR += $(LX_CONTRIB_DIR)/include $(LX_CONTRIB_DIR)/include/uapi $(LX_CONTRIB_DIR) diff --git a/repos/dde_linux/src/drivers/usb/target.mk b/repos/dde_linux/src/drivers/usb/target.mk deleted file mode 100644 index 8aaf0aa44..000000000 --- a/repos/dde_linux/src/drivers/usb/target.mk +++ /dev/null @@ -1,5 +0,0 @@ -TARGET = usb_drv -SRC_CC = main.cc -LIBS = base usb - -CC_CXX_WARN_STRICT = diff --git a/repos/dde_linux/src/lib/usb/test.cc b/repos/dde_linux/src/drivers/usb/test.cc similarity index 100% rename from repos/dde_linux/src/lib/usb/test.cc rename to repos/dde_linux/src/drivers/usb/test.cc diff --git a/repos/dde_linux/lib/mk/xhci.inc b/repos/dde_linux/src/drivers/usb/xhci.inc similarity index 100% rename from repos/dde_linux/lib/mk/xhci.inc rename to repos/dde_linux/src/drivers/usb/xhci.inc diff --git a/repos/dde_linux/src/lib/usb/spec/rpi/dwc_irq.cc b/repos/dde_linux/src/lib/rpi_usb/dwc_irq.cc similarity index 100% rename from repos/dde_linux/src/lib/usb/spec/rpi/dwc_irq.cc rename to repos/dde_linux/src/lib/rpi_usb/dwc_irq.cc diff --git a/repos/dde_linux/src/lib/usb/main.cc b/repos/dde_linux/src/lib/usb/main.cc deleted file mode 100644 index 584c9e29a..000000000 --- a/repos/dde_linux/src/lib/usb/main.cc +++ /dev/null @@ -1,138 +0,0 @@ -/* - * \brief USB driver main program - * \author Norman Feske - * \author Sebastian Sumpf - * \author Christian Menard - * \date 2012-01-29 - */ - -/* - * Copyright (C) 2012-2017 Genode Labs GmbH - * Copyright (C) 2014 Ksys Labs LLC - * - * This file is distributed under the terms of the GNU General Public License - * version 2. - */ - - -/* Genode */ -#include -#include - -/* Local */ -#include -#include - -#include -#include -#include -#include -#include -#include -#include - - -using namespace Genode; - -extern "C" int subsys_usb_init(); -extern "C" void subsys_input_init(); -extern "C" void module_evdev_init(); -extern "C" void module_hid_init(); -extern "C" void module_hid_init_core(); -extern "C" void module_hid_generic_init(); -extern "C" void module_usb_storage_driver_init(); -extern "C" void module_wacom_driver_init(); -extern "C" void module_ch_driver_init(); -extern "C" void module_ms_driver_init(); -extern "C" void module_mt_driver_init(); -extern "C" void module_raw_driver_init(); -extern "C" void module_led_init(); - -extern "C" void start_input_service(void *ep, void *services); - -struct workqueue_struct *system_power_efficient_wq; -struct workqueue_struct *system_wq; -struct workqueue_struct *tasklet_wq; - -void breakpoint() { Genode::log("BREAK"); } - - -static void run_linux(void *s) -{ - Services *services = (Services *)s; - - system_power_efficient_wq = alloc_workqueue("system_power_efficient_wq", 0, 0); - system_wq = alloc_workqueue("system_wq", 0, 0); - tasklet_wq = alloc_workqueue("tasklet_wq", 0, 0); - - /* - * The RAW driver is initialized first to make sure that it doesn't miss - * notifications about added devices. - */ - if (services->raw) - /* low level interface */ - module_raw_driver_init(); - - /* USB */ - subsys_usb_init(); - - /* input + HID */ - if (services->hid) { - subsys_input_init(); - module_evdev_init(); - module_led_init(); - - /* HID */ - module_hid_init_core(); - module_hid_init(); - module_hid_generic_init(); - module_ch_driver_init(); - module_ms_driver_init(); - module_mt_driver_init(); - module_wacom_driver_init(); - } - - /* storage */ - if (services->stor) - module_usb_storage_driver_init(); - - /* host controller */ - platform_hcd_init(Lx_kit::env().env(), services); - - while (true) - Lx::scheduler().current()->block_and_schedule(); -} - - -void start_usb_driver(Genode::Env &env) -{ - /* initialize USB env */ - Lx_kit::construct_env(env); - - /* sets up backend alloc needed by malloc */ - backend_alloc_init(env, env.ram(), Lx_kit::env().heap()); - - Lx::malloc_init(env, Lx_kit::env().heap()); - - static Services services(env); - - if (services.hid) - start_input_service(&env.ep().rpc_ep(), &services); - - Storage::init(env); - Nic::init(env); - - if (services.raw) - Raw::init(env, services.raw_report_device_list); - - Lx::Scheduler &sched = Lx::scheduler(&env); - Lx::Timer &timer = Lx::timer(&env, &env.ep(), &Lx_kit::env().heap(), &jiffies); - - Lx::Irq::irq(&env.ep(), &Lx_kit::env().heap()); - Lx::Work::work_queue(&Lx_kit::env().heap()); - - static Lx::Task linux(run_linux, &services, "linux", Lx::Task::PRIORITY_0, - Lx::scheduler()); - - Lx::scheduler().schedule(); -} diff --git a/repos/gems/run/cpu_load_display.run b/repos/gems/run/cpu_load_display.run index d04135bce..a33d20c0f 100644 --- a/repos/gems/run/cpu_load_display.run +++ b/repos/gems/run/cpu_load_display.run @@ -1,38 +1,15 @@ -# -# Build -# - -if {[have_spec odroid_xu]} { - puts "Run script not supported on this platform."; exit 0 } - -set build_components { - core init timer - server/nitpicker - server/dynamic_rom - server/report_rom - drivers/framebuffer drivers/input - app/trace_subject_reporter - app/cpu_load_display - app/cpu_burner - app/pointer -} - -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 - -append_platform_drv_build_components - -build $build_components - create_boot_directory +import_from_depot [depot_user]/src/[base_src] \ + [depot_user]/pkg/[drivers_interactive_pkg] \ + [depot_user]/src/dynamic_rom \ + [depot_user]/src/report_rom \ + [depot_user]/src/nitpicker \ + [depot_user]/src/cpu_burner \ + [depot_user]/src/cpu_load_display \ + [depot_user]/src/trace_subject_reporter \ + [depot_user]/src/init -# -# Generate config -# - -append config { +install_config { @@ -48,59 +25,26 @@ append config { - } + -append_if [have_spec sdl] config { - - - - - - - } - -append_platform_drv_config - -append_if [have_spec framebuffer] config { - - - - - } - -append_if [have_spec gpio] config " - - - - - " - -append_if [have_spec imx53] config { - - - - - } - -append_if [have_spec ps2] config { - - - - } - -append_if [need_usb_hid] config { - - - - - } - -append config { + + + + + + + + + + + + + @@ -200,37 +144,6 @@ append config { } -install_config $config - -# copy backdrop PNG images to bin directory -foreach file { genode_logo.png grid.png } { - file copy -force [genode_dir]/repos/gems/src/app/backdrop/$file bin/ } - - -# -# Boot modules -# - -# generic modules -set boot_modules { - core ld.lib.so init - timer - nitpicker report_rom dynamic_rom pointer - cpu_load_display cpu_burner trace_subject_reporter -} - -# platform-specific modules -append_platform_drv_boot_modules - -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 imx53] boot_modules input_drv - -build_boot_image $boot_modules - +build_boot_image {} append qemu_args " -smp 4,cores=4 " - run_genode_until forever diff --git a/repos/libports/run/qt5_drivers.inc b/repos/libports/run/qt5_drivers.inc index fb0812382..0fadffbbd 100644 --- a/repos/libports/run/qt5_drivers.inc +++ b/repos/libports/run/qt5_drivers.inc @@ -89,6 +89,12 @@ proc use_usb_drv { feature_arg } { return [expr {[use_usb_input feature] || [use_usb_nic feature]}] } +proc usb_drv_binary { } { + if {[have_spec x86]} { return usb_drv } + if {[have_spec rpi]} { return rpi_usb_drv } + return no_nic_drv_available +} + # # Keyboard layout - this function can be overridden in a run script # @@ -281,6 +287,7 @@ proc drivers_start_nodes { feature_arg } { if { [use_usb_drv feature] } { append start_nodes { + } append_if [use_usb_input feature] start_nodes { @@ -326,7 +333,7 @@ proc drivers_boot_modules { feature_arg } { lappend_if [use_input_filter feature] boot_modules special.chargen lappend_if [use_nic_drv feature] boot_modules [nic_drv_binary] lappend_if [use_ps2_drv feature] boot_modules ps2_drv - lappend_if [use_usb_drv feature] boot_modules usb_drv + lappend_if [use_usb_drv feature] boot_modules [usb_drv_binary] return $boot_modules } diff --git a/repos/libports/run/smartcard.run b/repos/libports/run/smartcard.run index de28fdee1..ec9fcb908 100644 --- a/repos/libports/run/smartcard.run +++ b/repos/libports/run/smartcard.run @@ -10,10 +10,7 @@ if { [have_include "power_on/qemu"] || [have_spec linux] || [have_spec muen] } { exit 0 } -if { [get_cmd_switch --autopilot] && ![have_spec x86_64] } { - puts "Run script does not support autopilot mode on this platform" - exit 0 -} +assert_spec x86_64 # # Please configure your reader's vendor and product IDs here @@ -31,8 +28,6 @@ set build_components { test/smartcard } -lappend_if [have_spec gpio] build_components drivers/gpio - source ${genode_dir}/repos/base/run/platform_drv.inc append_platform_drv_build_components @@ -61,13 +56,6 @@ append config { } -append_if [have_spec gpio] config " - - - - - " - append_platform_drv_config append config { @@ -98,6 +86,7 @@ append config { + @@ -128,8 +117,6 @@ set boot_modules { Info.plist } -lappend_if [have_spec gpio] boot_modules [gpio_drv] - append_platform_drv_boot_modules build_boot_image $boot_modules diff --git a/repos/os/run/demo.run b/repos/os/run/demo.run index 4de8a649a..6fe2d6afc 100644 --- a/repos/os/run/demo.run +++ b/repos/os/run/demo.run @@ -1,41 +1,25 @@ -# -# Build -# - -if {[have_spec odroid_xu] || - [have_spec imx6q_sabrelite] || +if {[have_spec imx6q_sabrelite] || + [have_spec imx7d_sabre] || ([get_cmd_switch --autopilot] && [have_spec linux]) || ([get_cmd_switch --autopilot] && [have_include "power_on/qemu"])} { puts "Run script does not support this platform." exit 0 } -set build_components { - core init timer - server/nitpicker app/pointer app/status_bar app/global_keys_handler - app/nit_focus - server/liquid_framebuffer app/launchpad app/scout - test/nitpicker server/nitlog - drivers/framebuffer drivers/input - server/report_rom server/rom_filter -} - -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 - -append_platform_drv_build_components - -build $build_components - create_boot_directory +import_from_depot [depot_user]/src/[base_src] \ + [depot_user]/pkg/[drivers_interactive_pkg] \ + [depot_user]/src/rom_filter \ + [depot_user]/src/report_rom \ + [depot_user]/src/global_keys_handler \ + [depot_user]/src/nitpicker \ + [depot_user]/src/nit_focus \ + [depot_user]/src/demo \ + [depot_user]/src/init -# -# Generate config -# +build { app/status_bar test/nitpicker } -append config { +install_config { @@ -50,64 +34,26 @@ append config { - } + -append_if [have_spec sdl] config { - - - - - - - } - -append_platform_drv_config - -append_if [have_spec framebuffer] config { - - } -append_if [expr [have_spec framebuffer] && [have_spec x86]] config { - - - } -append_if [expr [have_spec framebuffer] && ![have_spec x86]] config { - - - } - -append_if [have_spec gpio] config " - - - - - " - -append_if [have_spec imx53] config { - - - - - } - -append_if [have_spec ps2] config { - - - - } - -append_if [need_usb_hid] config { - - - - - } - -append config { + + + + + + + + + + + + + @@ -244,8 +190,6 @@ append config { } -install_config $config - # # Create launchpad configuration # @@ -269,33 +213,7 @@ puts $launchpad_config_fd { } close $launchpad_config_fd - -# -# Boot modules -# - -# generic modules -set boot_modules { - core ld.lib.so init - timer - nitpicker pointer status_bar report_rom rom_filter global_keys_handler - nit_focus - liquid_fb launchpad scout testnit nitlog - launchpad.config -} - -# platform-specific modules -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 imx53] boot_modules input_drv - -append_platform_drv_boot_modules - -build_boot_image $boot_modules - +build_boot_image { status_bar testnit launchpad.config } if {[get_cmd_switch --autopilot]} { run_genode_until {\[init -> scout\] png is.*\n} 40