Recompile firmware for Orange pi

Is there a way to re-compile the firmware used with the raspberry pi agent so that it can run on the orange pi? I understand that I’ll need to map I/O pins and such.

Ping @jvanier

I’m getting this as an error right now.

/usr/lib/ruby/vendor_ruby/particle_agent/firmware_runner.rb:70:in spawn': No such file or directory - /var/lib/particle/devices/7ab7de1d8b94c769a949373b/firmware.bin (Errno::ENOENT) from /usr/lib/ruby/vendor_ruby/particle_agent/firmware_runner.rb:70:inrun_firmware’
from /usr/lib/ruby/vendor_ruby/particle_agent/firmware_runner.rb:25:in run!' from /usr/lib/ruby/vendor_ruby/particle_agent/agent.rb:37:inblock (2 levels) in start_firmware_runners’

when I investigate firmware.bin I am seeing that it likely isn’t a valid executable for my platform. Really it wouldn’t matter if it was as I would have to re-map I/O.

firmware.bin: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, interpreter /lib/, for GNU/Linux 4.3.0, stripped

Here are some hints to accomplish this.

I suggest you start with the Raspberry Pi firmware and tweak it until it builds for your platform.

The Raspberry Pi firmware is currently still on its own branch, not yet merged into the main firmware.

Compile it from the main folder with make PLATFORM=raspberrypi

You’ll may need to adjust the tools in the makefiles in the build folder.

You’ll also need to change how the pin mapping works in the Hardware Abstraction Layer (HAL) in hal/src/raspberrypi

Good luck!

1 Like

Hi all

Just wondered if there are any updates and if anyone got the OrangePi working?

Many thanks