Skip to content

Node fails to start on MTK7620: "Illegal instruction" #4818

Closed
@Nicholasny

Description

@Nicholasny

I cross compiled nodejs for a MIPSel target (without FPU but FPU emulation in the kernel) using the OpenWRT 15.05 Chaos Calmer toolchain. The target CPU is an MT7620A

I compile using:
./configure --without-snapshot --dest-cpu=mipsel --dest-os=linux --without-npm --without-ssl --without-etw --without-perfctr --with-mips-float-abi=soft

However then I run into the problem is describing.
"Illegal instruction"
on any of the js files in the test directory.
I can execute node -v, but not node test.js, or node debug test.js

information see below:

root@OpenWrt:/# cat /proc/cpuinfo
system type     : MediaTek MT7620A ver:2 eco:3
machine         : Ralink MT7620a + MT7610e evaluation board
processor       : 0
cpu model       : MIPS 24KEc V5.0
BogoMIPS        : 385.84
wait instruction    : yes
microsecond timers  : yes
tlb_entries     : 32
extra interrupt vector  : yes
hardware watchpoint : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa         : mips1 mips2 mips32r1 mips32r2
ASEs implemented    : mips16 dsp
shadow register sets    : 1
kscratch registers  : 0
package         : 0
core            : 0
VCED exceptions     : not available
VCEI exceptions     : not available

root@OpenWrt:/# cat /proc/version
Linux version 3.18.23 (root@169da0c77da5) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r47992) ) #47 Thu Jan 21 00:54:13 UTC 2016

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

root@OpenWrt:/# which  node
/usr/bin/node

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

root@OpenWrt:/# ldd /usr/bin/node
    libz.so.1 => /usr/lib/libz.so.1 (0x77881000)
    libssl.so.1.0.0 => /usr/lib/libssl.so.1.0.0 (0x77823000)
    libcrypto.so.1.0.0 => /usr/lib/libcrypto.so.1.0.0 (0x776be000)
    librt.so.0 => /lib/librt.so.0 (0x776aa000)
    libdl.so.0 => /lib/libdl.so.0 (0x77696000)
    libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x775ae000)
    libm.so.0 => /lib/libm.so.0 (0x77588000)
    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x77564000)
    libpthread.so.0 => /lib/libpthread.so.0 (0x7753e000)
    libc.so.0 => /lib/libc.so.0 (0x774d2000)
    ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x778a4000)

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildIssues and PRs related to build files or the CI.mipsIssues and PRs related to the MIPS architecture.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions