Skip to content

Commit 009d835

Browse files
Wei Liuwenlingz
authored andcommitted
acrn-config: modify board info of block device info
As the blkid info contains 'UUID' information, which easy to lead to confuse with the vm 'UUID'. So refine the format for block device. v1-v2: 1). align the style in BLOCK_DEVICE_INFO tag 2). add 'mmcblk1p3' in BLOCK_DEVICE_INFO tag v2-v3: 1). correct the commit message. 2). refine the api of handle_block_dev Tracked-On: #3754 Signed-off-by: Wei Liu <weix.w.liu@intel.com> Acked-by: Victor Sun <victor.sun@intel.com>
1 parent 96dede4 commit 009d835

File tree

6 files changed

+23
-12
lines changed

6 files changed

+23
-12
lines changed

misc/acrn-config/target/parser_lib.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,23 @@ def cmd_execute(cmd):
8383
return res
8484

8585

86-
def handle_root_dev(line):
86+
def handle_block_dev(line):
8787
"""Handle if it match root device information pattern
8888
:param line: one line of information which had decoded to 'ASCII'
8989
"""
90+
block_format = ''
9091
for root_type in line.split():
9192
if "ext4" in root_type or "ext3" in root_type:
92-
return True
93+
block_type = ''
94+
block_dev = line.split()[0]
95+
for type_str in line.split():
96+
if "TYPE=" in type_str:
97+
block_type = type_str
9398

94-
return False
99+
block_format = block_dev + " " + block_type
100+
return block_format
101+
102+
return block_format
95103

96104

97105
def dump_execute(cmd, desc, config):
@@ -132,8 +140,8 @@ def dump_execute(cmd, desc, config):
132140
continue
133141

134142
if desc == "BLOCK_DEVICE_INFO":
135-
ret = handle_root_dev(line)
136-
if not ret:
143+
line = handle_block_dev(line)
144+
if not line:
137145
continue
138146

139147
print("\t{}".format(line.strip()), file=config)

misc/acrn-config/xmls/board-xmls/apl-mrb.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,8 @@
294294
</SYSTEM_RAM_INFO>
295295

296296
<BLOCK_DEVICE_INFO>
297-
/dev/mmcblk1p1: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4" PARTLABEL="sos_rootfs" PARTUUID="5bd5afa7-ab7e-46f3-85ad-0cfd285d5d76"
297+
/dev/mmcblk1p1: TYPE="ext4"
298+
/dev/mmcblk1p3: TYPE="ext4"
298299
/dev/mmcblk0p1: TYPE="ext4"
299300
/dev/sda3: TYPE="ext4"
300301
</BLOCK_DEVICE_INFO>

misc/acrn-config/xmls/board-xmls/apl-up2-n3350.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,9 @@
274274
</SYSTEM_RAM_INFO>
275275

276276
<BLOCK_DEVICE_INFO>
277-
/dev/sda3: LABEL="root" UUID="7de2c654-069b-4a56-b93f-70b2f7662bd0" TYPE="ext4" PARTLABEL="/" PARTUUID="712932d4-3420-4cca-b361-3606a40f3b89"
278-
/dev/mmcblk0p3: LABEL="root" UUID="045f2013-b4c4-4817-a1aa-dc4416ca800f" TYPE="ext4" PARTLABEL="/" PARTUUID="517bf93d-1cb5-4d72-9550-a0144a2fcdbc"
277+
/dev/sda3: TYPE="ext4"
278+
/dev/mmcblk0p1: TYPE="ext4"
279+
/dev/mmcblk0p3: TYPE="ext4"
279280
</BLOCK_DEVICE_INFO>
280281

281282
<TTYS_INFO>

misc/acrn-config/xmls/board-xmls/apl-up2.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,9 @@
274274
</SYSTEM_RAM_INFO>
275275

276276
<BLOCK_DEVICE_INFO>
277-
/dev/sda3: LABEL="root" UUID="7de2c654-069b-4a56-b93f-70b2f7662bd0" TYPE="ext4" PARTLABEL="/" PARTUUID="712932d4-3420-4cca-b361-3606a40f3b89"
278-
/dev/mmcblk0p3: LABEL="root" UUID="07c59c89-7796-429c-aad5-75f16193747c" TYPE="ext4" PARTLABEL="/" PARTUUID="f768183d-c825-4b18-be2d-45e67d27e71d"
277+
/dev/sda3: TYPE="ext4"
278+
/dev/mmcblk0p1: TYPE="ext4"
279+
/dev/mmcblk0p3: TYPE="ext4"
279280
</BLOCK_DEVICE_INFO>
280281

281282
<TTYS_INFO>

misc/acrn-config/xmls/board-xmls/nuc6cayh.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@
232232
</SYSTEM_RAM_INFO>
233233

234234
<BLOCK_DEVICE_INFO>
235-
/dev/sda3: LABEL="root" UUID="b8352fb7-25f5-481d-aa6f-015a7c76c5aa" TYPE="ext4" PARTLABEL="/" PARTUUID="9a305316-3c78-436c-9c21-3be1b324428d"
235+
/dev/sda3: TYPE="ext4"
236236
</BLOCK_DEVICE_INFO>
237237

238238
<TTYS_INFO>

misc/acrn-config/xmls/board-xmls/nuc7i7dnb.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@
226226
</SYSTEM_RAM_INFO>
227227

228228
<BLOCK_DEVICE_INFO>
229-
/dev/nvme0n1p3: LABEL="root" UUID="deb9eba1-9ab6-4d1e-95b9-aa1d2f7b660e" TYPE="ext4" PARTLABEL="/" PARTUUID="80521cfb-cce4-4ccc-8cf8-46a045196c73"
229+
/dev/nvme0n1p3: TYPE="ext4"
230230
/dev/sda3: TYPE="ext4"
231231
</BLOCK_DEVICE_INFO>
232232

0 commit comments

Comments
 (0)