First of all, thank the effort in creating this wonderful tool.
I would like to know if someone has managed to install and run rclone on an LEDE-OpenWRT router with the SoC MediaTek MT7621A. I know that with ARM SoCs it is possible, but I have not seen much information about more modest SoC. I suppose I should use a MIPS version. I have tried both versions; (BE and LE) and the executable does not start.
Sorry for the short information in the question. I’m a completly noob about this.
Maybe, the first question would be what is the MIPS version I’d have to use; little or big Endian. I don’t know what is the diference? I have the zip in the PC. Files extracted. I copied rclone and rclone.1 to the LEDE router. I give chmod +x rigths to the rclone file and it doesn’t work.
I don’t know if is there anyway to make a cleaner installation.
Ah OK. Looks like the little endian version is the correct one.
I suspect that your processor doesn’t have a floating point unit. This is implied in the product datasheet for the 1004K series. The go runtime requires a floating point by default. However there is a compile time switch to fallback to software floating point GOMIPS.
I’ve uploaded a version of rclone compiled using the emulated floating point here:
With this version I have the same “Illegal instruction” message. Also, I noticed that the size of this version is almost twice than the original LE. Is it normal?
Finally I installed gdb and run the command. This is the result:
root@LEDE:/tmp# gdb rclone help
GNU gdb (GDB) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "mipsel-openwrt-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from rclone...done.
/tmp/help: No such file or directory.
warning: Unsupported auto-load script at offset 0 in section .debug_gdb_scripts
of file /tmp/rclone.
Use `info auto-load python-scripts [REGEXP]' to list them.
(gdb)
Program received signal SIGILL, Illegal instruction.
runtime.check () at /opt/go/go1.10/src/runtime/runtime1.go:146
146 /opt/go/go1.10/src/runtime/runtime1.go: No such file or directory.
(gdb) Quit
I’ve compiled a simple hello world program 8 different ways - can you try running each of the binaries? If it works it should print “Hello World”.
Ah, well that is working much better - the go runtime has started up and is alive enough to give a sensible backtrace.
It looks like it crashed in some floating point activities, so maybe your board doesn’t support hardfloat after all (I didn’t test floating point in my hello world test - I probably should have).
OK, so here is a version compiled with softfloat…
$ go version
go version devel +f94b5a8105 Sat May 12 06:21:01 2018 +0000 linux/amd64
$ GOARCH=mipsle GOMIPS=softfloat GOOS=linux go build -ldflags '-s'
In that error it appears to be making a floating point number, so it still seems like it is something to do with floating point numbers.
Ah, I see from a bit of reading that I need to clean the build environment when swapping between hardfloat and softfloat
So building with
$ go version
go version devel +f94b5a8105 Sat May 12 06:21:01 2018 +0000 linux/amd64
$ GOARCH=mipsle GOMIPS=softfloat GOOS=linux go build -a -v -ldflags '-s'