acrn-config: get PTCT table from native environment

automatically get PTCT table from native environment for the usage
of pre-launched VMs.

Tracked-On: #5418

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
This commit is contained in:
Shuang Zheng 2020-10-21 19:33:02 +08:00 committed by wenlingz
parent 0e9775f4a4
commit b23374ccc9

View File

@ -6,6 +6,7 @@
import os
import sys
import subprocess
import shutil
from collections import defaultdict
import dmar
import parser_lib
@ -652,3 +653,9 @@ def generate_info(board_file):
# Generate board info
with open(board_file, 'a+') as config:
gen_acpi_info(config)
# get the PTCT table from native environment
out_dir = os.path.dirname(board_file)
if os.path.isfile(SYS_PATH[1] + 'PTCT'):
shutil.copy(SYS_PATH[1] + 'PTCT', out_dir)
print("PTCT table has been saved to {} successfully!".format(os.path.join(out_dir, 'PTCT')))