This repository contains references to recipes for electronic design automation (EDA) tools/projects to be built on Termux (Android). The main purpose is coordination of contributions for eventually providing all tools/projects through some apt
repository, and having them updated periodically.
ATTENTION: Latest releases of Termux are available through F-Droid. There are outdated versions available through Google Play, but using them is discouraged. See termux/termux-app#1072@issuecomment-473965266.
See wiki.termux.com for general guidelines about getting started with Termux, such as how to setup Touch Keyboards. Power users will prefer plugging a USB/Bluetooth keyboard, which works off the shelf.
Termux feels like a Debian environment with regard to installing/managing packages. However, a wrapper named pkg
is provided for dealing with some details of Termux. As explained in wiki.termux.com: Package Management > Using the package manager, using pkg
is recommended.
NOTE: In the future, this repository might be listed in wiki.termux.com: Development Environments.
Termux includes clang by default, instead of GCC. However, some tools do require GCC (e.g. GHDL needs GNAT). Fortunately, community member @its-pointless provides GCC, Octave, ScyPy and others. See wiki.termux.com: Package Management > Community repositories and its-pointless/gcc_termux.
- base.sh: setup its-pointless' repository and install dependencies for all tools.
- ghdl.sh: build and install GHDL.
- yosys.sh: build and install Yosys.
- dfu-util.sh: build and install dfu-util.
NOTE: These scripts are tested on aarch64 devices. Users of 32 bit platforms might need to change the version of GNAT from 10 to 8. See wiki.termux.com: FAQ > Why Termux is 32 bit when my CPU is 64 bit.
Most EDA tools are not available as canonical Termux packages yet. Subdir packages contains work in progress. The proposal is to first try building and installing tools manually through scripts, and then convert them to proper packages.
NOTE: In github.com/termux, apart from termux/termux-packages and termux/unstable-packages, there are other package groups, such as termux/game-packages. It might be interesting to handle this repo as termux/eda-packages.
Using USB devices from Termux is not straightforward due to permission constraints. However, mice, keyboards and tools based on libusb are expected to work.
- wiki.termux.com: OTG
- wiki.termux.com: Termux-usb
- "Failing libusb_init example" (termux/termux-app#1928)
- Querela/termux-usb-python
- "Package request: openocd" (termux/termux-packages#4978)
- mik3y/usb-serial-for-android
- danpeig/Johnny-Five-Android-Termux
Unlike other repositories in the ecosystem, testing these recipes in Continuous Integration (CI) services is non-trivial, since running non-interactive Android containers/VMs on ARM is not straightforward.
In the CI workflow of this repo, a container built in termux/termux-docker is used together with dbhi/qus. That allows running some scripts for testing purposes. However, it is quite limited. Currently, updating the Termux environment and installing dependencies does work, albeit with arbitray resolution issues. Furthermore, building GHDL produces compiler crashes or hangs, either with GCC or clang. Therefore, using CI for testing the codebase of this repo is a research area itself.
Should you want to help getting CI to a usable state, or if you are aware of any ready-to-use solution, please let us know!