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

Adding ARM building in Makefile #275

Merged
merged 2 commits into from
Sep 12, 2017
Merged

Conversation

elfgoh
Copy link
Contributor

@elfgoh elfgoh commented Aug 30, 2017

This PR enables an ARM binary to be build by running make release/goss-linux-arm. The resulting binary was ran on Beaglebone black debian and works fine when running

./goss-linux-arm  autoadd sshd
./goss-linux-arm validate

@elfgoh
Copy link
Contributor Author

elfgoh commented Aug 30, 2017

Addresses #272 and #211

@aelsabbahy
Copy link
Member

What is the default value of GOARM when left blank?
https://github.com/golang/go/wiki/GoArm#supported-architectures

@aelsabbahy
Copy link
Member

aelsabbahy commented Sep 1, 2017

Also, need to add this new target as a dependency of build in the makefile. But otherwise looks good.

@elfgoh
Copy link
Contributor Author

elfgoh commented Sep 10, 2017

The default value is 6. Thought I have read a few sources stating that compiled ARMv6 binaries are backward compatible with v7 processors.

There are a few sources indicating that it is ideal to compile for ARMv6 as this will allow older RPI models to be supported. I recommend max compatibility using ARMv6

You my have recognized that the optional variable GOARM has been set to 7. It enables support for ARMv7 instead of using the default value 6 for ARMv6. The difference is, that while the application will not run on old Raspberry Pi models, it takes advantage of a few more floating point registers and operations of the ARMv7 CPU from the Raspberry Pi 2. If you are in doubt, leave this variable unset for maximum compatibility unless you have a reason to adjust it.

Sure, knock yourself out, but that means your program won’t run on all models of the Raspberry Pi. The difference between GOARM=6 (the default) and GOARM=7 is enabling a few more floating point registers, and a few more operations that allow floating point double values to be passed to and from the ARMv7 (VPFv3) floating point co processor more efficiently. IMO, with the current Go 1.5 arm compiler, it’s not worth the bother.

@aelsabbahy aelsabbahy merged commit b3b0736 into goss-org:master Sep 12, 2017
@elfgoh
Copy link
Contributor Author

elfgoh commented Sep 12, 2017

Great! So I guess there will be ARM binaries in the next release?

@elfgoh elfgoh deleted the arm_make branch September 12, 2017 03:13
@aelsabbahy
Copy link
Member

Yup as of 3.5:

https://github.com/aelsabbahy/goss/releases/tag/v0.3.5

Wonder how many ARM users want to use goss :)

@elfgoh
Copy link
Contributor Author

elfgoh commented Sep 13, 2017

1 is a start :D

BenjaminHerbert pushed a commit to BenjaminHerbert/goss that referenced this pull request May 28, 2020
* Adding ARM building in Makefile

* Adding goss-linux-arm as a build target
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

Successfully merging this pull request may close these issues.

2 participants