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

Can you add more supported platforms in releases ? #8

Open
Baltazar500 opened this issue Apr 14, 2021 · 5 comments
Open

Can you add more supported platforms in releases ? #8

Baltazar500 opened this issue Apr 14, 2021 · 5 comments

Comments

@Baltazar500
Copy link

Hi.

Can you add more supported platforms in releases ? armv7 & aarch64 (android), MIPS (le), etc?

sorz added a commit that referenced this issue Apr 15, 2021
Following platforms are added:

- armv7-unknown-linux-gnueabihf
- aarch64-linux-android --release
- mips-unknown-linux-musl
@sorz
Copy link
Owner

sorz commented Apr 15, 2021

Hi,

Following platform are added:

  • armv7-unknown-linux-gnueabihf
  • aarch64-linux-android
  • mips-unknown-linux-musl

They can be built but I haven't actually test them on corresponding platforms.

More available platforms are listed on cross#supported-targets, notify me if you need some specific ones.

@Baltazar500
Copy link
Author

They can be built but I haven't actually test them on corresponding platforms.

My understanding of platforms is poor :(

The program also needs to work under linux i586/i686 (for "normal" x32 / x86 linux)

Under armv7 (android 4.2.2), the utility did not work for me

-bash-4.4# strace moproxy
execve("/data/tools/bin/moproxy", ["moproxy"], 0xbecee7d0 /* 40 vars */) = -1 ENOENT (No such file or directory)
fstat64(2, {st_mode=S_IFCHR|0622, st_rdev=makedev(136, 6), ...}) = 0
write(2, "strace: exec: No such file or di"..., 40strace: exec: No such file or directory
) = 40
getpid() = 16539
exit_group(1) = ?
+++ exited with 1 +++

Maybe need a static linux binary?

mips-unknown-linux-musl didn't work on my router

-bash-4.4# strace /opt/tools/bin/moproxy_0.3.9_linux_mips_musl.bin --help
execve("/opt/tools/bin/moproxy_0.3.9_linux_mips_musl.bin", ["/opt/tools/bin/moproxy_0.3.9_lin"..., "--help"], [/* 23 vars */]) = -1 ENOEXEC (Exec format error)
brk(0x743000) = 0x743000
write(2, "strace: exec: Exec format error\n", 32strace: exec: Exec format error
) = 32
exit_group(1) = ?
+++ exited with 1 +++

Here is the router info :

-bash-4.4# cat /proc/cpuinfo
system type : MediaTek MT7620 SoC
processor : 0
cpu model : MIPS 24KEc V5.0
BogoMIPS : 385.02
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : yes
hardware watchpoint : yes, count: 4, address/irw mask: [0x0000, 0x0ffc, 0x0ff8, 0x0ffb]
ASEs implemented : mips16 dsp
shadow register sets : 1
kscratch registers : 0
core : 0
VCED exceptions : not available
VCEI exceptions : not available

-bash-4.4# uname -a
Linux Keenetic_Omni 3.4.113 #1 Tue Oct 2 15:54:02 MSK 2018 mips GNU/Linux

@sorz
Copy link
Owner

sorz commented Apr 22, 2021

Sorry, I'm not familiar with cross-compilation either.
If anyone figures out how to actually cross-compile it for common platforms, I'm happy to add them to the build script.

You may try it yourself, here is what I did, for a reference:

  • Install rustup and Docker on Linux; start Docker daemon
  • cargo install cross
  • On moproxy source folder, run cross build --release --target TARGET-TRIPLET
    TARGET-TRIPLET can be found on cross#supported-targets
  • Find the binary on target/TARGET-TRIPLET/release/moproxy

Under armv7 (android 4.2.2), the utility did not work for me

I guess armv7-linux-androideabi is the right one for Android.

@Baltazar500
Copy link
Author

Sorry, I'm not familiar with cross-compilation either.

OK. I will try to find more information on this issue.

I guess armv7-linux-androideabi is the right one for Android.

Can you compile ? Then I could test it on my device.

p.s. Can you compile the releases for linux i586/i686 (I will check their work on AntiX (Debian) x86/x32) ?

@Docop2
Copy link

Docop2 commented Jun 1, 2021

Perhaps just a .appimage can be the solution as to support mostly all system, like Centos7, ...

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

No branches or pull requests

3 participants