If the RISC-V Python/PyTorch/sysroot inputs are absent, the script still leaves a
package skeleton and writes manifest.json, but exits nonzero with a precise
missing_inputs list.
The checked-in staging can also be reproduced from signed Ubuntu ports packages:
The scanner uses readelf, not ldd, so it does not execute target binaries and
does not resolve through the host dynamic linker. The resolved report records each
ELF object’s NEEDED entries and the exact in-bundle file paths that satisfy
them. It also fails on missing libraries or non-riscv64 ELF files.
Verified locally
The bundle has been checked with QEMU user-mode on the build host:
Both commands print PASS. runtime/broad/ additionally stages a broad pool of
riscv64 shared libraries from the signed Ubuntu ports rootfs and the local
riscv64 sysroot, so future PyTorch imports and Triton ELF dependencies have a
larger in-bundle library set available while remaining under the 10GB target
limit. The final resolved dependency report currently covers 892 ELF objects with
0 problems.
The current riscv64 Python environment has been validated with the following
imports under QEMU user-mode:
The transformers, tokenizers, and torchtext package names were not present
as installable riscv64 Ubuntu packages in the current mirror, so they are still
not part of this staged set and would need a separate PyPI wheel or source-build
path if you want them in the bundle.
The Ubuntu riscv64 libtorch2.6 package references
three older gloo rendezvous symbols not exported by the matching libgloo0
package, so runtime/torch/libgloo_store_shim.so provides those unused
rendezvous symbols and bin/run-python preloads it automatically. Basic tensor
execution is verified; distributed gloo rendezvous is not part of this bundle’s
contract.
Space policy
Do not stage CUDA, compilers, LLVM build trees, pip/conda caches, PyTorch source
trees, or debug-symbol-heavy build outputs unless they are required at runtime.
The target volume is limited to 10GB.
The .apt-riscv64/, .pkg-cache/, and .pkg-rootfs-riscv64-stage/ directories
are build caches for reproducibility, not runtime requirements. They may be
omitted from the final target copy if space is tight.
tools_for_fpga
tools_for_fpga/is the target-side runtime bundle for a minimal RISC-V Linux machine. The intended deployment path is:The target contract is:
riscv64, little endian,lp64d/bin/bash,/bin/sh,/usr/bin/env, and coreutils.sodependencies must come from this directory, not from target/libor/usr/libRuntime entrypoints
Only use these entrypoints on the target:
If you prefer the lower-level wrappers, you can still call:
bin/run-pythoninvokes:bin/run-elfinvokes the same bundled loader and refuses to run if the loader is missing, so it cannot fall back to target/libor/usr/lib.Build/stage the package
The package script stages only explicit RISC-V inputs. It intentionally refuses to silently copy host Python/PyTorch.
Example:
If the RISC-V Python/PyTorch/sysroot inputs are absent, the script still leaves a package skeleton and writes
manifest.json, but exits nonzero with a precisemissing_inputslist.The checked-in staging can also be reproduced from signed Ubuntu ports packages:
Dependency checks
After staging, check that every ELF/.so dependency is closed inside the bundle:
The scanner uses
readelf, notldd, so it does not execute target binaries and does not resolve through the host dynamic linker. The resolved report records each ELF object’sNEEDEDentries and the exact in-bundle file paths that satisfy them. It also fails on missing libraries or non-riscv64 ELF files.Verified locally
The bundle has been checked with QEMU user-mode on the build host:
Both commands print
PASS.runtime/broad/additionally stages a broad pool of riscv64 shared libraries from the signed Ubuntu ports rootfs and the local riscv64 sysroot, so future PyTorch imports and Triton ELF dependencies have a larger in-bundle library set available while remaining under the 10GB target limit. The final resolved dependency report currently covers 892 ELF objects with 0 problems.The current riscv64 Python environment has been validated with the following imports under QEMU user-mode:
This smoke covers:
torchtorchvisiontorchaudiopandasscipysklearnPILsentencepiecesafetensorsThe
transformers,tokenizers, andtorchtextpackage names were not present as installable riscv64 Ubuntu packages in the current mirror, so they are still not part of this staged set and would need a separate PyPI wheel or source-build path if you want them in the bundle.The Ubuntu riscv64
libtorch2.6package references three older gloo rendezvous symbols not exported by the matchinglibgloo0package, soruntime/torch/libgloo_store_shim.soprovides those unused rendezvous symbols andbin/run-pythonpreloads it automatically. Basic tensor execution is verified; distributed gloo rendezvous is not part of this bundle’s contract.Space policy
Do not stage CUDA, compilers, LLVM build trees, pip/conda caches, PyTorch source trees, or debug-symbol-heavy build outputs unless they are required at runtime. The target volume is limited to 10GB.
The
.apt-riscv64/,.pkg-cache/, and.pkg-rootfs-riscv64-stage/directories are build caches for reproducibility, not runtime requirements. They may be omitted from the final target copy if space is tight.