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

RaspberryPi Zero W not supported? #46

Open
CamDavidsonPilon opened this issue Jan 28, 2021 · 2 comments
Open

RaspberryPi Zero W not supported? #46

CamDavidsonPilon opened this issue Jan 28, 2021 · 2 comments

Comments

@CamDavidsonPilon
Copy link

Hi @cbednarski, your precompiled assets work well for the traditional Rpis I have (Rpi 3 & 4), but I get an error when using them with my RPi Zero W. Here's my test script:

wget https://github.com/cbednarski/hostess/releases/download/v0.5.2/hostess_linux_arm
chmod a+x hostess_linux_arm
sudo ./hostess_linux_arm rm raspberrypi

errors with Illegal instruction.

@cbednarski
Copy link
Owner

Hey @CamDavidsonPilon, thanks for the note. I don't have a Raspberry Pi Zero to test on, but I did some reading online and I found some info.

First, it appears that the Raspberry Pi Zero uses ARMv6 -- this refers to the CPU instructions on the chipset. Second, Go has compiler environment option to target different ARM chips. I didn't specify anything when I compiled so I guess the default is ARMv7, and the error seems to indicate that the program is trying to call a CPU instruction that the Raspberry Pi Zero doesn't have.

You may be able to solve this by compiling from source using the following:

git clone https://github.com/cbednarski/hostess
cd hostess
GOOS=linux GOARCH=arm GOARM=6 go build .

If this resolves the issue for you let me know. I'm also curious whether the ARMv6 builds work on the Raspberry Pi 3 and 4. I would guess so, but I was not even aware of this issue until you brought it up!

Assuming this all works out I can add this env var to the makefile for the next release.

@CamDavidsonPilon
Copy link
Author

That worked! I had to slightly modify your script:

GOOS=linux GOARCH=arm GOARM=6 go build -o hostess_build .

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

2 participants