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

Conversation

Projects
None yet
2 participants
@elfgoh
Contributor

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

This comment has been minimized.

Show comment
Hide comment
@elfgoh

elfgoh Aug 30, 2017

Contributor

Addresses #272 and #211

Contributor

elfgoh commented Aug 30, 2017

Addresses #272 and #211

@aelsabbahy

This comment has been minimized.

Show comment
Hide comment
@aelsabbahy

aelsabbahy Sep 1, 2017

Owner

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

Owner

aelsabbahy commented Sep 1, 2017

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

@aelsabbahy

This comment has been minimized.

Show comment
Hide comment
@aelsabbahy

aelsabbahy Sep 1, 2017

Owner

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

Owner

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

This comment has been minimized.

Show comment
Hide comment
@elfgoh

elfgoh Sep 10, 2017

Contributor

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.

Contributor

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 aelsabbahy:master Sep 12, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@elfgoh

This comment has been minimized.

Show comment
Hide comment
@elfgoh

elfgoh Sep 12, 2017

Contributor

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

Contributor

elfgoh commented Sep 12, 2017

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

@elfgoh elfgoh deleted the elfgoh:arm_make branch Sep 12, 2017

@aelsabbahy

This comment has been minimized.

Show comment
Hide comment
@aelsabbahy

aelsabbahy Sep 13, 2017

Owner

Yup as of 3.5:

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

Wonder how many ARM users want to use goss :)

Owner

aelsabbahy commented Sep 13, 2017

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

This comment has been minimized.

Show comment
Hide comment
@elfgoh

elfgoh Sep 13, 2017

Contributor

1 is a start :D

Contributor

elfgoh commented Sep 13, 2017

1 is a start :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment