Does node.js not include packages in opkg yet?
Please let me know how to node.js install to omega.
.# opkg update
.# opkg install node
Unknown package 'node'
Check out this comment on the Kickstarter page.
"We have been able to get a very old version of Node.js to work with the Omega, but since nodejs and iojs merged, their support for mips architecture has been very bad. We are still working on getting the latest iojs/nodejs to work with the Omega.
Thank you Dan,
I'm looking forward to next week!
Looking very much forward to it. Node on this device was one of the reasons to try it and support the project.
Same here, hopefully we get a GPIO wrapper/library for Node early on.
I won't count this team out, but I am a little pessimistic about NodeJS support on the omega. The Omega is running OpenWRT, so I spent a little time rummaging through their documentation. There were a couple of people that tried to get Node running on OpenWRT with mixed success and abandoned the project. That said, not everything works with the 4.0 version of Node, so 1.0.12 is not that old. Not sure what version might show up for Omega.
@Chris-Ward The version we have working for OpenWRT is very, very old. 0.10.36. :(
Yea, that is kinda old :-) I just started looking at the IOT.js package, and it looks promising, but in early stages it would appear. They looks to be trying to support GPIO directly too. IOT.js might work better in a memory constrained device.
I'm currently trying to get OpenWRT from allseenalliance built from the master branch, which is currently similar to chaos_calmer openwrt build as per the latest deployed firmware (they did it for alljoyn on the ar71xx family of chips). Once that is done, I'm going to try and cross-compile node.js from source as per https://github.com/netbeast/docs/wiki/Cross-Compile-Nodejs-for-OpenWrt
I'm now beginning to think that the former is failing due to onerous firewalls and network rules preventing me from downloading source tarballs :( However, once that is resolved, I should be able to make some progress on seeing if node.js is even possible to be cross-compiled, much less usable on the omega.
This also is ignoring that someone has seemingly been successful getting this compiled at: https://github.com/nneves/openwrt_mips_ar9331_nodejs
out/Release/node: ELF 32-bit MSB executable, MIPS, MIPS32 rel2 version 1, dynamically linked (uses shared libs), not stripped
Seems I did something nominally right? . . .
@Theodore-Borromeo We have followed that guide to get nodejs compiled. However, the compiled binary had no problem showing its version, but when you get to run any command, it will crash. New versions of nodejs won't even compile... :(
@Boken-Lin I think that mine will crash, as I think it was built with a dependency on musl c lib, which I'll have to get on the device as well. Not to mention that I need v8 too. I was just surprised that I got something to spit out. This is, as well, ignoring whatever complications I may have introduced to the process by taking from allseenalliance for their work on openWRT for Atheros chipsets. . .
I understand that this may not work. It is just nice to make some progress. Did Onion Omega come preloaded with tools to on device to aid in debugging? Alternatively, is there any way to make public the source and feeds you all used to get chaos_calmer built? That would probably be the easiest way for the community to aid in getting a workable solution, no?
just found your post at: https://github.com/OnionIoT/OpenWRT-Packages/wiki/Setting-Up-the-Cross-Compile-Environment
I'll probably have to redo from there and figure out a way to incorporate some of what was done at: https://github.com/nneves/openwrt_mips_ar9331_nodejs
into a docker container.
@Theodore-Borromeo Dock is actually a great idea. We should probably make a docker image for the community to download so that everyone can create a build environment very quickly.
@Boken-Lin I can do that for you. Can you forward me the links necessary to setup an environment and the debian /ubuntu version you all depend on? From there, I can put something together. For reference of what I did know, please take a look at: https://github.com/borromeotlhs/docker-onion-omega
I'll be automating setting OpenWRT variables and .configs for OpenWRT later. Those should be automatically prepared for insertion into the docker container so that 'make' can just run while building the docker container (thus giving the built and completed toolchain straight off with no fuss). This will then also allow you all to normalize the 'distro' and include via a prefilled .config, those packages that you think should be allowed for optional install/build by folks who have enough savvy to build the packages themselves.
@Theodore-Borromeo This is what we use to set up our compile environment: https://github.com/OnionIoT/OpenWRT-Packages/wiki/Setting-Up-the-Cross-Compile-Environment
We usually use the latest Ubuntu version.
Let me know if you need any other information to get this started.
@Boken-Lin I am erroring out on the line:
what is that? I have never seen this format. Are you sure that this is an artifact that resolves for you all on a windows system with evernote installed? I think it'd be best to host fork of openwrt + whatever changes you have in whatever that link resolves to. If I can get that point resolved, I have found a way to eliminate all other hand configurable items by usings 'scripts/diffconfig' to create a .config file that will just roll into the docker build env source tree once I check it in.
@Theodore-Borromeo OOPS... We copy and pasted it from Evernote, and they must have their proprietary protocol to keep track of hyperlinks within notes. Fixed now :)
I can't get 'make' to work due to my firewall issues, and I do still need to:
- parameterize the number of cores to make
- Set the ENV variables to point to the OpenWRT toolchain ahead of the make succeeding (for node.js, at least)
Though I would love for someone to instantiate this and run 'make' to test that the image builds through.
Built from source using instructions from: