OpenWrt Forum Archive

Topic: Node and "Illegal instruction" error

The content of this topic has been archived on 6 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

I am trying to run HomeBridge on my Asus WL-500GP V1, so I need to install Node. I built an image from trunk with a kernel including CONFIG_MIPS_FPU_EMULATOR=y. I don't see any mentions of FPU in dmesg or cpuinfo, but I have a folder "/sys/kernel/debug/mips/fpuemustats/" -- so I suppose FPU emulation is working. I installed Node from the trunk repository. When I run it however, I get "Illegal instruction".

Any ideas what I am doing wrong?

Thank you and best regards!

root@OpenWrt:~# node -v
v6.11.2

root@OpenWrt:~# node
Illegal instruction

root@OpenWrt:~# uname -a
Linux OpenWrt 4.1.35 #3 Thu Nov 2 09:42:01 UTC 2017 mips GNU/Linux

root@OpenWrt:~# ls /sys/kernel/debug/mips/fpuemustats/
cp1ops             ds_emul            errors             ieee754_invalidop  ieee754_underflow  loads
cp1xops            emulated           ieee754_inexact    ieee754_overflow   ieee754_zerodiv    stores

root@OpenWrt:~# cat /proc/cpuinfo
system type             : Broadcom BCM4704
machine                 : Unknown Board
processor               : 0
cpu model               : Broadcom BMIPS3300 V0.6
BogoMIPS                : 262.96
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector  : yes
hardware watchpoint     : no
isa                     : mips1 mips2 mips32r1
ASEs implemented        :
shadow register sets    : 1
kscratch registers      : 0
package                 : 0
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available

First attempt to fix it would be to include node in the image and build it along the actual firmware.

Installing packages from the snapshot repo to a private build is dangerous by definition. Quite possible that you have slightly different kernel options etc.

Hi,

thank you for the quick reply. I didn't manage to build node from trunk (ERROR:root:code for hash sha224 was not found), so I built a new image incl. node from Chaos Calmer. After installation I still get "Illegal instruction".

Any additional ideas what I am doing wrong?

Thank you and best regards!

root@OpenWrt:~# node -v
v0.12.7

root@OpenWrt:~# node
Illegal instruction

root@OpenWrt:~# uname -a
Linux OpenWrt 3.18.75 #3 Fri Nov 3 19:48:18 STD 2017 mips GNU/Linux

root@OpenWrt:~# ls /sys/kernel/debug/mips/fpuemustats/
cp1ops             emulated           ieee754_inexact    ieee754_overflow   ieee754_zerodiv    stores
cp1xops            errors             ieee754_invalidop  ieee754_underflow  loads

root@OpenWrt:~# cat /proc/cpuinfo
system type             : Broadcom BCM4704
machine                 : Unknown Board
processor               : 0
cpu model               : Broadcom BMIPS3300 V0.6
BogoMIPS                : 262.96
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector  : yes
hardware watchpoint     : no
isa                     : mips1 mips2 mips32r1
ASEs implemented        :
shadow register sets    : 1
kscratch registers      : 0
package                 : 0
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available

The discussion might have continued from here.