Skip to content

proposal: all: add bare metal ARM support #37503

Closed
@abarisani

Description

@abarisani

Hello,

I am unsure if to go directly with a CL (as this has been discussed already on golang-dev) or if to go through this issue first, apologies if I should have done otherwise.

On this golang-dev thread I described the new GOOS=tamago created to support bare metal ARMv7 architectures using the original Go compiler.

The use case for such support is to run native Go applications on Single Board Computers without and underlying Operating System. Currently we are testing this on our own USB armory but we are working on Raspberry PI Zero support as well.

We have working examples of SSH and HTTPS servers running on Ethernet over USB with all USB drivers and stack implemented in pure Go. We are also working on a pure Go OpenPGP card leveraging on this.

We think there is great value in having this kind of support in the Go language as it considerably improves the security and ease of development on embedded systems and allows to purge C, with ease, on otherwise complex firmware efforts.

Our work is split across the following 3 repositories:

For upstream consideration only the first repository matters, we intentionally kept the compiler changes separate from SoC specific drivers and ensure that Go applications can run mostly unencumbered and with a single import required for the board package.

You can find the following resources to understand more about our effort:

Our compiler modification approach tries to be as minimal and clean as possible, respecting or reusing existing Go runtime code. A new GOOS=tamago is added only for GOARCH=arm, you can see the changes here.

We are committed in maintaining the required patches long term, we also understand that any potential upstream inclusion would require renaming tamago to something more suited (others have been using noos in other proposals), which is totally fine.

The patches should also be easy to revert if necessary.

To further prove the maintainability and isolation of this new GOOS from the existing code base, we began our work on go1.12, then rebased it to go1.13. Bumping it to 14.1 only took a small effort.

We built GOOS=tamago specifically to make it upstream friendly and have the minimum possible set of changes as our focus is trust for security applications and maintainability without reinventing
or adding too much code to the existing runtime.

We would much like to start a conversation to have these changes accepted upstream and take responsibility to maintain them.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions