mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-26 15:31:35 +00:00
misc: configurator: Add entry "None" to HV console selector
Add an explicit "None" entry in HV console selector if user would like to disable debug console or there is no serial console available. Tracked-On: #7546 Signed-off-by: Calvin Zhang <calvinzhang.cool@gmail.com>
This commit is contained in:
parent
579e5247fb
commit
17d8eaa7ae
@ -23,9 +23,9 @@
|
||||
These settings can only be changed at build time.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="SERIAL_CONSOLE" type="SerialConsoleOptions">
|
||||
<xs:element name="SERIAL_CONSOLE" type="SerialConsoleType" default="None">
|
||||
<xs:annotation acrn:title="Serial console port" acrn:views="basic"
|
||||
acrn:options="//ttys/serial[type != '0']/dev_path/text()">
|
||||
acrn:options="//ttys/serial[type != '0']/dev_path/text(), 'None' ">
|
||||
<xs:documentation>Select the host serial device used for hypervisor debugging.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
|
@ -172,17 +172,10 @@ Read more about the available scheduling options in :ref:`cpu_sharing`.</xs:docu
|
||||
|
||||
<xs:simpleType name="SerialConsoleType">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value=".*ttyS[\d]+" />
|
||||
<xs:pattern value="(.*ttyS[\d]+)|None" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="SerialConsoleOptions">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Either empty or a string, such as ``/dev/ttyS0``.</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:union memberTypes="None SerialConsoleType" />
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="VMNameType">
|
||||
<xs:annotation acrn:widget-options="'placeholder': 'A string with at most 15 non-space characters, e.g. Linux-VM-1.'">
|
||||
<xs:documentation>A string of up to 15 letters, digits, ``_``, or ``-``.</xs:documentation>
|
||||
|
@ -53,15 +53,16 @@ class BusDevFunc(namedtuple(
|
||||
|
||||
def parse_hv_console(scenario_etree):
|
||||
"""
|
||||
There may be 3 types in the console item
|
||||
There may be 4 types in the console item
|
||||
1. BDF:(00:18.2) seri:/dev/ttyS2
|
||||
2. /dev/ttyS2
|
||||
3. ttyS2
|
||||
4. "None"
|
||||
"""
|
||||
ttys_n = ''
|
||||
ttys = common.get_node("//SERIAL_CONSOLE/text()", scenario_etree)
|
||||
|
||||
if not ttys or ttys == None:
|
||||
if not ttys or ttys == None or ttys == 'None':
|
||||
return ttys_n
|
||||
|
||||
if ttys and 'BDF' in ttys or '/dev' in ttys:
|
||||
|
Loading…
Reference in New Issue
Block a user