openubmc-bingo 0.6.68__py3-none-any.whl → 0.6.70__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of openubmc-bingo might be problematic. Click here for more details.
- bmcgo/__init__.py +1 -1
- bmcgo/tasks/task_build_rootfs_img.py +24 -0
- bmcgo/tasks/task_buildgppbin.py +30 -13
- {openubmc_bingo-0.6.68.dist-info → openubmc_bingo-0.6.70.dist-info}/METADATA +1 -1
- {openubmc_bingo-0.6.68.dist-info → openubmc_bingo-0.6.70.dist-info}/RECORD +8 -8
- {openubmc_bingo-0.6.68.dist-info → openubmc_bingo-0.6.70.dist-info}/WHEEL +0 -0
- {openubmc_bingo-0.6.68.dist-info → openubmc_bingo-0.6.70.dist-info}/entry_points.txt +0 -0
- {openubmc_bingo-0.6.68.dist-info → openubmc_bingo-0.6.70.dist-info}/top_level.txt +0 -0
bmcgo/__init__.py
CHANGED
|
@@ -21,6 +21,7 @@ import stat
|
|
|
21
21
|
import time
|
|
22
22
|
import subprocess
|
|
23
23
|
import tempfile
|
|
24
|
+
import re
|
|
24
25
|
from multiprocessing import Process
|
|
25
26
|
|
|
26
27
|
from git import Repo
|
|
@@ -221,6 +222,26 @@ class TaskClass(Task):
|
|
|
221
222
|
# 差异化处理完schema文件之后已完成schema整合,不在需要产品schema目录(强制删除时即使不存在也不会出错)
|
|
222
223
|
self.run_command(f"rm -rf {product_schema_path}", sudo=True)
|
|
223
224
|
|
|
225
|
+
# 将默认接口配置复制到节点目录中
|
|
226
|
+
def copy_interface_config(self, config_path, custom_path):
|
|
227
|
+
for config_dir in os.listdir(config_path):
|
|
228
|
+
# redfish的schema文件仍放在原路径,不需要进行复制
|
|
229
|
+
if not re.match(r'^[a-fA-F0-9]{2}_[a-fA-F0-9]{2}$', config_dir) and \
|
|
230
|
+
config_dir != "static_resource" and config_dir != "config_patch":
|
|
231
|
+
source_path = os.path.join(config_path, config_dir)
|
|
232
|
+
copy_cmd = f"cp -r {source_path} {custom_path}/"
|
|
233
|
+
self.tools.run_command(copy_cmd, sudo=True)
|
|
234
|
+
|
|
235
|
+
# 支持产品层级多节点共包,每个节点有独立的定制化接口配置
|
|
236
|
+
def custom_mapping_config_patch(self, config_path):
|
|
237
|
+
for custom_item in os.listdir(config_path):
|
|
238
|
+
# 节点目录命名为xx_xx格式,以十六进制表示
|
|
239
|
+
if re.match(r'^[a-fA-F0-9]{2}_[a-fA-F0-9]{2}$', custom_item):
|
|
240
|
+
custom_path = os.path.join(config_path, custom_item)
|
|
241
|
+
self.copy_interface_config(config_path, custom_path)
|
|
242
|
+
patch_work = MappingConfigPatch(self.config, config_path=custom_path)
|
|
243
|
+
patch_work.run()
|
|
244
|
+
|
|
224
245
|
# 支持映射配置文件根据产品差异进行打补丁
|
|
225
246
|
def mapping_config_patch(self):
|
|
226
247
|
self.info("开始根据配置映射打补丁")
|
|
@@ -229,6 +250,9 @@ class TaskClass(Task):
|
|
|
229
250
|
ret = self.tools.run_command(f"test -d {config_path}", ignore_error=True, sudo=True)
|
|
230
251
|
if ret.returncode != 0:
|
|
231
252
|
continue
|
|
253
|
+
|
|
254
|
+
self.custom_mapping_config_patch(config_path)
|
|
255
|
+
# 各节点的配置打完补丁后再进行默认配置的打补丁操作
|
|
232
256
|
patch_work = MappingConfigPatch(self.config, config_path=config_path)
|
|
233
257
|
patch_work.run()
|
|
234
258
|
|
bmcgo/tasks/task_buildgppbin.py
CHANGED
|
@@ -24,6 +24,10 @@ from bmcgo import misc
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
class TaskClass(Task):
|
|
27
|
+
def __init__(self, config, work_name=""):
|
|
28
|
+
super(TaskClass, self).__init__(config, work_name=work_name)
|
|
29
|
+
self.suffix = "BMC"
|
|
30
|
+
|
|
27
31
|
def copy_files(self):
|
|
28
32
|
rootca = os.path.join(self.config.work_out, misc.ROOTCA_DER)
|
|
29
33
|
crl = os.path.join(self.config.work_out, misc.CMS_CRL)
|
|
@@ -79,16 +83,17 @@ class TaskClass(Task):
|
|
|
79
83
|
else:
|
|
80
84
|
pmode_file = ""
|
|
81
85
|
|
|
86
|
+
self.write_gpp_bin(pmode_file)
|
|
82
87
|
|
|
88
|
+
def write_gpp_bin(self, pmode_file):
|
|
83
89
|
self.info(f"打包: {self.config.board_name}_gpp.bin")
|
|
84
|
-
|
|
85
|
-
|
|
90
|
+
files = f"hpm_top_header Hi1711_boot_4096.bin {pmode_file}"
|
|
91
|
+
files += f"hpm_sub_header rootca.der rootfs_{self.suffix}.img.cms cms.crl rootfs_{self.suffix}.tar.gz"
|
|
92
|
+
cmd = f"ls -al {files}"
|
|
86
93
|
self.run_command(cmd, show_log=True)
|
|
87
94
|
|
|
88
95
|
target_path = f"{self.config.work_out}/{self.config.board_name}_gpp.bin"
|
|
89
|
-
cmd = f"cat
|
|
90
|
-
cmd += "hpm_sub_header rootca.der rootfs_BMC.img.cms cms.crl rootfs_BMC.tar.gz"
|
|
91
|
-
self.info("执行命令: " + cmd)
|
|
96
|
+
cmd = f"cat {files}"
|
|
92
97
|
self.pipe_command([cmd], target_path)
|
|
93
98
|
|
|
94
99
|
def run(self):
|
|
@@ -99,31 +104,37 @@ class TaskClass(Task):
|
|
|
99
104
|
def move_dependency(self):
|
|
100
105
|
# 移动到tools/build_tools目录中
|
|
101
106
|
self.chdir(self.config.sdk_path)
|
|
107
|
+
if self.config.chip == "1711":
|
|
108
|
+
self.prepare_boot_1711()
|
|
109
|
+
else:
|
|
110
|
+
self.prepare_boot_1712()
|
|
111
|
+
|
|
112
|
+
def prepare_boot_1711(self):
|
|
102
113
|
unsigned_boot = None
|
|
103
114
|
for file in os.listdir("."):
|
|
104
115
|
if re.match("^Hi1711_[0-9]{8}_[0-9a-f]{40}.tar.gz$", file) is None:
|
|
105
116
|
continue
|
|
106
117
|
unsigned_boot = file
|
|
107
118
|
break
|
|
108
|
-
|
|
119
|
+
|
|
109
120
|
if self.config.self_sign:
|
|
110
121
|
if not unsigned_boot:
|
|
111
122
|
raise errors.BmcGoException("打开了自签名模式但未找到待签名的uboot文件,构建失败")
|
|
112
|
-
self.run_command(f"tar -xvf {
|
|
123
|
+
self.run_command(f"tar -xvf {unsigned_boot}")
|
|
113
124
|
# 解压uboot_debug未签名包
|
|
114
125
|
os.makedirs("origin_uboot_debug")
|
|
115
126
|
self.run_command(f"tar -xvf bin/original_bin/uboot_debug.tar.gz -C origin_uboot_debug")
|
|
116
|
-
self.
|
|
127
|
+
self.self_sign_uboot_1711("origin_uboot_debug", ".", True)
|
|
117
128
|
# 解压uboot未签名包
|
|
118
129
|
os.makedirs("origin_uboot")
|
|
119
130
|
self.run_command(f"tar -xvf bin/original_bin/uboot.tar.gz -C origin_uboot")
|
|
120
|
-
self.
|
|
121
|
-
|
|
131
|
+
self.self_sign_uboot_1711("origin_uboot", ".", False)
|
|
132
|
+
else:
|
|
122
133
|
self.run_command(f"dd if=Hi1711_boot_4096_pmode.bin of=Hi1711_boot_pmode.bin bs=1k count=1024 skip=768")
|
|
123
134
|
self.run_command(f"dd if=Hi1711_boot_4096_pmode_debug.bin of=Hi1711_boot_pmode_debug.bin bs=1k " +
|
|
124
135
|
"count=1024 skip=768")
|
|
125
136
|
|
|
126
|
-
def
|
|
137
|
+
def self_sign_uboot_1711(self, uboot_dir, output_dir, is_debug):
|
|
127
138
|
"""签名uboot包"""
|
|
128
139
|
cwd = os.getcwd()
|
|
129
140
|
output_dir = os.path.realpath(output_dir)
|
|
@@ -137,9 +148,15 @@ class TaskClass(Task):
|
|
|
137
148
|
self.signature("uboot.bin", "uboot.bin.cms", "cms.crl", "rootca.der")
|
|
138
149
|
self.copy_gpp_headers_files()
|
|
139
150
|
self.run_command("gpp_header uboot")
|
|
140
|
-
self.run_command("make_uboot_img.sh
|
|
141
|
-
run_cmd =
|
|
151
|
+
self.run_command(f"make_uboot_img.sh {l0_kb_size}")
|
|
152
|
+
run_cmd = (
|
|
153
|
+
f"dd if=Hi1711_boot_4096.bin of={output_dir}/Hi1711_boot_pmode{debug_flag}.bin "
|
|
142
154
|
f" bs=1K count=1024 skip={l0_kb_size}"
|
|
155
|
+
)
|
|
143
156
|
self.run_command(run_cmd)
|
|
144
157
|
self.run_command(f"cp Hi1711_boot_4096.bin {output_dir}/Hi1711_boot_4096{debug_flag}.bin")
|
|
145
158
|
self.chdir(cwd)
|
|
159
|
+
|
|
160
|
+
def prepare_boot_1712(self):
|
|
161
|
+
# 打桩函数,不允许变更函数名,供扩展实现
|
|
162
|
+
pass
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
bmcgo/__init__.py,sha256=
|
|
1
|
+
bmcgo/__init__.py,sha256=ZseRGGw1BIo33Zy9RTeEklcfSC1yc7r54gsFo5abONU,562
|
|
2
2
|
bmcgo/bmcgo.py,sha256=uD4TsfjrFB5aQPIS6WRUVc9ShXX-dSImY9ezkB13g1w,685
|
|
3
3
|
bmcgo/bmcgo_config.py,sha256=-KYhC3jNqWkCWu6YkyxDZlyC3floXIHaibGpmyB6YWQ,11873
|
|
4
4
|
bmcgo/errors.py,sha256=QW1ndrJcJ2Ws7riOznPKVvZsNlrYk73eZol7w8gJTPU,3076
|
|
@@ -224,9 +224,9 @@ bmcgo/tasks/__init__.py,sha256=VapgzhPMmB7dzPIRohoVm1jjfVn_v97cYNCRmkxScaU,539
|
|
|
224
224
|
bmcgo/tasks/misc.py,sha256=GK_bSDLGZW0FxywB2ICG1iIEz2y2QoCb1YQQk8SYOIA,711
|
|
225
225
|
bmcgo/tasks/task.py,sha256=95nKxTe5PW3rfhpm5YFasPtmP8oCraeWJKq0D5mbl6A,18578
|
|
226
226
|
bmcgo/tasks/task_build_conan.py,sha256=Si-8fIrQ_Vva6gw0kdLApEZY5cKt8Mt1C_8Ef4If61I,53872
|
|
227
|
-
bmcgo/tasks/task_build_rootfs_img.py,sha256=
|
|
227
|
+
bmcgo/tasks/task_build_rootfs_img.py,sha256=ffFLFVZ6wMpAvUi9au32IYNTr8TBmi7R6ZE1orvOj68,30565
|
|
228
228
|
bmcgo/tasks/task_build_wbd_up.py,sha256=X9-0Qqad-s3mGfJBMeBQvfZ99KlWcgaMluDr_zv6Z-o,3122
|
|
229
|
-
bmcgo/tasks/task_buildgppbin.py,sha256=
|
|
229
|
+
bmcgo/tasks/task_buildgppbin.py,sha256=VdViuNyOEBwHV3zbP6fJnZ3aUxK_RwyIPTv4Hseszrw,7018
|
|
230
230
|
bmcgo/tasks/task_buildhpm_ext4.py,sha256=giAWz-XYmtYv6KTK9BJOyXJY7yDar6oONmEvHPoqsl0,3514
|
|
231
231
|
bmcgo/tasks/task_create_interface_config.py,sha256=rkFRGLrUgYCics-n1CKwCoQscU2BaRQkH7KP3zwJ6FI,5393
|
|
232
232
|
bmcgo/tasks/task_download_buildtools.py,sha256=imiOIWXxKOiWolALasTuSp3EkXrVeFWD0bPLERA78W0,4520
|
|
@@ -263,8 +263,8 @@ bmcgo/utils/installations/install_plans/qemu.yml,sha256=lT7aKag60QUH6hTGFKa3hGRq
|
|
|
263
263
|
bmcgo/utils/installations/install_plans/studio.yml,sha256=AEspVgsVAnmUdvqZYNCb7SPoUEq_0i61dfpauyguLa4,229
|
|
264
264
|
bmcgo/utils/installations/installers/apt_installer.py,sha256=nPaCb4cobSi9InN_aHsEPtQ0k4FgsCUWE5_VgBPvcRE,3769
|
|
265
265
|
bmcgo/utils/installations/installers/pip_installer.py,sha256=dDdios1EQ7fzt90r02pZeoM3jCmjslLzkSvzd2hgRVM,3241
|
|
266
|
-
openubmc_bingo-0.6.
|
|
267
|
-
openubmc_bingo-0.6.
|
|
268
|
-
openubmc_bingo-0.6.
|
|
269
|
-
openubmc_bingo-0.6.
|
|
270
|
-
openubmc_bingo-0.6.
|
|
266
|
+
openubmc_bingo-0.6.70.dist-info/METADATA,sha256=r8PH4Z1EhzTs-bAcIfANC1pVpQ8J-6P2Ziz4ZfrTbcE,1010
|
|
267
|
+
openubmc_bingo-0.6.70.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
268
|
+
openubmc_bingo-0.6.70.dist-info/entry_points.txt,sha256=UUoUP-vAWTgg9vEYbRwYqOBHgpRtkngdzMPb-ocz90g,42
|
|
269
|
+
openubmc_bingo-0.6.70.dist-info/top_level.txt,sha256=9AcvCAt1nZcOgMsGt6T07mg2Bgtdet-3mHTwg91axgI,6
|
|
270
|
+
openubmc_bingo-0.6.70.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|