I’ve been playing around with resinOS (not resin.io), trying to deploy a simple project that uses node.js and Johnny-Five to light up some LEDs on a Raspberry Pi 2 Model B.
This usually works really well on Raspbian Jessie on the Raspberry Pi but on ResinOS I get a modprobe error when the container starts:
?modprobe: ERROR: could not insert 'i2c_dev': Exec format error
I’ve created a minimal test case on github that should:
- install wiring pi
- install Johhny-Five and the Raspi-IO adapter code
- light up an LED connected to wiring pi pin 1
Pushing the container using
rdt push --source . seems to build fine. But, once built the container continually restarts.
$ rdt logs (node:42141) DeprecationWarning: Using Buffer without `new` will soon stop working. Use `new Buffer()`, or preferably `Buffer.from()`, `Buffer.allocUnsafe()` or `Buffer.alloc()` instead. Reporting discovered devices ? select a device resin.local (192.168.178.45) ? Select a container /resin-johnny-five-example (3134aee1361) - Restarting (1) About a minute ago ?modprobe: ERROR: could not insert 'i2c_dev': Exec format error
I read here that
modprobe i2c-dev was necessary and I’ve added that to the
RUN command in my Dockerfile.
Can anyone give me some pointers on what I’m doing wrong?