nebrius / raspi-io

An IO plugin for Johnny-Five that provides support for the Raspberry Pi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for other OSes

nebrius opened this issue · comments

I think that Raspbian is the only OS raspi-io works on, although I'm not certain. We should confirm and make sure it does work on others, especially pidora.

Installing Ubuntu on my Pi 2 now. Will report back soon!

Ubuntu Core aside, we were going to use Ubuntu Mate to get easier access to a newer version of chromium.

Did you have any success with this @Frxnz ?

@wadtech This was a few months ago, but I had pretty bad luck with Ubuntu. Hopefully things have gotten better since then.

Cheers, I'll let you know how I get on then

please make rasp-io work on Arch Linux

Just for an update: it went really badly. Although it seemed that copying the vendor folder over from raspbian actually worked fine, it's just the install itself that wasn't right.

ymmv obviously.

@wadtech thanks for checking that out. If I were to guess, I would say it's because of https://github.com/nebrius/raspi-i2c/blob/master/script/enable_i2c.js

We'll probably need a different version of that script for each OS 😖

I tried to install an app using rapsi-io on a Raspberry Pi using the Resin platform.

I think this script caused the install to hang and then fail because it waits for user input.

It would be great to have a way to optionally disable these scripts from running, perhaps by setting an environment variable on install? The user would then be responsible for ensuring I2C is enabled on their platform.

Good idea @andrewn, I like it.

Is this something you need asap? I'm really swamped, and don't really have time to work on raspi-io at the moment, sadly.

Would you be willing to implement it? It should be pretty straightfoward. Just add a process.exit call towards the top of the enable_i2c script linked above

I had the same issue. There are potentially 2 problems with the i2c post install work:

  1. If you are not installing using sudo or are not root then you will be prompted for your password

  2. It assumes that /boot/config.txt is present. When running inside docker it won't be. I hacked around this by touch /boot/config.txt inside the container.

I'm going to check out resin.io right now but I might be able to get a PR in tomorrow, doing pretty much what you suggested @nebrius.

Ubuntu support is in!

Woooot! 🎉

Got it running beautifully in Arch ARM, for future reference.

Hi @philraj,
It will work out of the box ?

@Swizz I guess it depends on your definition of 'out of the box'. :)

I had some weird issues with the build process (npm was installing modules into the wrong folders), but running rm -rf node_modules and reinstalling raspi-io fixed it.

@philraj I tried it.

Something weird happened. All gyp packages have needed to be build separately.
It is truly blocking in a push-to-deploy philosophy.

This issue has been open for a long time now, and I haven't made any progress on adding other OS's. Sorry, but it's not a priority for me.

That said, raspi-io has been reworked so that it has a much more modular architecture now. If someone needs a new OS supported that isn't supported out of the box, you can roll your own a lot more easily now. Take a look at https://github.com/nebrius/raspi-io/blob/master/src/index.js to see how to inject the OS-specific dependencies into raspi-io-core.

I'm closing this issue now, thank you everyone who participated and left feedback!

In case anyone uses ArchLinux, I've written up a little how to:
https://medium.com/@WebReflection/how-to-raspi-io-on-archlinux-5d59229e5763

use it make Last few GCs