Comments (14)
went ahead and added all the goarch options that did compile with the code. I can't guarantee all the features will work though
from db1000n.
Ok) OpenWRT 19.07.8 on MikroTik SXT Lite2 CPU 600MHz AR9344 mips kernel-4.14.241
[17:15][root@OpenWrt:~]# nice -n 19 .bins/db1000n
Illegal instruction
:)
from db1000n.
mipsle maybe?
https://go.dev/doc/install/source#environment
| linux | mips
| linux | mipsle
| linux | mips64
| linux | mips64le
from db1000n.
with mipsle :)
[17:25][root@OpenWrt:~]# .bins/db1000n
.bins/db1000n: line 1: syntax error: unexpected "("
It is MIPSBE :)
https://mikrotik.com/product/RBSXT2nDr3
need to compile for MIPSBE ....
from db1000n.
Based on what I'm seeing, I'm not sure go can cross compile for mipsbe but I'll check a bit more thoroughly in couple hours
from db1000n.
UPD: according to all the docs I've found mipsbe should be just mips. Go has an option to compile hardfloat vs softfloat (default being only hardfloat) though, maybe that could be the missing part?
from db1000n.
Ideally we'd want to try and install go on that machine and inspect env variables it sets here
https://go.dev/doc/install/source#environment
Not sure you'd be able to easily install go on microtik but in case softfloat doesn't work it's worth a try
from db1000n.
No) I can't install go 99.5 MB) there's not enough space) available 101.5 MB :)
from db1000n.
Have you tried mips_softfloat?
from db1000n.
yes
[08:55][root@OpenWrt:~]# nice -n 19 .bins/db1000n
Segmentation fault
from db1000n.
hmm, I think segfault in this case means that this is the architecture to use but there's a bug somewhere in the code itself that doesn't present itself on other systems (maybe some of the packages used have some bugs or logic that doesn't work for softfloat or smth like that).
I'll either need to setup a VM for that or get some sort of debug build that would at least print out the goroutines when getting that segfault, I'll check what is easier during the weekend
from db1000n.
so I've tried running mips binary via qemu and it seems to be working fine (weirdly enough it works both with softfloat and hardfloat)
As for "debug" build - I haven't managed to make a code that would produce such an error message. the one I'm getting is a lot more descriptive:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x76f88a]
goroutine 1 [running]:
go.uber.org/zap.(*Logger).check(0x0, 0x0, {0xcaafb1, 0xf})
/home/arriven/go/pkg/mod/go.uber.org/[email protected]/logger.go:270 +0x6a
go.uber.org/zap.(*Logger).Info(0xc0001a8120?, {0xcaafb1?, 0xa?}, {0x0, 0x0, 0x0})
/home/arriven/go/pkg/mod/go.uber.org/[email protected]/logger.go:191 +0x3b
main.main()
/home/arriven/work/db1000n/main.go:67 +0x2b3
you could try building the executable yourself on your main OS with GOOS=linux GOARCH=mips GOMIPS=softfloat go build -o db1000n
but I'm not sure it will be more descriptive on your system
from db1000n.
@1o1o1 I think I know what the issue is. How much RAM does that router have? db1000n needs at least 200mb to be able to run properly (and you'd need to provide --skip-encrypted
argument, otherwise it's up to 500mb). I just tried running it in qemu with 100mb RAM and it does end up catching a panic (although it's still more descriptive)
I doubt I'll be able to optimize memory usage away without sacrificing functionality but we could figure out some alternatives (i.e. https://github.com/Yneth/distress-releases/releases which doesn't have mips support yet but I could talk to the author in theory)
from db1000n.
:) MikroTik SXT Lite2 CPU 600MHz AR9344 (--> RAM 64Mb <--) NAND 128Mb
with 256-512Mb is too much expensive and usually with arm cpu :)
from db1000n.
Related Issues (20)
- Things to optimize - performance HOT 10
- Reference to db1000nX100 project HOT 1
- Error when pulling docker image HOT 1
- vpn load balancing script
- Simplify logs HOT 8
- Trojan HOT 3
- Scale up db1000n automatically in order to utilize all available system resources HOT 2
- Disk usage is increasing with Docker containers HOT 5
- Can you add limit download/upload speed? HOT 3
- Add more stats (cpu/memory load, amount of open connections, etc.)
- oom killed HOT 23
- prometheus.go:298: Can't push metrics to gateway HOT 2
- ERROR: HostClient can't follow redirects to a different protocol, please use Client instead HOT 1
- Config path is not available anymore for Digital Ocean deployment HOT 1
- Add new sites? HOT 2
- Non-cumulative stats HOT 1
- Build unsuccesful by go install HOT 4
- . HOT 2
- warn failed to fetch config {"path": "", "error": "open : no such file or directory"} ----how do I fix this?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from db1000n.