mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 15:32:25 +00:00
Increase flexibility for serial devices in run-tool
Instead of using a fixed command like picocom in the run tool, it's better to have the flexibility to set the whole command that connects to the serial device. Therefore, it's possible for instance to connect to a remote serial device exported via TCP/IP by using tools like socat.
This commit is contained in:
parent
5e321732df
commit
8ac5ae2248
6
tool/run
6
tool/run
@ -266,7 +266,7 @@ set specs [get_cmd_arg --specs ""]
|
|||||||
set repositories [get_cmd_arg --repositories ""]
|
set repositories [get_cmd_arg --repositories ""]
|
||||||
set qemu_args [get_cmd_arg --qemu-args ""]
|
set qemu_args [get_cmd_arg --qemu-args ""]
|
||||||
set run_target [get_cmd_arg --target "qemu"]
|
set run_target [get_cmd_arg --target "qemu"]
|
||||||
set serial_dev [get_cmd_arg --serial-dev "/dev/ttyUSB0"]
|
set serial_cmd [get_cmd_arg --serial-cmd "picocom -b 115200 /dev/ttyUSB0"]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -674,7 +674,7 @@ proc exit {{status 0}} {
|
|||||||
#
|
#
|
||||||
proc spawn_serial { wait_for_re timeout_value} {
|
proc spawn_serial { wait_for_re timeout_value} {
|
||||||
global spawn_id
|
global spawn_id
|
||||||
global serial_dev
|
global serial_cmd
|
||||||
global run_target
|
global run_target
|
||||||
|
|
||||||
if {$wait_for_re == "forever"} {
|
if {$wait_for_re == "forever"} {
|
||||||
@ -687,7 +687,7 @@ proc spawn_serial { wait_for_re timeout_value} {
|
|||||||
power_plug_reset
|
power_plug_reset
|
||||||
}
|
}
|
||||||
|
|
||||||
spawn picocom -b 115200 $serial_dev
|
eval spawn $serial_cmd
|
||||||
set serial_spawn_id $spawn_id
|
set serial_spawn_id $spawn_id
|
||||||
wait_for_output $wait_for_re $timeout_value $serial_spawn_id
|
wait_for_output $wait_for_re $timeout_value $serial_spawn_id
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user