English | 中文
smart-build is a standalone build system for RT-Thread Smart. It provides one command-line interface for machine configuration, package selection, kernel and root filesystem builds, incremental task execution, build manifests, and QEMU smoke checks.
The project runs from its source tree. Build outputs, downloaded archives, toolchains, and the RT-Thread source tree are kept outside version control.
| Machine | Architecture | RT-Thread BSP | QEMU profile |
|---|---|---|---|
qemu-virt-aarch64 |
AArch64 | qemu-virt64-aarch64 |
virt-aarch64 |
qemu-virt-riscv64 |
RISC-V 64 | qemu-virt64-riscv |
virt-riscv64 |
qemu-vexpress-a9 |
Arm | qemu-vexpress-a9 |
vexpress-a9 |
The currently implemented root filesystem image format is ext4. FAT and romfs appear in the configuration interface but are not yet buildable.
- Python 3.10 or newer.
- An env sdk toolchain under
~/.env/tools/scripts/packagesmatching the selected machine'sboard.yaml. - RT-Thread Env package scripts under
~/.env/tools/scriptsand a package index under~/.env/packages/packages. - An RT-Thread source tree available as the repository-root
rt-threadpath, usually as a symbolic link. - Host build tools reported by
smart-build doctor. - The QEMU system binary declared by the selected board for smoke tests.
Install the Python package in editable mode:
python -m pip install -e ../smart-build doctor
./smart-build menuconfig
./smart-build build all
./smart-build qemu-smokeTo select a machine without changing the workspace configuration:
./smart-build --machine qemu-virt-riscv64 doctor
./smart-build build kernel --machine qemu-virt-riscv64Build results are written below build/<machine>/. Downloaded source archives
are stored below downloads/.
Before compiling the kernel, smart-build synchronizes its defconfig to the
RT-Thread BSP and runs ~/.env/tools/scripts/pkgs --update. Kernel packages
and their versions are selected by the RT-Thread kernel configuration, not by
smart-build package metadata.
./smart-build --help
./smart-build doctor
./smart-build menuconfig
./smart-build configure kernel
./smart-build configure package:curl
./smart-build build all
./smart-build build kernel
./smart-build build rootfs
./smart-build graph
./smart-build qemu-smoke
./smart-build cleanbuild --dry-run currently prints a placeholder task plan. It is useful for a
high-level preview, but it is not guaranteed to match every task in a real
build.
- Getting started
- Configuration
- Command reference
- Using packages
- Adding a package
- Package description reference
- Supported boards
- Adding board support
- Root filesystem support
- Adding a root filesystem type
- Troubleshooting
- Compatibility and current limitations
- Contributing
No project license has been selected in this repository yet. A license must be added before distributing the project for general third-party use.