mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-21 18:06:50 +00:00
dde_linux: name usb_drv unambigously
* Make package buildable for ARM too * Move usb library to src targets for explicitly named targets * adapt remaining run-scripts to use the correctly named usb drivers Ref #2190
This commit is contained in:
parent
d5104aca05
commit
bf5a631a14
@ -1,6 +1,6 @@
|
|||||||
USB_CONTRIB_DIR := $(call select_from_ports,dde_linux)/src/lib/usb
|
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
|
LIB_INC_DIR := $(LIB_DIR)/include
|
||||||
|
|
||||||
# architecture-dependent includes
|
# architecture-dependent includes
|
||||||
|
@ -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 =
|
CC_CXX_WARN_STRICT =
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
include $(REP_DIR)/lib/mk/spec/arm/usb.inc
|
|
||||||
|
|
||||||
INC_DIR += $(LIB_INC_DIR)/spec/arm_v6
|
|
@ -1,3 +0,0 @@
|
|||||||
include $(REP_DIR)/lib/mk/spec/arm/usb.inc
|
|
||||||
|
|
||||||
INC_DIR += $(LIB_INC_DIR)/spec/arm_v7
|
|
@ -1,7 +1,7 @@
|
|||||||
ifeq ($(called_from_lib_mk),yes)
|
ifeq ($(called_from_lib_mk),yes)
|
||||||
|
|
||||||
USB_CONTRIB_DIR := $(call select_from_ports,dde_linux)/src/lib/usb
|
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
|
# Determine the header files included by the contrib code. For each
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
LIB_MK := $(shell cd $(REP_DIR); find lib -name "usb*") \
|
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) \
|
$(foreach SPEC,x86_32 x86_64 arm,lib/mk/spec/$(SPEC)/lx_kit_setjmp.mk)
|
||||||
lib/mk/xhci.inc
|
|
||||||
|
|
||||||
PORT_DIR := $(call port_dir,$(REP_DIR)/ports/dde_linux)
|
PORT_DIR := $(call port_dir,$(REP_DIR)/ports/dde_linux)
|
||||||
|
|
||||||
MIRROR_FROM_REP_DIR := $(LIB_MK) \
|
MIRROR_FROM_REP_DIR := $(LIB_MK) \
|
||||||
lib/import/import-usb_include.mk src/drivers/usb \
|
src/drivers/usb \
|
||||||
src/include src/lx_kit \
|
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 := $(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))
|
MIRROR_FROM_PORT_DIR := $(filter-out $(MIRROR_FROM_REP_DIR),$(MIRROR_FROM_PORT_DIR))
|
||||||
|
@ -2,6 +2,8 @@ base
|
|||||||
os
|
os
|
||||||
nic_session
|
nic_session
|
||||||
usb_session
|
usb_session
|
||||||
|
gpio_session
|
||||||
|
regulator_session
|
||||||
input_session
|
input_session
|
||||||
block_session
|
block_session
|
||||||
platform_session
|
platform_session
|
||||||
|
@ -49,14 +49,18 @@ if { [get_cmd_switch --autopilot] && [have_include "power_on/qemu"] } {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if { [get_cmd_switch --autopilot] &&
|
if { [get_cmd_switch --autopilot] &&
|
||||||
![have_spec arndale] &&
|
|
||||||
![have_spec panda] &&
|
|
||||||
![have_spec rpi] &&
|
![have_spec rpi] &&
|
||||||
![have_spec x86]} {
|
![have_spec x86]} {
|
||||||
puts "Run script does not support autopilot mode on this platform"
|
puts "Run script does not support autopilot mode on this platform"
|
||||||
exit 0
|
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
|
# Build
|
||||||
#
|
#
|
||||||
@ -114,6 +118,7 @@ append config {
|
|||||||
</start>
|
</start>
|
||||||
|
|
||||||
<start name="usb_drv" caps="150">
|
<start name="usb_drv" caps="150">
|
||||||
|
<binary name="} [usb_drv_binary] {"/>
|
||||||
<resource name="RAM" quantum="12M"/>
|
<resource name="RAM" quantum="12M"/>
|
||||||
<provides><service name="Input"/></provides>
|
<provides><service name="Input"/></provides>
|
||||||
<config uhci="yes" ohci="yes" ehci="yes" xhci="yes"
|
<config uhci="yes" ohci="yes" ehci="yes" xhci="yes"
|
||||||
@ -184,9 +189,10 @@ install_config $config
|
|||||||
|
|
||||||
# generic modules
|
# generic modules
|
||||||
set boot_modules {
|
set boot_modules {
|
||||||
core ld.lib.so init timer usb_drv test-input dynamic_rom
|
core ld.lib.so init timer test-input dynamic_rom
|
||||||
}
|
}
|
||||||
|
|
||||||
|
append boot_modules [usb_drv_binary]
|
||||||
lappend_if [have_spec gpio] boot_modules [gpio_drv]
|
lappend_if [have_spec gpio] boot_modules [gpio_drv]
|
||||||
|
|
||||||
append_platform_drv_boot_modules
|
append_platform_drv_boot_modules
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
#
|
#
|
||||||
# Test connect and disconnect
|
# Test connect and disconnect
|
||||||
|
|
||||||
|
assert_spec x86
|
||||||
|
|
||||||
if { [have_spec linux] || [have_spec muen] } {
|
if { [have_spec linux] || [have_spec muen] } {
|
||||||
puts "Run script does not support Linux and Muen."
|
puts "Run script does not support Linux and Muen."
|
||||||
exit 0
|
exit 0
|
||||||
@ -29,8 +31,6 @@ set build_components {
|
|||||||
server/dynamic_rom
|
server/dynamic_rom
|
||||||
}
|
}
|
||||||
|
|
||||||
lappend_if [have_spec gpio] build_components drivers/gpio
|
|
||||||
|
|
||||||
source ${genode_dir}/repos/base/run/platform_drv.inc
|
source ${genode_dir}/repos/base/run/platform_drv.inc
|
||||||
append_platform_drv_build_components
|
append_platform_drv_build_components
|
||||||
|
|
||||||
@ -59,13 +59,6 @@ append config {
|
|||||||
</default-route>
|
</default-route>
|
||||||
<default caps="100"/>}
|
<default caps="100"/>}
|
||||||
|
|
||||||
append_if [have_spec gpio] config "
|
|
||||||
<start name=\"[gpio_drv]\">
|
|
||||||
<resource name=\"RAM\" quantum=\"4M\"/>
|
|
||||||
<provides><service name=\"Gpio\"/></provides>
|
|
||||||
<config/>
|
|
||||||
</start>"
|
|
||||||
|
|
||||||
append_platform_drv_config
|
append_platform_drv_config
|
||||||
|
|
||||||
append config {
|
append config {
|
||||||
@ -146,8 +139,6 @@ set boot_modules {
|
|||||||
core ld.lib.so init timer usb_drv test-input dynamic_rom
|
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
|
append_platform_drv_boot_modules
|
||||||
|
|
||||||
build_boot_image $boot_modules
|
build_boot_image $boot_modules
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
# \date 2017-10-19
|
# \date 2017-10-19
|
||||||
#
|
#
|
||||||
|
|
||||||
|
assert_spec x86
|
||||||
|
|
||||||
#
|
#
|
||||||
# Build
|
# Build
|
||||||
#
|
#
|
||||||
@ -19,8 +21,6 @@ set build_components {
|
|||||||
source ${genode_dir}/repos/base/run/platform_drv.inc
|
source ${genode_dir}/repos/base/run/platform_drv.inc
|
||||||
append_platform_drv_build_components
|
append_platform_drv_build_components
|
||||||
|
|
||||||
lappend_if [have_spec gpio] build_components drivers/gpio
|
|
||||||
|
|
||||||
build $build_components
|
build $build_components
|
||||||
|
|
||||||
create_boot_directory
|
create_boot_directory
|
||||||
@ -80,13 +80,6 @@ set config {
|
|||||||
|
|
||||||
append_platform_drv_config
|
append_platform_drv_config
|
||||||
|
|
||||||
append_if [have_spec gpio] config "
|
|
||||||
<start name=\"[gpio_drv]\">
|
|
||||||
<resource name=\"RAM\" quantum=\"4M\"/>
|
|
||||||
<provides><service name=\"Gpio\"/></provides>
|
|
||||||
<config/>
|
|
||||||
</start>"
|
|
||||||
|
|
||||||
append config {
|
append config {
|
||||||
</config>
|
</config>
|
||||||
}
|
}
|
||||||
@ -107,7 +100,6 @@ set boot_modules {
|
|||||||
}
|
}
|
||||||
|
|
||||||
append_platform_drv_boot_modules
|
append_platform_drv_boot_modules
|
||||||
lappend_if [have_spec gpio] boot_modules [gpio_drv]
|
|
||||||
|
|
||||||
build_boot_image $boot_modules
|
build_boot_image $boot_modules
|
||||||
|
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
# \date 2011-06-24
|
# \date 2011-06-24
|
||||||
#
|
#
|
||||||
|
|
||||||
|
assert_spec x86
|
||||||
|
|
||||||
#
|
#
|
||||||
# Build
|
# Build
|
||||||
#
|
#
|
||||||
@ -14,8 +16,6 @@ set build_components {
|
|||||||
test/block/client
|
test/block/client
|
||||||
}
|
}
|
||||||
|
|
||||||
lappend_if [have_spec gpio] build_components drivers/gpio
|
|
||||||
|
|
||||||
source ${genode_dir}/repos/base/run/platform_drv.inc
|
source ${genode_dir}/repos/base/run/platform_drv.inc
|
||||||
append_platform_drv_build_components
|
append_platform_drv_build_components
|
||||||
|
|
||||||
@ -46,13 +46,6 @@ set config {
|
|||||||
|
|
||||||
append_platform_drv_config
|
append_platform_drv_config
|
||||||
|
|
||||||
append_if [have_spec gpio] config "
|
|
||||||
<start name=\"[gpio_drv]\">
|
|
||||||
<resource name=\"RAM\" quantum=\"4M\"/>
|
|
||||||
<provides><service name=\"Gpio\"/></provides>
|
|
||||||
<config/>
|
|
||||||
</start>"
|
|
||||||
|
|
||||||
append config {
|
append config {
|
||||||
<start name="timer">
|
<start name="timer">
|
||||||
<resource name="RAM" quantum="1M"/>
|
<resource name="RAM" quantum="1M"/>
|
||||||
@ -81,8 +74,6 @@ set boot_modules {
|
|||||||
core ld.lib.so init timer usb_drv test-block-client
|
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
|
append_platform_drv_boot_modules
|
||||||
|
|
||||||
build_boot_image $boot_modules
|
build_boot_image $boot_modules
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
assert_spec x86
|
||||||
set usb_raw_device ""
|
set usb_raw_device ""
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -21,8 +22,6 @@ set build_components {
|
|||||||
test/terminal_echo
|
test/terminal_echo
|
||||||
}
|
}
|
||||||
|
|
||||||
lappend_if [have_spec gpio] build_components drivers/gpio
|
|
||||||
|
|
||||||
source ${genode_dir}/repos/base/run/platform_drv.inc
|
source ${genode_dir}/repos/base/run/platform_drv.inc
|
||||||
append_platform_drv_build_components
|
append_platform_drv_build_components
|
||||||
|
|
||||||
@ -51,13 +50,6 @@ append config {
|
|||||||
</default-route>
|
</default-route>
|
||||||
<default caps="100"/>}
|
<default caps="100"/>}
|
||||||
|
|
||||||
append_if [have_spec gpio] config "
|
|
||||||
<start name=\"[gpio_drv]\">
|
|
||||||
<resource name=\"RAM\" quantum=\"4M\"/>
|
|
||||||
<provides><service name=\"Gpio\"/></provides>
|
|
||||||
<config/>
|
|
||||||
</start>"
|
|
||||||
|
|
||||||
append_platform_drv_config
|
append_platform_drv_config
|
||||||
|
|
||||||
append config {
|
append config {
|
||||||
|
@ -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
|
||||||
INC_DIR += $(REP_DIR)/src/include/spec/arm
|
INC_DIR += $(REP_DIR)/src/include/spec/arm
|
||||||
INC_DIR += $(REP_DIR)/src/include/spec/arm_v7
|
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
|
# contrib code
|
||||||
LX_CONTRIB_DIR := $(call select_from_ports,dde_linux)/src/drivers/nic/fec
|
LX_CONTRIB_DIR := $(call select_from_ports,dde_linux)/src/drivers/nic/fec
|
||||||
|
@ -13,8 +13,126 @@
|
|||||||
|
|
||||||
#include <base/component.h>
|
#include <base/component.h>
|
||||||
#include <base/attached_rom_dataspace.h>
|
#include <base/attached_rom_dataspace.h>
|
||||||
|
#include <base/sleep.h>
|
||||||
|
#include <nic_session/nic_session.h>
|
||||||
|
|
||||||
extern void start_usb_driver(Genode::Env &env);
|
/* Local */
|
||||||
|
#include <signal.h>
|
||||||
|
#include <lx_emul.h>
|
||||||
|
|
||||||
|
#include <lx_kit/env.h>
|
||||||
|
#include <lx_kit/pci.h>
|
||||||
|
#include <lx_kit/irq.h>
|
||||||
|
#include <lx_kit/malloc.h>
|
||||||
|
#include <lx_kit/scheduler.h>
|
||||||
|
#include <lx_kit/timer.h>
|
||||||
|
#include <lx_kit/work.h>
|
||||||
|
|
||||||
|
|
||||||
|
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 {
|
namespace Usb_driver {
|
||||||
|
@ -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
|
SRC_CC += platform_device.cc platform_generic.cc
|
||||||
|
|
3
repos/dde_linux/src/drivers/usb/spec/arm_v6/target.inc
Normal file
3
repos/dde_linux/src/drivers/usb/spec/arm_v6/target.inc
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
include $(REP_DIR)/src/drivers/usb/spec/arm/target.inc
|
||||||
|
|
||||||
|
INC_DIR += $(LIB_INC_DIR)/spec/arm_v6
|
3
repos/dde_linux/src/drivers/usb/spec/arm_v7/target.inc
Normal file
3
repos/dde_linux/src/drivers/usb/spec/arm_v7/target.inc
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
include $(REP_DIR)/src/drivers/usb/spec/arm/target.inc
|
||||||
|
|
||||||
|
INC_DIR += $(LIB_INC_DIR)/spec/arm_v7
|
@ -15,7 +15,6 @@
|
|||||||
#include <drivers/defs/arndale.h>
|
#include <drivers/defs/arndale.h>
|
||||||
#include <base/attached_io_mem_dataspace.h>
|
#include <base/attached_io_mem_dataspace.h>
|
||||||
#include <io_mem_session/connection.h>
|
#include <io_mem_session/connection.h>
|
||||||
#include <regulator/consts.h>
|
|
||||||
#include <regulator_session/connection.h>
|
#include <regulator_session/connection.h>
|
||||||
#include <timer_session/connection.h>
|
#include <timer_session/connection.h>
|
||||||
#include <util/mmio.h>
|
#include <util/mmio.h>
|
@ -0,0 +1 @@
|
|||||||
|
#include <spec/exynos5/regulator/consts.h>
|
@ -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 \
|
SRC_C += $(addprefix net/usb/, usbnet.c asix_devices.c asix_common.c ax88172a.c \
|
||||||
ax88179_178a.c)
|
ax88179_178a.c)
|
||||||
SRC_C += usb/host/ehci-exynos.c
|
SRC_C += usb/host/ehci-exynos.c
|
||||||
|
|
||||||
include $(REP_DIR)/lib/mk/xhci.inc
|
include $(REP_DIR)/src/drivers/usb/xhci.inc
|
||||||
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 -DCONFIG_USB_DWC3_HOST=1 \
|
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
|
-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
|
SRC_C += usb/host/xhci-plat.c
|
||||||
|
|
||||||
vpath platform.cc $(LIB_DIR)/spec/arndale
|
vpath platform.cc $(LIB_DIR)/spec/arndale
|
||||||
|
|
||||||
CC_CXX_WARN_STRICT =
|
|
@ -18,7 +18,6 @@
|
|||||||
#include <drivers/defs/odroid_x2.h>
|
#include <drivers/defs/odroid_x2.h>
|
||||||
#include <base/attached_io_mem_dataspace.h>
|
#include <base/attached_io_mem_dataspace.h>
|
||||||
#include <io_mem_session/connection.h>
|
#include <io_mem_session/connection.h>
|
||||||
#include <regulator/consts.h>
|
|
||||||
#include <regulator_session/connection.h>
|
#include <regulator_session/connection.h>
|
||||||
#include <timer_session/connection.h>
|
#include <timer_session/connection.h>
|
||||||
#include <util/mmio.h>
|
#include <util/mmio.h>
|
@ -0,0 +1 @@
|
|||||||
|
#include <spec/exynos4/regulator/consts.h>
|
@ -1,7 +1,10 @@
|
|||||||
|
TARGET = odroid_x2_usb_drv
|
||||||
|
REQUIRES = arm_v7
|
||||||
|
|
||||||
SRC_C += $(addprefix net/usb/, usbnet.c smsc95xx.c)
|
SRC_C += $(addprefix net/usb/, usbnet.c smsc95xx.c)
|
||||||
SRC_C += usb/host/ehci-exynos.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 \
|
CC_OPT += -DCONFIG_USB_EHCI_TT_NEWSCHED \
|
||||||
@ -12,5 +15,3 @@ SRC_CC += platform.cc
|
|||||||
INC_DIR += $(LIB_INC_DIR)/spec/odroid_x2
|
INC_DIR += $(LIB_INC_DIR)/spec/odroid_x2
|
||||||
|
|
||||||
vpath platform.cc $(LIB_DIR)/spec/odroid_x2
|
vpath platform.cc $(LIB_DIR)/spec/odroid_x2
|
||||||
|
|
||||||
CC_CXX_WARN_STRICT =
|
|
@ -1,7 +1,10 @@
|
|||||||
|
TARGET = panda_usb_drv
|
||||||
|
REQUIRES = arm_v7
|
||||||
|
|
||||||
SRC_C += $(addprefix net/usb/, usbnet.c smsc95xx.c)
|
SRC_C += $(addprefix net/usb/, usbnet.c smsc95xx.c)
|
||||||
SRC_C += usb/host/ehci-omap.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
|
CC_OPT += -DCONFIG_USB_EHCI_HCD_OMAP -DCONFIG_USB_EHCI_TT_NEWSCHED -DVERBOSE_DEBUG
|
||||||
SRC_CC += platform.cc
|
SRC_CC += platform.cc
|
@ -0,0 +1 @@
|
|||||||
|
#include <spec/rpi/platform_session/client.h>
|
@ -0,0 +1 @@
|
|||||||
|
#include <spec/rpi/platform_session/platform_session.h>
|
@ -1,3 +1,6 @@
|
|||||||
|
TARGET = rpi_usb_drv
|
||||||
|
REQUIRES = arm_v6
|
||||||
|
|
||||||
SRC_C += \
|
SRC_C += \
|
||||||
usb/host/dwc_otg/dwc_otg/dwc_otg_adp.c \
|
usb/host/dwc_otg/dwc_otg/dwc_otg_adp.c \
|
||||||
usb/host/dwc_otg/dwc_otg/dwc_otg_attr.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_ddma.c \
|
||||||
usb/host/dwc_otg/dwc_otg/dwc_otg_hcd_intr.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_linux.c \
|
||||||
usb/host/dwc_otg/dwc_otg/dwc_otg_hcd_queue.c
|
usb/host/dwc_otg/dwc_otg/dwc_otg_hcd_queue.c \
|
||||||
|
|
||||||
SRC_C += \
|
|
||||||
usb/host/dwc_otg/dwc_common_port/dwc_cc.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_common_linux.c \
|
||||||
usb/host/dwc_otg/dwc_common_port/dwc_crypto.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
|
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
|
CC_OPT += -DDWC_LINUX -DPLATFORM_INTERFACE
|
||||||
|
|
||||||
@ -47,5 +48,3 @@ vpath %.c $(LX_CONTRIB_DIR)/drivers/net/usb
|
|||||||
CC_CXX_OPT += -std=gnu++11
|
CC_CXX_OPT += -std=gnu++11
|
||||||
|
|
||||||
LIBS += rpi_usb
|
LIBS += rpi_usb
|
||||||
|
|
||||||
CC_CXX_WARN_STRICT =
|
|
@ -16,8 +16,8 @@ SRC_CC += pci_driver.cc platform.cc
|
|||||||
SRC_CC += pci.cc mapped_io_mem_range.cc
|
SRC_CC += pci.cc mapped_io_mem_range.cc
|
||||||
|
|
||||||
|
|
||||||
include $(REP_DIR)/lib/mk/xhci.inc
|
include $(REP_DIR)/src/drivers/usb/xhci.inc
|
||||||
include $(REP_DIR)/lib/mk/usb.inc
|
include $(REP_DIR)/src/drivers/usb/target.inc
|
||||||
|
|
||||||
CC_OPT += -DCONFIG_PCI -DCONFIG_USB_EHCI_PCI=1 -DCONFIG_USB_XHCI_HCD=1
|
CC_OPT += -DCONFIG_PCI -DCONFIG_USB_EHCI_PCI=1 -DCONFIG_USB_XHCI_HCD=1
|
||||||
|
|
@ -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 += $(LIB_INC_DIR)/spec/x86_32 $(LIB_INC_DIR)/spec/x86
|
||||||
INC_DIR += $(REP_DIR)/src/include/spec/x86_32
|
INC_DIR += $(REP_DIR)/src/include/spec/x86_32
|
||||||
|
|
||||||
include $(REP_DIR)/lib/mk/spec/x86/usb.inc
|
include $(REP_DIR)/src/drivers/usb/spec/x86/target.inc
|
||||||
|
|
||||||
|
|
||||||
CC_CXX_WARN_STRICT =
|
|
@ -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 += $(LIB_INC_DIR)/spec/x86_64 $(LIB_INC_DIR)/spec/x86
|
||||||
INC_DIR += $(REP_DIR)/src/include/spec/x86_64
|
INC_DIR += $(REP_DIR)/src/include/spec/x86_64
|
||||||
|
|
||||||
include $(REP_DIR)/lib/mk/spec/x86/usb.inc
|
include $(REP_DIR)/src/drivers/usb/spec/x86/target.inc
|
||||||
|
|
||||||
CC_CXX_WARN_STRICT =
|
|
@ -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
|
LIB_INC_DIR = $(LIB_DIR)/include
|
||||||
|
|
||||||
LIBS += usb_include lx_kit_setjmp
|
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
|
input_component.cc evdev.cc nic.cc raw.cc
|
||||||
SRC_C += dummies.c scsi.c raw_driver.c
|
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
|
# The order of include-search directories is important, we need to look into
|
||||||
# 'contrib' before falling back to our custom 'lx_emul.h' header.
|
# '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 += $(LIB_INC_DIR) $(REP_DIR)/src/include
|
||||||
INC_DIR += $(LX_CONTRIB_DIR)/include $(LX_CONTRIB_DIR)/include/uapi $(LX_CONTRIB_DIR)
|
INC_DIR += $(LX_CONTRIB_DIR)/include $(LX_CONTRIB_DIR)/include/uapi $(LX_CONTRIB_DIR)
|
||||||
|
|
@ -1,5 +0,0 @@
|
|||||||
TARGET = usb_drv
|
|
||||||
SRC_CC = main.cc
|
|
||||||
LIBS = base usb
|
|
||||||
|
|
||||||
CC_CXX_WARN_STRICT =
|
|
@ -1,138 +0,0 @@
|
|||||||
/*
|
|
||||||
* \brief USB driver main program
|
|
||||||
* \author Norman Feske
|
|
||||||
* \author Sebastian Sumpf <sebastian.sumpf@genode-labs.com>
|
|
||||||
* \author Christian Menard <christian.menard@ksyslabs.org>
|
|
||||||
* \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 <base/sleep.h>
|
|
||||||
#include <nic_session/nic_session.h>
|
|
||||||
|
|
||||||
/* Local */
|
|
||||||
#include <signal.h>
|
|
||||||
#include <lx_emul.h>
|
|
||||||
|
|
||||||
#include <lx_kit/env.h>
|
|
||||||
#include <lx_kit/pci.h>
|
|
||||||
#include <lx_kit/irq.h>
|
|
||||||
#include <lx_kit/malloc.h>
|
|
||||||
#include <lx_kit/scheduler.h>
|
|
||||||
#include <lx_kit/timer.h>
|
|
||||||
#include <lx_kit/work.h>
|
|
||||||
|
|
||||||
|
|
||||||
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();
|
|
||||||
}
|
|
@ -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
|
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
|
||||||
|
|
||||||
#
|
install_config {
|
||||||
# Generate config
|
|
||||||
#
|
|
||||||
|
|
||||||
append config {
|
|
||||||
<config prio_levels="2">
|
<config prio_levels="2">
|
||||||
<parent-provides>
|
<parent-provides>
|
||||||
<service name="ROM"/>
|
<service name="ROM"/>
|
||||||
@ -48,59 +25,26 @@ append config {
|
|||||||
<default-route>
|
<default-route>
|
||||||
<any-service> <parent/> <any-child/> </any-service>
|
<any-service> <parent/> <any-child/> </any-service>
|
||||||
</default-route>
|
</default-route>
|
||||||
<default caps="100"/>}
|
<default caps="100"/>
|
||||||
|
|
||||||
append_if [have_spec sdl] config {
|
|
||||||
<start name="fb_sdl" ld="no">
|
|
||||||
<resource name="RAM" quantum="4M"/>
|
|
||||||
<provides>
|
|
||||||
<service name="Input"/>
|
|
||||||
<service name="Framebuffer"/>
|
|
||||||
</provides>
|
|
||||||
</start>}
|
|
||||||
|
|
||||||
append_platform_drv_config
|
|
||||||
|
|
||||||
append_if [have_spec framebuffer] config {
|
|
||||||
<start name="fb_drv" caps="200">
|
|
||||||
<resource name="RAM" quantum="10M"/>
|
|
||||||
<provides><service name="Framebuffer"/></provides>
|
|
||||||
<config buffered="yes"/>
|
|
||||||
</start>}
|
|
||||||
|
|
||||||
append_if [have_spec gpio] config "
|
|
||||||
<start name=\"[gpio_drv]\">
|
|
||||||
<resource name=\"RAM\" quantum=\"4M\"/>
|
|
||||||
<provides><service name=\"Gpio\"/></provides>
|
|
||||||
<config/>
|
|
||||||
</start>"
|
|
||||||
|
|
||||||
append_if [have_spec imx53] config {
|
|
||||||
<start name="input_drv">
|
|
||||||
<resource name="RAM" quantum="1M"/>
|
|
||||||
<provides><service name="Input"/></provides>
|
|
||||||
<config/>
|
|
||||||
</start> }
|
|
||||||
|
|
||||||
append_if [have_spec ps2] config {
|
|
||||||
<start name="ps2_drv">
|
|
||||||
<resource name="RAM" quantum="1M"/>
|
|
||||||
<provides><service name="Input"/></provides>
|
|
||||||
</start>}
|
|
||||||
|
|
||||||
append_if [need_usb_hid] config {
|
|
||||||
<start name="usb_drv" caps="120">
|
|
||||||
<resource name="RAM" quantum="12M"/>
|
|
||||||
<provides><service name="Input"/></provides>
|
|
||||||
<config ehci="yes" uhci="yes" xhci="no"> <hid/> </config>
|
|
||||||
</start> }
|
|
||||||
|
|
||||||
append config {
|
|
||||||
<start name="timer">
|
<start name="timer">
|
||||||
<resource name="RAM" quantum="1M"/>
|
<resource name="RAM" quantum="1M"/>
|
||||||
<provides><service name="Timer"/></provides>
|
<provides><service name="Timer"/></provides>
|
||||||
</start>
|
</start>
|
||||||
|
|
||||||
|
<start name="drivers" caps="1000">
|
||||||
|
<resource name="RAM" quantum="32M" constrain_phys="yes"/>
|
||||||
|
<binary name="init"/>
|
||||||
|
<route>
|
||||||
|
<service name="ROM" label="config"> <parent label="drivers.config"/> </service>
|
||||||
|
<service name="Timer"> <child name="timer"/> </service>
|
||||||
|
<any-service> <parent/> </any-service>
|
||||||
|
</route>
|
||||||
|
<provides>
|
||||||
|
<service name="Input"/> <service name="Framebuffer"/>
|
||||||
|
</provides>
|
||||||
|
</start>
|
||||||
|
|
||||||
<start name="nitpicker">
|
<start name="nitpicker">
|
||||||
<resource name="RAM" quantum="1M"/>
|
<resource name="RAM" quantum="1M"/>
|
||||||
<provides><service name="Nitpicker"/></provides>
|
<provides><service name="Nitpicker"/></provides>
|
||||||
@ -200,37 +144,6 @@ append config {
|
|||||||
</start>
|
</start>
|
||||||
</config>}
|
</config>}
|
||||||
|
|
||||||
install_config $config
|
build_boot_image {}
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
append qemu_args " -smp 4,cores=4 "
|
append qemu_args " -smp 4,cores=4 "
|
||||||
|
|
||||||
run_genode_until forever
|
run_genode_until forever
|
||||||
|
@ -89,6 +89,12 @@ proc use_usb_drv { feature_arg } {
|
|||||||
return [expr {[use_usb_input feature] || [use_usb_nic feature]}]
|
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
|
# 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] } {
|
if { [use_usb_drv feature] } {
|
||||||
append start_nodes {
|
append start_nodes {
|
||||||
<start name="usb_drv" caps="120">
|
<start name="usb_drv" caps="120">
|
||||||
|
<binary name="} [usb_drv_binary] {"/>
|
||||||
<resource name="RAM" quantum="12M"/>
|
<resource name="RAM" quantum="12M"/>
|
||||||
<provides>}
|
<provides>}
|
||||||
append_if [use_usb_input feature] 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_input_filter feature] boot_modules special.chargen
|
||||||
lappend_if [use_nic_drv feature] boot_modules [nic_drv_binary]
|
lappend_if [use_nic_drv feature] boot_modules [nic_drv_binary]
|
||||||
lappend_if [use_ps2_drv feature] boot_modules ps2_drv
|
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
|
return $boot_modules
|
||||||
}
|
}
|
||||||
|
@ -10,10 +10,7 @@ if { [have_include "power_on/qemu"] || [have_spec linux] || [have_spec muen] } {
|
|||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
if { [get_cmd_switch --autopilot] && ![have_spec x86_64] } {
|
assert_spec x86_64
|
||||||
puts "Run script does not support autopilot mode on this platform"
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Please configure your reader's vendor and product IDs here
|
# Please configure your reader's vendor and product IDs here
|
||||||
@ -31,8 +28,6 @@ set build_components {
|
|||||||
test/smartcard
|
test/smartcard
|
||||||
}
|
}
|
||||||
|
|
||||||
lappend_if [have_spec gpio] build_components drivers/gpio
|
|
||||||
|
|
||||||
source ${genode_dir}/repos/base/run/platform_drv.inc
|
source ${genode_dir}/repos/base/run/platform_drv.inc
|
||||||
append_platform_drv_build_components
|
append_platform_drv_build_components
|
||||||
|
|
||||||
@ -61,13 +56,6 @@ append config {
|
|||||||
</default-route>
|
</default-route>
|
||||||
<default caps="100"/>}
|
<default caps="100"/>}
|
||||||
|
|
||||||
append_if [have_spec gpio] config "
|
|
||||||
<start name=\"[gpio_drv]\">
|
|
||||||
<resource name=\"RAM\" quantum=\"4M\"/>
|
|
||||||
<provides><service name=\"Gpio\"/></provides>
|
|
||||||
<config/>
|
|
||||||
</start>"
|
|
||||||
|
|
||||||
append_platform_drv_config
|
append_platform_drv_config
|
||||||
|
|
||||||
append config {
|
append config {
|
||||||
@ -98,6 +86,7 @@ append config {
|
|||||||
<any-service> <parent/> <any-child/> </any-service>
|
<any-service> <parent/> <any-child/> </any-service>
|
||||||
</route>
|
</route>
|
||||||
</start>
|
</start>
|
||||||
|
|
||||||
<start name="test-smartcard" caps="150">
|
<start name="test-smartcard" caps="150">
|
||||||
<resource name="RAM" quantum="4M"/>
|
<resource name="RAM" quantum="4M"/>
|
||||||
<config>
|
<config>
|
||||||
@ -128,8 +117,6 @@ set boot_modules {
|
|||||||
Info.plist
|
Info.plist
|
||||||
}
|
}
|
||||||
|
|
||||||
lappend_if [have_spec gpio] boot_modules [gpio_drv]
|
|
||||||
|
|
||||||
append_platform_drv_boot_modules
|
append_platform_drv_boot_modules
|
||||||
|
|
||||||
build_boot_image $boot_modules
|
build_boot_image $boot_modules
|
||||||
|
@ -1,41 +1,25 @@
|
|||||||
#
|
if {[have_spec imx6q_sabrelite] ||
|
||||||
# Build
|
[have_spec imx7d_sabre] ||
|
||||||
#
|
|
||||||
|
|
||||||
if {[have_spec odroid_xu] ||
|
|
||||||
[have_spec imx6q_sabrelite] ||
|
|
||||||
([get_cmd_switch --autopilot] && [have_spec linux]) ||
|
([get_cmd_switch --autopilot] && [have_spec linux]) ||
|
||||||
([get_cmd_switch --autopilot] && [have_include "power_on/qemu"])} {
|
([get_cmd_switch --autopilot] && [have_include "power_on/qemu"])} {
|
||||||
puts "Run script does not support this platform."
|
puts "Run script does not support this platform."
|
||||||
exit 0
|
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
|
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
|
||||||
|
|
||||||
#
|
build { app/status_bar test/nitpicker }
|
||||||
# Generate config
|
|
||||||
#
|
|
||||||
|
|
||||||
append config {
|
install_config {
|
||||||
<config>
|
<config>
|
||||||
<parent-provides>
|
<parent-provides>
|
||||||
<service name="ROM"/>
|
<service name="ROM"/>
|
||||||
@ -50,64 +34,26 @@ append config {
|
|||||||
<default-route>
|
<default-route>
|
||||||
<any-service> <parent/> <any-child/> </any-service>
|
<any-service> <parent/> <any-child/> </any-service>
|
||||||
</default-route>
|
</default-route>
|
||||||
<default caps="100"/>}
|
<default caps="100"/>
|
||||||
|
|
||||||
append_if [have_spec sdl] config {
|
|
||||||
<start name="fb_sdl" ld="no">
|
|
||||||
<resource name="RAM" quantum="4M"/>
|
|
||||||
<provides>
|
|
||||||
<service name="Input"/>
|
|
||||||
<service name="Framebuffer"/>
|
|
||||||
</provides>
|
|
||||||
</start>}
|
|
||||||
|
|
||||||
append_platform_drv_config
|
|
||||||
|
|
||||||
append_if [have_spec framebuffer] config {
|
|
||||||
<start name="fb_drv" caps="130">
|
|
||||||
<provides><service name="Framebuffer"/></provides>}
|
|
||||||
append_if [expr [have_spec framebuffer] && [have_spec x86]] config {
|
|
||||||
<resource name="RAM" quantum="4M"/>
|
|
||||||
<config width="1024" height="768"/>
|
|
||||||
</start>}
|
|
||||||
append_if [expr [have_spec framebuffer] && ![have_spec x86]] config {
|
|
||||||
<resource name="RAM" quantum="5M"/>
|
|
||||||
<config/>
|
|
||||||
</start>}
|
|
||||||
|
|
||||||
append_if [have_spec gpio] config "
|
|
||||||
<start name=\"[gpio_drv]\" caps=\"140\">
|
|
||||||
<resource name=\"RAM\" quantum=\"4M\"/>
|
|
||||||
<provides><service name=\"Gpio\"/></provides>
|
|
||||||
<config/>
|
|
||||||
</start>"
|
|
||||||
|
|
||||||
append_if [have_spec imx53] config {
|
|
||||||
<start name="input_drv">
|
|
||||||
<resource name="RAM" quantum="1M"/>
|
|
||||||
<provides><service name="Input"/></provides>
|
|
||||||
<config/>
|
|
||||||
</start> }
|
|
||||||
|
|
||||||
append_if [have_spec ps2] config {
|
|
||||||
<start name="ps2_drv">
|
|
||||||
<resource name="RAM" quantum="1096K"/>
|
|
||||||
<provides><service name="Input"/></provides>
|
|
||||||
</start>}
|
|
||||||
|
|
||||||
append_if [need_usb_hid] config {
|
|
||||||
<start name="usb_drv" caps="120">
|
|
||||||
<resource name="RAM" quantum="12M"/>
|
|
||||||
<provides><service name="Input"/></provides>
|
|
||||||
<config ehci="yes" uhci="yes" xhci="no"> <hid/> </config>
|
|
||||||
</start> }
|
|
||||||
|
|
||||||
append config {
|
|
||||||
<start name="timer">
|
<start name="timer">
|
||||||
<resource name="RAM" quantum="1M"/>
|
<resource name="RAM" quantum="1M"/>
|
||||||
<provides><service name="Timer"/></provides>
|
<provides><service name="Timer"/></provides>
|
||||||
</start>
|
</start>
|
||||||
|
|
||||||
|
<start name="drivers" caps="1000">
|
||||||
|
<resource name="RAM" quantum="32M" constrain_phys="yes"/>
|
||||||
|
<binary name="init"/>
|
||||||
|
<route>
|
||||||
|
<service name="ROM" label="config"> <parent label="drivers.config"/> </service>
|
||||||
|
<service name="Timer"> <child name="timer"/> </service>
|
||||||
|
<any-service> <parent/> </any-service>
|
||||||
|
</route>
|
||||||
|
<provides>
|
||||||
|
<service name="Input"/> <service name="Framebuffer"/>
|
||||||
|
</provides>
|
||||||
|
</start>
|
||||||
|
|
||||||
<start name="report_rom">
|
<start name="report_rom">
|
||||||
<resource name="RAM" quantum="1M"/>
|
<resource name="RAM" quantum="1M"/>
|
||||||
<provides> <service name="Report"/> <service name="ROM"/> </provides>
|
<provides> <service name="Report"/> <service name="ROM"/> </provides>
|
||||||
@ -244,8 +190,6 @@ append config {
|
|||||||
</start>
|
</start>
|
||||||
</config>}
|
</config>}
|
||||||
|
|
||||||
install_config $config
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Create launchpad configuration
|
# Create launchpad configuration
|
||||||
#
|
#
|
||||||
@ -269,33 +213,7 @@ puts $launchpad_config_fd {<config>
|
|||||||
</config>}
|
</config>}
|
||||||
close $launchpad_config_fd
|
close $launchpad_config_fd
|
||||||
|
|
||||||
|
build_boot_image { status_bar testnit launchpad.config }
|
||||||
#
|
|
||||||
# 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
|
|
||||||
|
|
||||||
|
|
||||||
if {[get_cmd_switch --autopilot]} {
|
if {[get_cmd_switch --autopilot]} {
|
||||||
run_genode_until {\[init -> scout\] png is.*\n} 40
|
run_genode_until {\[init -> scout\] png is.*\n} 40
|
||||||
|
Loading…
x
Reference in New Issue
Block a user