chGoodchild / TollGateNostrToolKit

0 stars 0 forks source link

Signing binary doesn't run on GLAR300m Router #1

Closed chGoodchild closed 3 months ago

chGoodchild commented 3 months ago
root@GL-AR300M:/tmp# ./sign_event_mips
sign_event_mips          sign_event_mips_dynamic
root@GL-AR300M:/tmp# ./sign_event_mips
Illegal instruction
root@GL-AR300M:/tmp# ./sign_event_mips_dynamic 
-ash: ./sign_event_mips_dynamic: not found
root@GL-AR300M:/tmp# file sign_event_mips_dynamic
sign_event_mips_dynamic: ELF 32-bit MSB executable, MIPS, MIPS32 rel2 version 1 (SYSV), dynamically linked, interpreter /lib/ld.so.1, BuildID[sha1]=e1fa454e658c0d5c32507ea7422832bd0948f3ba, for GNU/Linux 3.2.0, with debug_info, not stripped
root@GL-AR300M:/tmp# file sign_event_mips
sign_event_mips: ELF 32-bit MSB executable, MIPS, MIPS32 rel2 version 1 (SYSV), statically linked, BuildID[sha1]=854b7a352092be8d2481d64a69f34878c0c3765d, for GNU/Linux 3.2.0, with debug_info, not stripped
chGoodchild commented 3 months ago

I get this error despite having set the machine architecture -march=mips32r2

https://github.com/chGoodchild/nostrSigner/blob/b87db1463601ce17205baf1dd343e226e20e05c7/build.sh#L144-L237

chGoodchild commented 3 months ago

Fixed this by building with the OpenWRT SDK