Skip to content

arm/remoteproc-simulator

Repository files navigation

Remoteproc Simulator

A simulator for the Linux remoteproc subsystem that creates a fake sysfs interface for testing purposes. It allows you to simulate remote processor lifecycle management without requiring actual hardware.

Build

go build ./cmd/remoteproc-simulator

Test

go test ./...

Usage

Start the simulator daemon:

./remoteproc-simulator --root-dir /tmp/fake-root --index 0 --name dsp0

Control the simulated remote processor via sysfs:

# Prepare firmware file
touch /tmp/fake-root/lib/firmware/hello-world.elf

# Set firmware
echo hello-world.elf > /tmp/fake-root/sys/class/remoteproc/remoteproc0/firmware

# Start the remote processor
echo start > /tmp/fake-root/sys/class/remoteproc/remoteproc0/state

# Check status
cat /tmp/fake-root/sys/class/remoteproc/remoteproc0/state

# Stop the remote processor
echo stop > /tmp/fake-root/sys/class/remoteproc/remoteproc0/state

Inspect remote processor name:

cat /tmp/fake-root/sys/class/remoteproc/remoteproc0/name

Specify custom firmware load path:

# Set custom load path
echo /tmp > /tmp/fake-root/sys/module/firmware_class/parameters/path

# Prepare firmware file in custom path
touch /tmp/hi-universe.elf

# Set firmware
echo hi-universe.elf > /tmp/fake-root/sys/class/remoteproc/remoteproc0/firmware

# Start the remote processor
echo start > /tmp/fake-root/sys/class/remoteproc/remoteproc0/state

Installation from Releases

The release binaries are unsigned. On macOS, you'll need to remove the quarantine attribute before running:

xattr -d com.apple.quarantine ./remoteproc-simulator

About

A simulator for the Linux remoteproc subsystem

Resources

License

Security policy

Stars

Watchers

Forks

Contributors

Languages