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

Raspberry Pi Zero W 1.4.2 precompiled binary does not work #1017

Closed
PeterJBurke opened this issue Aug 22, 2019 · 10 comments
Closed

Raspberry Pi Zero W 1.4.2 precompiled binary does not work #1017

PeterJBurke opened this issue Aug 22, 2019 · 10 comments
Labels
Type: CI / Build problem

Comments

@PeterJBurke
Copy link

PeterJBurke commented Aug 22, 2019

Describe the bug*
Hangs on:
*** Waiting for identity generation...
after running:
curl -s https://install.zerotier.com | sudo bash
on Raspberry Pi Zero W.

To Reproduce
Run
curl -s https://install.zerotier.com | sudo bash
on fresh install of Raspbian on Rasberry Pi Zero W.

Expected behavior
Hangs on
*** Waiting for identity generation...

Desktop (please complete the following information):

  • OS: [e.g. Mac, Linux, Windows, BSD]
    Raspbian Stretch
  • OS/Distribution Version
    release "2018-11-13-raspbian-stretch-lite"
  • ZeroTier Version
    1.4.2
  • Hardware [e.g. raspberry pi 3]
    Raspberry Pi Zero W.

CPU info from cat /proc/cpuinfo:
processor : 0
model name : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS : 697.95
Features : half thumb fastmult vfp edsp java tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xb76
CPU revision : 7

Hardware : BCM2835
Revision : 9000c1
Serial : 0000000006c28aea

Which OS and version (cat /etc/rpi-issue)?
Raspberry Pi reference 2019-07-10
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 175dfb027ffabd4b8d5080097af0e51ed9a4a56c, stage2

Which firmware version (vcgencmd version)?
Jul 9 2019 14:42:57
Copyright (c) 2012 Broadcom
version 6c3fe3f096a93de3b34252ad98cdccadeb534be2 (clean) (release) (start_x)

Which kernel version (uname -a)?
Linux raspberrypi 4.19.58+ #1245 Fri Jul 12 17:20:08 BST 2019 armv6l GNU/Linux

Additional context

See also:
#510
#566

@thayerben
Copy link

thayerben commented Aug 22, 2019

+1 for this bug report.

This appears to be due to the zerotier-one binary segfaulting which expresses itself as being stuck on identity generation during the install.

If this helps anyone here's my temporary workaround:

  • grab install script from https://install.zerotier.com
  • run it and CTRL+C it when it hangs on identity generation
  • grab zerotier-one binary that works from a previous install
  • copy it and overwrite /usr/sbin/zerotier-one
  • edit install script and comment out line 73 so it'll do the install a second time
  • run the install script again

@laduke
Copy link
Contributor

laduke commented Aug 22, 2019

Older debs can be found here https://download.zerotier.com/debian/stretch/pool/main/z/zerotier-one/

@thayerben
Copy link

thayerben commented Aug 22, 2019

A much better workaround indeed :) Thank you!

@laduke
Copy link
Contributor

laduke commented Aug 22, 2019

@thayerben which arch works on pi 0?

@sinamics
Copy link

sinamics commented Aug 22, 2019

@laduke armhf

@adamierymenko
Copy link
Contributor

adamierymenko commented Aug 23, 2019

We just ordered a Pi Zero to test on. :)

@adamierymenko adamierymenko added Type: CI / Build problem compatibility labels Aug 23, 2019
@adamierymenko
Copy link
Contributor

adamierymenko commented Aug 23, 2019

This is probably an example of "ARM hell" with ARM32 and its many variants.

@sinamics
Copy link

sinamics commented Aug 24, 2019

I compiled new 1.4.2 binaries from source on a RPI3 (ARMv7). Also tested and working on Pi0w (ARMv6)
They are available here https://gofile.me/2zd0h/cKH6Lf0hi

@onionjake
Copy link

onionjake commented Sep 3, 2019

This is probably stating the obvious, so apologies if this isn't any help.

Glancing at the instructions that are causing it to exit, it appears that the binary is compiled for ARMv7 instead of ARMv6. I'd be surprised if this wasn't also causing issues for the original Raspberry Pi which uses the same cpu as the zero.

$ readelf -a -W $(which zerotier-one) | grep Tag_
  Tag_CPU_name: "7-A"
  Tag_CPU_arch: v7
  Tag_CPU_arch_profile: Application
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-2
  Tag_FP_arch: VFPv3-D16
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_rounding: Needed
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align_needed: 8-byte
  Tag_ABI_align_preserved: 8-byte, except leaf SP
  Tag_ABI_enum_size: int
  Tag_ABI_VFP_args: VFP registers
  Tag_CPU_unaligned_access: v6

I believe if you use these gcc flags it should produce binaries that can run on all Pi's and still take advantage of the early FPU on the originals:

-march=armv6
-mfpu=vfp
-mfloat-abi=hard

Of course I think this would lose any NEON support which it looks like explicitly being enabled in the makefiles for armhf?

@laduke
Copy link
Contributor

laduke commented Sep 6, 2019

1.4.6 is out.

apt-get update
apt-get install zerotier-one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: CI / Build problem
Projects
None yet
Development

No branches or pull requests

6 participants