forked from LevyForchh/mtda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mtda.ini
160 lines (146 loc) · 5.72 KB
/
mtda.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# ---------------------------------------------------------------------------
# General settings
# ---------------------------------------------------------------------------
[main]
debug = 0
# change to 'yes' for 'storage mount' to use fuse (experimental)
# this requires https://github.com/madscientist42/partitionfs
# and fuseext2 / fusefat
fuse = no
# ---------------------------------------------------------------------------
# Remote settings
# ---------------------------------------------------------------------------
# Set "control" to the TCP/IP port number for the control interface
# Set "console" to the TCP/IP port number for the console I/O interface
# Set "host" to the remote agent IP address or hostname
# ---------------------------------------------------------------------------
# Note: the "host" setting is ignored when daemonized
# ---------------------------------------------------------------------------
[remote]
control = 5556
console = 5557
host = localhost
# ---------------------------------------------------------------------------
# Console settings
# ---------------------------------------------------------------------------
# Set "variant" to specify how to access the console interface of the device.
# Use one of:
# - serial
# - telnet
# Note: this section is ignored when connecting to a remote agent
# ---------------------------------------------------------------------------
[console]
variant=serial
port=/dev/ttyUSB0
rate=115200
# define a telnet console
# [console]
# variant=telnet
# host=192.168.2.176
# port=5000
# ---------------------------------------------------------------------------
# Power Control settings
# ---------------------------------------------------------------------------
# Set "variant" to specify which power control device to use. Use one of:
# - aviosys_8800
# - gpio
# - pduclient
# - qemu
# ---------------------------------------------------------------------------
# Note: this section is ignored when connecting to a remote agent
# ---------------------------------------------------------------------------
[power]
variant=aviosys_8800
# variant=gpio
# pin=48
# variant=pduclient
# daemon=134.86.60.40
# hostname=134.86.254.45
# port=14
# variant=qemu
# bios=OVMF.fd
# machine=pc
# memory=2048
# storage=ssd.img
# ---------------------------------------------------------------------------
# SDMUX Control settings
# ---------------------------------------------------------------------------
# Set "variant" to specify which power control device to use. Use one of:
# - qemu
# - samsung
# - usbf
# ---------------------------------------------------------------------------
# Note: this section is ignored when connecting to a remote agent
# ---------------------------------------------------------------------------
[sdmux]
variant=usbf
#driver=g_multi
# variant=qemu
# file=usb.img
# ---------------------------------------------------------------------------
# USB settings
# ---------------------------------------------------------------------------
# Set "ports" to specify how many USB ports may be switched ON/OFF
# ---------------------------------------------------------------------------
# Note: this section is ignored when connecting to a remote agent
# ---------------------------------------------------------------------------
#[usb]
#ports=1
# ---------------------------------------------------------------------------
# USB Port #1 settings
# ---------------------------------------------------------------------------
# Set "class" as a user-defined key to identify connected devices
# Set "variant" to designate the USB switch device attached to this USB port
# Use one of the following:
# - gpio ("pin" needs to be set)
# ---------------------------------------------------------------------------
# Note: this section is ignored when connecting to a remote agent
# ---------------------------------------------------------------------------
#[usb1]
#class=MSC
#variant=gpio
#pin=26
#enable=high
# ---------------------------------------------------------------------------
# USB Gadgets
# ---------------------------------------------------------------------------
# [keyboard]
# variant=hid
# device=/dev/hidg0
# ---------------------------------------------------------------------------
# Scripts to execute on state changes
# ---------------------------------------------------------------------------
# Simple python scripts may be used on "power on" and "power off" events. The
# following script shows how to enter the BIOS menu using the HID keyboard
# controller and navigate (blindly) in the UI to select the second boot media
# ---------------------------------------------------------------------------
# [scripts]
# power on:
# import time
# time.sleep(5)
# mtda.keyboard.esc(5)
# time.sleep(0.5)
# mtda.keyboard.right()
# mtda.keyboard.enter()
# time.sleep(0.5)
# mtda.keyboard.down()
# mtda.keyboard.enter()
# mtda.keyboard.idle()
# ---------------------------------------------------------------------------
# Similar power on script for qemu using the (serial) console interface
# instead of the keyboard interface. This script also demonstrates use of
# environment variables ("boot-from-usb")
# ---------------------------------------------------------------------------
# [scripts]
# power on:
# if 'boot-from-usb' in env and env['boot-from-usb'] == '1':
# ... import time
# ... time.sleep(10)
# ... mtda.console_send('\x1b')
# ... time.sleep(1)
# ... mtda.console_send('\x1b[B\x1b[B')
# ... mtda.console_send('\r')
# ... time.sleep(1)
# ... mtda.console_send('\x1b[B\x1b[B\x1b[B\x1b[B\x1b[B\x1b[B')
# ... mtda.console_send('\r')
# ---------------------------------------------------------------------------