Skip to content

UniOHOS Builder CLI & Storage Tooling (UniOHOS/builder) ​

UniOHOS/builder (Apache-2.0) provides the declarative device manifest validator, Approach A specification CLI, Approach B offline BYOF planner, generic 64KB PTE_CONT EROFS storage tools (fs-tools/), and single-file hotbind harness (harness/).

1. Installation ​

bash
git clone https://github.com/UniOHOS/builder.git
cd builder
pip install -e .

You can also invoke the CLI directly without editable installation via python3 -m uniohos_builder.

2. Subcommand Reference (uniohos-builder) ​

validate-device ​

Validates a declarative device.yaml recipe against schemas/device.schema.json, verifying required sections, enum constraints, zero_remote_blobs == true, and zero_neverallow == true.

bash
uniohos-builder validate-device examples/dijun-reference.yaml
uniohos-builder validate-device examples/dijun-reference.yaml --schema schemas/device.schema.json --json

open-base-info ​

Displays the Approach A pure open-source Apache-2.0 OpenHarmony base rootfs specification (uniohos-open-base-<arch>.erofs).

bash
uniohos-builder open-base-info --arch arm64
uniohos-builder open-base-info --arch x86_64 --json

byof-plan ​

Validates a device recipe and emits the reproducible 5-step Approach B offline dry-run synthesis plan (remote_blob_downloads: 0).

bash
uniohos-builder byof-plan --device examples/dijun-reference.yaml --dry-run
uniohos-builder byof-plan --device examples/dijun-reference.yaml --dry-run --json
SubcommandRequired ArgumentsOptional Flags
validate-device<device_yaml>--schema <path>, --json
open-base-info(none)`--arch arm64
byof-plan--device <device_yaml>--schema <path>, --dry-run (default true), --json

3. Storage Tooling (fs-tools/) & Hotbind Harness (harness/) ​

  • fs-tools/tools/erofs_v2_64k_packer.py: Packs tiered read-only EROFS images (Tier-0 uncompressed 64KB PTE_CONT aligned FLAT_PLAIN + Tier-1 lz4hc + Tier-2 zstd), checks phys_blkaddr % 16 == 0, verifies unmodified fsck.erofs --extract SHA-256 parity, and checks deterministic R1 == R2 builds.
  • fs-tools/tools/hmfs_ioctl_compat.h: Userspace HMFS ioctl UAPI header paired with the kernel's native F2FS compatibility layer.
  • fs-tools/configs/: Generic erofs_tier_rules_super_v21.json and erofs_compress_hints_super_v21.txt templates.
  • harness/hotbind_test_harness.sh: Fast single-file MS_BIND testing harness; see Inner-Loop Hotbind Testing.

4. Running Tests & Hygiene Checks ​

bash
python3 -m unittest discover -s tests -v
python3 scripts/check_hygiene.py

Independent Open-Source Community (CC-BY-4.0). Not affiliated with Huawei, HiSilicon, OpenAtom Foundation, Xiaomi, Qualcomm, MediaTek, or Arm.