Skip to content

Yet another busybox / toybox tool. This one's written in Intel x86-64 64-bit assembly language.

License

Notifications You must be signed in to change notification settings

jamesodhunt/abox

Repository files navigation

abox

Yet another simple busybox / toybox clone. This one is written in Intel 64-bit assembly language (x86_64) for Linux.

Why?

Because I wanted an excuse to write some modern 64-bit Intel assembly language.

Commands

Currently, the following commands are implemented in some form:

$ abox -l | xargs
basename cat clear echo env false head ln pwd rm seq sleep sync touch true yes

Note:

There is no shell currently - I'm working on it! ;)

Dependencies

Tool Implementation Required? Rationale Notes
Intel x86_64 Assembler NASM or YASM yes ;)
C compiler GCC or Clang yes For linking
Build system meson and ninja yes
Make GNU Make no Simplifies building
C unit test framework check no (*) aka libcheck
CLI tests BATS no (*) CLI testing
moreutils package errno command yes Used by abox-util.sh to generate definitions

(*) - The defaults assume these tools are present.

Install dependencies on Fedora like system

$ sudo dnf -y install @development-tools
$ sudo dnf -y install bats check make meson moreutils nasm ninja-build yasm

Install dependencies on Debian / Ubuntu like system

Notes:

  • The version of meson provided by Ubuntu is too old, so you need to install a more recent version using pip.

  • If you want to run the BATS tests, you will need to be running Ubuntu 22.10 or newer to install bats version 1.5.0+. Alternatively, you can install it manually.

$ sudo apt -y install bats build-essential check errno make nasm ninja-build python3-pip yasm
$ python3 -m pip install meson

Usage

Show help information

$ abox
$ abox help
$ abox -h
$ abox --help

Show available commands

$ abox -l
$ abox --list

Run a command

$ abox echo 'Hello from abox!'

Build

Development build

$ make && make test

Release build

$ make RELEASE=1 && make test

Install

FIXME: / TODO:

  • Installing the binary.
  • Creating the sym-links.