OpenWrt/LEDE Node.js Packages : for trunk / openwrt-18.06
Note: The test target is only ar71xx. It will probably work with MT7688(mipsel) and Raspberry Pi(arm, aarch64).
See LICENSE file.
Add the following line to feeds.conf or feeds.conf.default.
src-git node https://github.com/nxhack/openwrt-node-packages.git
Run
./scripts/feeds update node
rm ./package/feeds/packages/node
rm ./package/feeds/packages/node-*
./scripts/feeds install -a -p node
OpenWrt Attitude Adjustment(12.09), Barrier Breaker(14.07), Chaos Calmer(15.05) , LEDE(17.01) are not supported.
If you want to use with Chaos Calmer(15.05), see for-15.05 branch
If you want to use with LEDE (17.01), see lede-17.01 branch
V8 JIT code generates FP instruction. Node.js does not work without hardware FPU or kernel FPU emulation.
If you are running nodejs with Atheros AR71xx, AR933x, you need to create the kernel using the MIPS_FPU_EMULATOR option.
(This means that you need to rebuild the firmware.)
You can configure using menuconfig.
make menuconfig
Global build settings --->
Kernel build options --->
[*] Compile the kernel with MIPS FPU Emulator
ARM cores without vfp or neon (such as bcm53xx) will not work either. In this case, there is no solution.
Processor | ICU | Inspector |
---|---|---|
32bit | Disable | NO |
32bit | small-icu | YES |
32bit | system-icu | NO |
64bit | Disable | NO |
64bit | small-icu | YES |
64bit | system-icu | YES |
Debugging Guide Nice to use Chrome DevTools.
If you use node-homebridge(node-hap-nodejs), please install mDNS package (umdns / avahi-dbus-daemon / mdnsresponder).
(1) Some OpenWrt / Lede images have built in dnscrypt-proxy package, which by default listening on 5353 port.
In that case, installed avahi-daemon will not start on ipv4 interface, only on ipv6 because ipv4 port is taken.
This will lead to strange issue: your homebrdge accessory will be visible in 'Home' app, but can't finish pairing.
To fix this, you have to stop and disable dnscrypt-proxy
Also, you have to enable: dbus and avahi-daemon services to start automatically, i.e for Lede:
/etc/init.d/dbus enable
/etc/init.d/avahi-daemon enable
(2) avahi on home network
Please read this document. 'Why avahi and bonjour don't work on your home network'
IGMP-querier will solve your problem.
OpenWrt custom packages available: https://github.com/nxhack/openwrt-custom-packages
Specify v8-options.
--max_old_space_size=20 --initial_old_space_size=4 --max_semi_space_size=2 --max_executable_size=5 --optimize_for_size
Or use swap.
node-alljoyn [mark @BROKEN]
node-arduino-firmata (serialport)
node-authenticate-pam
node-bignum
node-binaryjs (streamws)
node-bleacon (bluetooth-hci-socket)
node-bluetooth-hci-socket (usb)
node-bufferutil
node-cylon-firmata (firmata)
node-ejdb
node-enocean-utils (serialport)
node-epoll
node-expat
node-ffi (ffi, ref)
node-firmata (serialport)
node-fuse-bindings
node-hap-nodejs (curve25519-n, ed25519-hap)
node-hashtable
node-hid
node-hid-stream (node-hid)
node-homebridge (hap-nodejs)
node-i2c-bus
node-ideino-linino-lib (epoll)
node-johnny-five (serialport)
node-level (leveldown)
node-leveldown
node-mdns [need select 'y'[*] libavahi-compat-libdnssd for InstallDev libdns_sd.so]
node-mknod
node-muzzley-client (ws[legacy])
node-net-ping (raw-socket)
node-nitrogen (ws[legacy])
node-nitrogen-cli (ws[legacy])
node-onoff (epoll)
node-pi-spi
node-red (bcrypt)
node-red-contrib-gpio (johnny-five)
node-red-contrib-homekit (hap-nodejs)
node-red-contrib-modbus (@serialport/bindings)
node-red-node-arduino (firmata)
node-reverse-wstunnel
node-rpi-gpio (epoll)
node-rpio
node-serialport (@serialport/bindings)
node-serialport-bindings (@serialport/bindings)
node-sleep
node-socket.io-client-legacy (ws[legacy])
node-socket.io-legacy (ws[legacy])
node-spi-device
node-sqlite3
node-statvfs
node-usb
node-utf-8-validate
Other modules can be installed by 'npm install'.
If you want a new module (native module) that requires a precompiled binary, please open the issue.
See CONTRIBUTING.md file.