balena-os / balena-beaglebone

Balena support for Beaglebone boards
https://www.balena.io/os/
Apache License 2.0
21 stars 18 forks source link

Octalbonescript doesn't work on latest BBB image #138

Open shaunmulligan opened 6 years ago

shaunmulligan commented 6 years ago

Using this repo (https://gitlab.com/natecontrols-public/resin-octalbonescript-poc.git) to reproduce the issue. One can see that GPIO and UART is correctly initiated, and the code runs as follows: On resinOS 2.4.2

16.02.18 10:32:16 (+0000) /sbin/udevd
16.02.18 10:32:26 (+0000) GPIO in opened.
16.02.18 10:32:26 (+0000) Serial port opened.

but on ResinOS v2.7.5

16.02.18 10:30:55 (+0000) /sbin/udevd
16.02.18 10:31:04 (+0000)
16.02.18 10:31:04 (+0000) /usr/src/app/node_modules/octalbonescript/lib/bone.js:289
16.02.18 10:31:04 (+0000)                 throw new verror(err2, 'Write to CapeMgr slots failed');
16.02.18 10:31:04 (+0000)                 ^
16.02.18 10:31:04 (+0000) VError: Write to CapeMgr slots failed: EEXIST: file already exists, write
16.02.18 10:31:04 (+0000)   at onWriteSlots (/usr/src/app/node_modules/octalbonescript/lib/bone.js:289:23)
16.02.18 10:31:04 (+0000)   at onReadSlots (/usr/src/app/node_modules/octalbonescript/lib/bone.js:280:17)
16.02.18 10:31:04 (+0000)   at readSlots (/usr/src/app/node_modules/octalbonescript/lib/bone.js:260:13)
16.02.18 10:31:04 (+0000)   at Object.load_dt_sync (/usr/src/app/node_modules/octalbonescript/lib/bone.js:251:9)
16.02.18 10:31:04 (+0000)   at Object.load_universal_cape (/usr/src/app/node_modules/octalbonescript/lib/bone.js:144:24)
16.02.18 10:31:04 (+0000)   at Object.<anonymous> (/usr/src/app/node_modules/octalbonescript/index.js:37:18)
16.02.18 10:31:04 (+0000)   at Module._compile (module.js:570:32)
16.02.18 10:31:04 (+0000)   at Object.Module._extensions..js (module.js:579:10)
16.02.18 10:31:04 (+0000)   at Module.load (module.js:487:32)
16.02.18 10:31:04 (+0000)   at tryModuleLoad (module.js:446:12)
16.02.18 10:31:04 (+0000)   at Function.Module._load (module.js:438:3)
16.02.18 10:31:04 (+0000)   at Module.require (module.js:497:17)
16.02.18 10:31:04 (+0000)   at require (internal/module.js:20:19)
16.02.18 10:31:04 (+0000)   at Object.<anonymous> (/usr/src/app/index.js:1:82)
16.02.18 10:31:04 (+0000)   at Module._compile (module.js:570:32)
16.02.18 10:31:04 (+0000)   at Object.Module._extensions..js (module.js:579:10)
16.02.18 10:31:04 (+0000)   at Module.load (module.js:487:32)
16.02.18 10:31:04 (+0000)   at tryModuleLoad (module.js:446:12)
16.02.18 10:31:04 (+0000)   at Function.Module._load (module.js:438:3)
16.02.18 10:31:04 (+0000)   at Module.runMain (module.js:604:10)
16.02.18 10:31:04 (+0000)   at run (bootstrap_node.js:383:7)
16.02.18 10:31:04 (+0000)   at startup (bootstrap_node.js:149:9)
16.02.18 10:31:04 (+0000)   at bootstrap_node.js:496:3

Front logo Front conversations

shaunmulligan commented 6 years ago

I think the update of the overlays here: https://github.com/resin-os/resin-beaglebone/commit/2c24080c795ce73889b8e2489ebd198f650030e8 caused this issue but not sure if it is something the octalbonescript library should handle?

It also appears that octalbonescript is now abandoned as it says this on the repo:

This package is abandoned and no longer maintained. Please use https://www.npmjs.com/package/beaglebone-io to interact with BeagleBone and its variants.