Entware / Entware-ng

Entware-ng
GNU General Public License v2.0
1.21k stars 152 forks source link

Plan to support ARM64 ? #796

Closed odkrys closed 6 years ago

odkrys commented 6 years ago

GOARCH=arm64 build programs seem to work on my RT-AC86U router. And its performance increase noticeably. Is there any plan to support this system ? Or because its user space still runs armv7, its support is limited?

/syncthing-linux-arm-v0.14.40-rc.4# ./syncthing
[monitor] 07:43:06 INFO: Starting syncthing
[start] 07:43:06 INFO: Generating ECDSA key and certificate for syncthing...
[MIZOD] 07:43:06 INFO: syncthing v0.14.40-rc.4 "Dysprosium Dragonfly" (go1.9.2 linux-arm) teamcity@build.syncthing.net 2017-10-28 19:15:3                                2 UTC
[MIZOD] 07:43:06 INFO: My ID: MIZOD6N-KNMIRUK-NBBISLI-2Y5Q4MT-QM5WXOH-AKH5LEF-P3QHUZN-HFOB2QT
[MIZOD] 07:43:07 INFO: Single thread SHA256 performance is 24 MB/s using minio/sha256-simd (24 MB/s using crypto/sha256).
[MIZOD] 07:43:07 INFO: Default folder created and/or linked to new config
[MIZOD] 07:43:07 INFO: Default config saved. Edit /root/.config/syncthing/config.xml to taste or use the GUI
[MIZOD] 07:43:08 INFO: Hashing performance with weak hash is 22.22 MB/s
[MIZOD] 07:43:09 INFO: Hashing performance without weak hash is 23.71 MB/s
[MIZOD] 07:43:09 INFO: Weak hash enabled, as it has an acceptable performance impact.
[MIZOD] 07:43:09 INFO: Starting deadlock detector with 20m0s timeout
syncthing-linux-arm64-v0.14.40-rc.4# ./syncthing
[monitor] 07:43:29 INFO: Starting syncthing
[MIZOD] 07:43:29 INFO: syncthing v0.14.40-rc.4 "Dysprosium Dragonfly" (go1.9.2 linux-arm64) teamcity@build.syncthing.net 2017-10-28 19:15:32 UTC
[MIZOD] 07:43:29 INFO: My ID: MIZOD6N-KNMIRUK-NBBISLI-2Y5Q4MT-QM5WXOH-AKH5LEF-P3QHUZN-HFOB2QT
[MIZOD] 07:43:30 INFO: Single thread SHA256 performance is 941 MB/s using minio/sha256-simd (24 MB/s using crypto/sha256).
[MIZOD] 07:43:31 INFO: Hashing performance with weak hash is 204.02 MB/s
[MIZOD] 07:43:31 INFO: Hashing performance without weak hash is 559.44 MB/s
[MIZOD] 07:43:31 INFO: Weak hash disabled, as it has an unacceptable performance impact.
[MIZOD] 07:43:31 INFO: Starting deadlock detector with 20m0s timeout

kcptun - ARMv7

none = 296 / 291 (Mbits/sec)
xor = 282 / 277
salsa20 = 272 / 266
aes-128 = 244 / 240
aes-192 = 239 / 235
aes-256 = 233 / 229

kcptun - ARM64

none = 432 / 432 (Mbits/sec)
xor = 420 / 409
salsa20 = 381 / 375
aes-128 = 403 / 397
aes-192 = 403 / 397
aes-256 = 400 / 395

cat /proc/cpuinfo

processor       : 0
BogoMIPS        : 100.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x42
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0x100
CPU revision    : 0

cpuid2cpuflags

CPU_FLAGS_ARM: edsp neon thumb vfp vfpv3 vfpv4 vfp-d32 sha2 crc32 v4 v5 v6 v7 v8 thumb2
zyxmon commented 6 years ago

As for go packages (binaries) - you can build them yourself. Just apply entware patches (if any) before building. As for full armv8 (arm64) support - we will try to build Entware for this architecture when we have arm64 routers in our hands. Currently RT-AC86U stock firmware runs armv7l userspace (32 bit) binaries.

odkrys commented 6 years ago

Can you tell me how 64-bit compiled go-lang packages work in 32-bit user space? I'm curious :O

zyxmon commented 6 years ago

I do not have RT-AC86U. My guess is - firmware kernel supports both 64-bit and 32-bit binaries. Go binaries are build statically - only kernel support is required to run them.

odkrys commented 6 years ago

thanks.