Skip to content

Commit f1d96ce

Browse files
committed
run/mbim-fetchurl: fix run script driver config
Remove the dependency to repos/base/run/platform_drv.inc Issue genodelabs#342
1 parent 32b4c60 commit f1d96ce

File tree

1 file changed

+8
-122
lines changed

1 file changed

+8
-122
lines changed

run/mbim-fetchurl.run

+8-122
Original file line numberDiff line numberDiff line change
@@ -25,70 +25,6 @@ if {[get_cmd_switch --autopilot] && [have_board linux]} {
2525
#
2626
proc ip_stack { } { return lxip }
2727

28-
proc platform_drv_config_non_x86 {} {
29-
if {[have_board imx8q_evk]} {
30-
return {
31-
<device name="usb_host_2">
32-
<io_mem address="0x38200000" size="0x10000"/>
33-
<irq number="73"/>
34-
<power-domain name="usb_otg_2"/>
35-
<clock name="usb_phy_ref_clk_root"
36-
driver_name="usb_phy_root_clk"
37-
parent="system_pll1_div8"
38-
rate="100000000"/>
39-
<clock name="usb_core_ref_clk_root"
40-
parent="system_pll1_div8"
41-
rate="100000000"/>
42-
<clock name="usb_bus_clk_root"
43-
parent="system_pll2_div2"
44-
rate="500000000"/>
45-
<clock name="usb_ctrl2_gate"/>
46-
<clock name="usb_phy2_gate"/>
47-
<property name="compatible" value="snps,dwc3"/>
48-
<property name="dr_mode" value="host"/>
49-
</device>
50-
<policy label="usb_drv -> "> <device name="usb_host_2"/> </policy>
51-
}
52-
}
53-
if {[have_board imx6q_sabrelite]} {
54-
return {
55-
<device name="mxs_phy">
56-
<io_mem address="0x020ca000" size="0xfff"/>
57-
<irq number="77"/>
58-
<property name="compatible" value="fsl,imx6q-usbphy"/>
59-
<property name="fsl,anatop" value="0xdeaddead"/>
60-
</device>
61-
<device name="usbmisc_imx">
62-
<io_mem address="0x02184800" size="0x1ff"/>
63-
<property name="compatible" value="fsl,imx6q-usbmisc"/>
64-
</device>
65-
<device name="imx_usb">
66-
<io_mem address="0x02184200" size="0x1ff"/>
67-
<irq number="72"/>
68-
<property name="compatible" value="fsl,imx6q-usb"/>
69-
<property name="fsl,usbmisc" value="usbmisc_imx"/>
70-
<property name="dr_mode" value="host"/>
71-
</device>
72-
<policy label="usb_drv -> ">
73-
<device name="mxs_phy"/>
74-
<device name="usbmisc_imx"/>
75-
<device name="imx_usb"/>
76-
</policy>
77-
}
78-
}
79-
if {[have_board rpi]} {
80-
return {
81-
<device name="dwc_otg">
82-
<io_mem address="0x20980000" size="0x10000"/>
83-
<irq number="9"/>
84-
<power-domain name="usb"/>
85-
<property name="compatible" value="brcm,bcm2835-usb"/>
86-
</device>
87-
<policy label="usb_drv -> "> <device name="dwc_otg"/> </policy>
88-
}
89-
}
90-
return ""
91-
}
9228

9329
proc platform_drv_binary_non_x86 {} {
9430
if {[have_board imx8q_evk]} { return imx8mq_platform_drv }
@@ -113,17 +49,9 @@ proc socket_fs_plugin { } {
11349
}
11450

11551
set build_components {
116-
lib/vfs_pipe
11752
app/mbimcli
11853
drivers/usb_host
11954
drivers/usb_modem
120-
server/nic_router
121-
}
122-
123-
source ${genode_dir}/repos/base/run/platform_drv.inc
124-
append_platform_drv_build_components
125-
if { [have_spec x86] } { append_platform_drv_build_components
126-
} else { append build_components { drivers/platform }
12755
}
12856

12957
build $build_components
@@ -137,9 +65,11 @@ import_from_depot [depot_user]/src/[base_src] \
13765
[depot_user]/src/init \
13866
[depot_user]/src/libc \
13967
[depot_user]/src/libssh \
68+
[depot_user]/src/nic_router \
14069
[depot_user]/src/openssl \
14170
[depot_user]/src/report_rom \
14271
[depot_user]/src/vfs \
72+
[depot_user]/src/vfs_pipe \
14373
[depot_user]/src/vfs_[ip_stack] \
14474
[depot_user]/src/zlib
14575

@@ -164,39 +94,13 @@ append config {
16494
<resource name="RAM" quantum="1M"/>
16595
<provides> <service name="Timer"/> </provides>
16696
</start>
167-
}
16897

169-
if { [have_spec x86] } { append_platform_drv_config
170-
} else {
171-
append config "<start name=\"[platform_drv_binary_non_x86]\">"
172-
append config {
173-
<resource name="RAM" quantum="1M"/>
174-
<provides><service name="Platform"/></provides>
175-
<config>
176-
}
177-
178-
append config "[platform_drv_config_non_x86]"
179-
append config {
180-
</config>
181-
<route> <any-service> <parent/> </any-service> </route>
182-
</start>
183-
}
184-
}
185-
186-
append config "<start name=\"usb_drv\" caps=\"120\">"
187-
append config "<binary name=\"[usb_host_drv_binary]\"/>"
188-
append config {
189-
<resource name="RAM" quantum="12M"/>
190-
<provides> <service name="Usb"/> </provides>
191-
<config bios_handoff="yes">}
192-
append_if [have_spec x86] config {
193-
<policy label_prefix="usb_modem_drv" vendor_id="0x12d1" product_id="0x15c1"/> }
194-
append_if [have_spec arm_v8] config {
195-
<policy label_prefix="usb_modem_drv" vendor_id="0x12d1" product_id="0x15c1"/> }
196-
append config {
197-
</config>
98+
<start name="drivers" caps="1200" managing_system="yes">
99+
<resource name="RAM" quantum="32M"/>
100+
<binary name="init"/>
198101
<route>
199-
<service name="Report"> <child name="report_rom"/> </service>
102+
<service name="ROM" label="config"> <parent label="drivers.config"/> </service>
103+
<service name="Uplink"> <child name="nic_router"/> </service>
200104
<any-service> <parent/> <any-child/> </any-service>
201105
</route>
202106
</start>
@@ -276,25 +180,7 @@ append config {
276180

277181
install_config $config
278182

279-
set boot_modules {
280-
libc.lib.so vfs.lib.so
281-
glib.lib.so libiconv.lib.so zlib.lib.so ffi.lib.so
282-
libmbim.lib.so
283-
mbimcli
284-
285-
usb_modem_drv
286-
nic_router
287-
288-
vfs_pipe.lib.so
289-
}
290-
291-
append boot_modules [usb_host_drv_binary]
292-
lappend_if [have_board linux] boot_modules lx_file_terminal
293-
294-
if {[have_spec x86]} { append_platform_drv_boot_modules
295-
} else { append boot_modules " [platform_drv_binary_non_x86] " }
296-
297-
build_boot_image $boot_modules
183+
build_boot_image [build_artifacts]
298184

299185
set USB_PORT 0
300186

0 commit comments

Comments
 (0)