Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MIPS binary release #589

Closed
qokelate opened this issue Feb 19, 2019 · 22 comments
Closed

Add MIPS binary release #589

qokelate opened this issue Feb 19, 2019 · 22 comments

Comments

@qokelate
Copy link

I want run at openwrt, https://openwrt.org/

@ameshkov
Copy link
Member

Hi, we haven't tested it on mips yet.

Can you check if it works if I build it for you?
Do you need mipsle or mips64le?

@qokelate
Copy link
Author

Yet, i can test, but i don't know 32 or 64, it's MT7620A device, installed software binary file is: ELF 32-bit LSB executable, MIPS, MIPS32 version 1 (SYSV), statically linked, stripped, so i think is mipsle/mips32le?

You can send for me udf.q###qq.com, i will test it.

@ameshkov ameshkov added this to the v0.94 milestone Feb 20, 2019
@ameshkov
Copy link
Member

Got it, thank you! I'll send you a binary after v0.93 is released

@qokelate
Copy link
Author

I installed go1.11.2 darwin/amd64 and download with go get github.com/AdguardTeam/AdGuardHome, but take a error:

# github.com/AdguardTeam/AdGuardHome/dnsforward
AdguardTeam/AdGuardHome/dnsforward/dnsforward.go:94:46: cannot use "" (type string) as type []string in argument to upstream.AddressToUpstream

So, I replace all upstream.AddressToUpstream(addr, "", DefaultTimeout) to upstream.AddressToUpstream(addr, []string{""}, DefaultTimeout), it works now!

Thanks Very Much!

BTW: My build command is GOARCH=mipsle GOOS=linux GOMIPS=softfloat go build -ldflags "-s -w", it must set GOMIPS=softfloat, because openwrt default build settings is not enable FPU emulator, if missing, it will take illegal hardware instruction Error!

@ameshkov
Copy link
Member

Well, it seems as if you have go modules disabled.

You should git clone AdGuard to some place outside of your GOPATH and then run make

@ameshkov
Copy link
Member

Check release.sh to see how we build platform-specific binaries, that will give you the idea on how to build it for MIPS.

@qokelate
Copy link
Author

Okay, thanks!

@ameshkov
Copy link
Member

Oh, please don't close it yet, I am interested in the result:)

If it works okay, we might add an official build as well. Just one important thing: MIPS is quite slow so I'd recommend changing upstream settings so that it used some regular plain DNS instead of the encrypted DNS-over-TLS that we have there by default.

@ameshkov ameshkov reopened this Feb 20, 2019
@qokelate
Copy link
Author

OKay, i will try before this, my solution is dnsmasq+dnscrypt-proxy, maybe i can remove some rules to save
I will report again after some days

@ameshkov ameshkov self-assigned this Feb 20, 2019
@qokelate
Copy link
Author

It's high cpu usage, so, i back to dnscrypt-proxy.

@qokelate
Copy link
Author

Maybe released binary, let the user choose

@ameshkov
Copy link
Member

It's high cpu usage, so, i back to dnscrypt-proxy.

Have you changed the upstreams settings as I suggested here?
#589 (comment)

You see, DNS-over-TLS would be extremely slow on MIPS CPUs, hence the high cpu usage.

@qokelate
Copy link
Author

I will try tcp later, i cann't get the right dns with udp(DNS cache pollution).

@ameshkov
Copy link
Member

Hi, here's a MIPS and MIPSLE binaries I've just built for you:

AdGuardHome_v0.93-dirty_linux_mips.tar.gz
AdGuardHome_v0.93-dirty_linux_mipsle.tar.gz

When you run it for the first time, it will use plain DNS by default when MIPS is detected.

@qokelate
Copy link
Author

It looks not include FPU emulator, GOMIPS=softfloat

# mipsle
>./AdGuardHome -h
[1]    1737 illegal hardware instruction  ./AdGuardHome -h

# mips
>./AdGuardHome -h
zsh: exec format error: ./AdGuardHome

@qokelate
Copy link
Author

qokelate commented Feb 28, 2019

I am running 0.92 and use DNS-over-HTTPS, it works well!

@qokelate qokelate reopened this Feb 28, 2019
@ameshkov
Copy link
Member

Could you please try this?

AdGuardHome_v0.93-1-gbd31-dirty_linux_mipsle.tar.gz

@ameshkov ameshkov changed the title Add mipsle binary release? Add MIPS binary release Feb 28, 2019
@qokelate
Copy link
Author

It works. Thanks!

@qokelate
Copy link
Author

2 features request(optional):

  1. add --pidfile argument(save self pid to file)
  2. add symbol link config support(if changed any settings on web, adguard will overwrite symbol link file)

@ameshkov
Copy link
Member

@qokelate could you please create new issues for both feature requests?

ameshkov added a commit that referenced this issue Mar 22, 2019
Closes #593
Closes #589

* commit '6edfe1bb8e5db8a38104b69bb436736195fa6980':
  Add GOMIPS=softfloat
  More platforms
@xman55555
Copy link

https://github.com/rufengsuixing/luci-app-adguardhome/releases 这个是界面么,没有程序,有木有编译好的?

@rufengsuixing
Copy link

https://github.com/rufengsuixing/luci-app-adguardhome/releases 这个是界面么,没有程序,有木有编译好的?

界面可以自动下程序

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants