chore(release): 1.0.1

明确 BSP 的 RES 开发范围和 SDK 构建写入边界;调整 CV184X 强制补丁预检并补齐构建交接测试。
This commit is contained in:
tangfahong committed 2026-10-09 18:05:07 +08:00
1 parent 1641fac631
commit ea4ff92835
11 files changed
+90 -17

No files matched your search

@@ -211,9 +211,22 @@ def build_preflight(project_name: str, version: str, root: Path, output_root: Pa
f"EMX2_BuildSDKTool {project_name} {version} all"
)
warnings.append("统一构建可能同步配置到项目外 SDK,并按工具实现执行 git fetch origin")
requires_patch_precheck = assignments.get("EP_CHIP", "").upper().startswith("CV184")
if requires_patch_precheck:
warnings.append("CV184X 构建补丁检查失败可能触发 --applypatch --force;本预检未验证补丁环境,不能单凭 passed=true 自动构建")
is_cv184 = assignments.get("EP_CHIP", "").upper().startswith("CV184")
if is_cv184:
build_tool = root / "tools" / "BuildCvitek184XSDKTool.sh"
if not build_tool.is_file() or build_tool.is_symlink():
errors.append(f"CV184X 统一构建脚本缺失或不是普通文件: {build_tool}")
else:
script_lines = (
line.split("#", 1)[0]
for line in build_tool.read_text(encoding="utf-8").splitlines()
)
if any("--applypatch" in line and "--force" in line for line in script_lines):
errors.append(
f"统一构建脚本可能自动执行 --applypatch --force,禁止启动本次构建: {build_tool};"
"请由脚本所有者将该分支改为失败即退出"
)
warnings.append("CV184X 补丁完整性由统一构建脚本处理;Skill 不单独检查补丁环境")
return {
"schema_version": 1,
"kind": "build-preflight",
@@ -224,7 +237,8 @@ def build_preflight(project_name: str, version: str, root: Path, output_root: Pa
"project_path": str(project),
"config_layout": layout["layout"],
"board_build_type": layout["board_build_type"],
"requires_patch_precheck": requires_patch_precheck,
"requires_patch_precheck": False,
"patch_check_owner": "native-build-script" if is_cv184 else None,
"build_version": version,
"working_directory": str(root),
"completion_script": str(completion_script),
@@ -50,6 +50,10 @@ def main() -> int:
tools = root / "tools"
tools.mkdir()
(tools / "script_completion.sh").write_text("# test\n", encoding="utf-8")
(tools / "BuildCvitek184XSDKTool.sh").write_text(
"#!/bin/sh\n./cvitek_cv184x_patch/scripts/repos --check-env || exit 1\n",
encoding="utf-8",
)
reference = make_project(root, "CV1841CP-REF_dualos")
project_report = bsp_preflight.project_preflight(
@@ -94,9 +94,17 @@ def main() -> int:
assert bsp_preflight.resolve_board_layout(cv184, "CV1815JA")["error"]
write(cv184 / "buildEnvConfig.sh", "EP_CHIP=CV1841CP\n")
cv184.joinpath("imgs").symlink_to(f"/epbuild/EMX2.0/EmxRes/{cv184.name}/imgs")
build_tool = root / "tools/BuildCvitek184XSDKTool.sh"
write(build_tool, "./cvitek_cv184x_patch/scripts/repos --check-env\n"
"./cvitek_cv184x_patch/scripts/repos --applypatch --force\n")
cv184_build = bsp_preflight.build_preflight(cv184.name, "20260923_1", root, Path(temporary) / "output")
assert cv184_build["requires_patch_precheck"] is True, cv184_build
assert any("--applypatch --force" in item for item in cv184_build["warnings"]), cv184_build
assert cv184_build["passed"] is False, cv184_build
assert any("--applypatch --force" in item for item in cv184_build["errors"]), cv184_build
write(build_tool, "./cvitek_cv184x_patch/scripts/repos --check-env || exit 1\n")
cv184_build = bsp_preflight.build_preflight(cv184.name, "20260923_1", root, Path(temporary) / "output")
assert cv184_build["passed"] is True, cv184_build
assert cv184_build["requires_patch_precheck"] is False, cv184_build
assert cv184_build["patch_check_owner"] == "native-build-script", cv184_build
print("CV181X layout and SDK read-only inspection tests passed")
return 0