# tools **Repository Path**: SemiDrive/tools ## Basic Information - **Project Name**: tools - **Description**: SemiDrive SoC 平台独立工具集合,涵盖镜像签名、分区打包、文件系统制作及 SDK 构建发布等开发与量产工具 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-10-26 - **Last Updated**: 2026-11-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # tools > SemiDrive SoC 平台独立工具集 —— 收录镜像签名、分区打包、文件系统镜像制作等 SDK 构建/发布工具,各工具独立维护、许可证各自独立。 ## ✨ 特性 - AVB 签名流水线:`make_vbmeta.sh` + `avbtool` + ATB signer,含测试密钥与证书链 - 分区表与打包:`pactool` / `bpttool`(AOSP 派生,SemiDrive 定制) - 文件系统镜像:`make_ext4fs`、`dir2fat`(免 root 制作 FAT 镜像)、`slimfsTool`、sparse 互转 - DDR 初始化序列生成:`ddr_seq_parser`,生成 `ddr_init_seq.bin` - 自动烧录镜像生成:`gen_auto_burn_img`(fuse / pin-mux / NV 寄存器烧写序列) ## 📌 环境依赖 - x86-64 Linux 主机 - python3(`gen_auto_burn_img`、`slimfsTool` 等) - `dosfstools`(mkfs.vfat)、`mtools`(mmd/mcopy)—— 仅 `dir2fat` 需要 - python2 —— 仅 `pactool` 需要 ## 🚀 快速上手 ```bash # 生成 vbmeta 签名镜像 ./release/sign_tool/make_vbmeta.sh \ -f make_vbmeta \ -b partition.bpt \ -d "system.img:system:sha256:hash" \ -o vbmeta.img \ -s "--key release/sign_tool/vbmeta/keys/ecdsa/prime256v1/ca.der --algorithm SHA256_RSA256" # 重生成 DDR 初始化序列(目标:d9390 / d9390_ref) ./release/scripts/ddr_seq_parser/gen_ddr_init_seq.sh d9390 d9390_ref ddr_init_seq.bin # 目录打包为 FAT16 镜像 ./release/scripts/dir2fat/dir2fat.sh -f -F 16 -S 512 output.img 24 source_dir/ # 由 JSON 模板生成自动烧录镜像 python3 release/scripts/gen_auto_burn_img/gen_auto_burn_img.py --template sample/template.json --output burn.img # SlimFS 镜像制作 python3 release/scripts/slimfsTool/slimfsTool.py make_img --prj ./project/slimfs_init.xml --output ./project/slimfs_init.bin ``` 签名工具完整说明见 [`release/README.md`](release/README.md)。 ## 📁 目录结构 ``` tools/ ├── release/ # SDK 构建与发布工具(签名、分区、文件系统) │ ├── scripts/ │ │ ├── ddr_seq_parser/ # DDR 初始化序列生成器(d9390/thang) │ │ ├── dir2fat/ # FAT12/16/32 镜像制作 │ │ ├── gen_auto_burn_img/ # 自动烧录镜像生成(Python) │ │ ├── make_ext4fs/ # ext4 镜像制作(AOSP 预编译) │ │ ├── pactool/ # 分区/打包工具与 BPT 工具(AOSP 派生) │ │ ├── slimfsTool/ # SlimFS 镜像创建与检查 │ │ └── sparse/ # sparse 镜像互转(AOSP 预编译) │ └── sign_tool/ # 镜像签名工具(AVB / ATB) │ ├── atb_signer(_v2) # ATB 签名器 │ ├── avbtool # Android Verified Boot 工具 │ ├── make_vbmeta.sh / sign_helper.sh │ ├── cert_package/ # 预置证书链(root + user DER/PEM) │ ├── fec/ # 前向纠错二进制 │ ├── key_revoke/ # ECDSA 密钥吊销测试密钥 │ └── vbmeta/ # VBMeta 签名密钥 └── res/ # 预置资源文件 ├── *.json # NOR flash 控制器配置(IS25/MT35 octal fast-read) ├── *.bin / *.img / *.rgb # 二进制资源(音频、显示、FAT 镜像、splash) └── early_app/BootAnimation/ # 开机动画资源(MJPEG + PCM 音频) ``` ## 📄 License 本仓库为多个独立工具的集合,**无统一许可证**——使用/再分发前请查阅对应组件目录下的许可证文件: | 组件 | 许可证 | 说明 | |---|---|---| | `sign_tool/make_vbmeta.sh`、`sign_helper.sh` | MIT | (c) 2026 Beijing Semidrive Technology Corporation | | `scripts/ddr_seq_parser/`、`gen_auto_burn_img/`、`slimfsTool/` | MIT | 同上 | | `scripts/pactool/gen_pack_crc`、`gen_sfs_binary.py`、`sfs_module.py` | MIT | 同上 | | `scripts/pactool/bpttool`、`pactool` | Apache 2.0 | 派生自 AOSP,SemiDrive 修改 | | `scripts/make_ext4fs/make_ext4fs` | Apache 2.0 | 派生自 AOSP `system/extras/ext4_utils`(含 zlib) | | `scripts/sparse/img2simg`、`simg2img` | Apache 2.0 | 派生自 AOSP `system/core/libsparse`(含 zlib / LLVM) | | `scripts/dir2fat/dir2fat.sh` | GPL v3 | 见 `scripts/dir2fat/COPYING` | 许可证全文位置:MIT — `release/scripts/*/LICENSE-MIT`、`release/sign_tool/LICENSE-MIT`;Apache 2.0 — `release/scripts/*/LICENSE-Apache 2.0`、`release/sign_tool/fec/LICENSE-Apache 2.0`;GPL v3 — `release/scripts/dir2fat/COPYING`。 ## 🤝 贡献与签署 CLA 欢迎贡献代码!首次提交 Pull Request 前请签署贡献者协议(一次签署,永久有效): **签署直链**: https://gitee.com/organizations/SemiDrive/cla/semidrivegongxianzhexie - 签署邮箱必须与 git 提交邮箱一致 - 每个 commit 请使用 `git commit -s` 签署 - 提交规范等详见 [CONTRIBUTING.md](CONTRIBUTING.md)