tamago

TamaGo - bare metal Go for ARM SoCs

  • 所有者: usbarmory/tamago
  • 平台:
  • 许可证: BSD 3-Clause "New" or "Revised" License
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

TamaGo - bare metal Go for ARM SoCs

tamago, https://github.com/f-secure-foundry/tamago

Copyright (c) F-Secure Corporation
https://foundry.f-secure.com

TamaGo gopher

Authors

Andrea Barisani
andrea.barisani@f-secure.com, andrea@inversepath.com

Andrej Rosano
andrej.rosano@f-secure.com, andrej@inversepath.com

Introduction

TamaGo is a framework that enables compilation and execution of unencumbered Go
applications on bare metal ARM System-on-Chip (SoC) components.

The projects spawns from the desire of reducing the attack surface of embedded
systems firmware by removing any runtime dependency on C code and Operating
Systems.

The TamaGo framework consists of the following components:

  • A modified Go distribution
    which extends GOOS support to the tamago target, allowing bare metal
    execution.

  • Go packages for SoC driver support.

  • Go packages for board support.

The modifications are meant to be minimal for both the Go distribution (< ~4000
LOC changed) and the target application (one import required), with a clean
separation from other architectures.

Strong emphasis is placed on code re-use from existing architectures already
included within the standard Go runtime, see
Internals.

Both aspects are motivated by the desire of providing a framework that allows
secure Go firmware development on embedded systems.

Current release level

The current release for the TamaGo modified Go distribution is
tamago1.15.3,
which adds
GOOS=tamago support to go1.15.3.

Binary releases for amd64 and armv7l Linux hosts are available.

Documentation

The main documentation can be found on the
project wiki.

The package API documentation can be found on
pkg.go.dev.

Supported hardware

The following table summarizes currently supported SoCs and boards., SoC, Board, SoC package, Board package, ---------------, --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------, -------------------------------------------------------------------------------, --------------------------------------------------------------------------------------------------------, NXP i.MX6ULL, USB armory Mk II, imx6, usbarmory/mark-two, NXP i.MX6ULL, MCIMX6ULL-EVK, imx6, mx6ullevk, BCM2835, Raspberry Pi Zero, bcm2835, pi/pizero, BCM2836, Raspberry Pi 2, bcm2835, pi/pi2, Compiling

Go applications are simply required to import, the relevant board package to
ensure that hardware initialization and runtime support takes place:

import (
	// Example for USB armory Mk II
	_ "github.com/f-secure-foundry/tamago/board/f-secure/usbarmory/mark-two"
)

Build the TamaGo compiler
(or use the latest binary release):

git clone https://github.com/f-secure-foundry/tamago-go -b latest
cd tamago-go/src && ./all.bash
cd ../bin && export TAMAGO=`pwd`/go

Go applications can be compiled with the compiler built in the previous step,
with the addition of a few flags/variables:

# Example for USB armory Mk II
GO_EXTLINK_ENABLED=0 CGO_ENABLED=0 GOOS=tamago GOARM=7 GOARCH=arm \
  ${TAMAGO} build -ldflags "-T 0x80010000  -E _rt0_arm_tamago -R 0x1000"

See the respective board package README file for compilation information for
each specific target.

Executing and debugging

See the respective board package README file for execution and debugging
information for each specific target (real or emulated).

The example application
provides sample driver usage and instructions for native as well as emulated
execution.

License

tamago, https://github.com/f-secure-foundry/tamago
Copyright (c) F-Secure Corporation

This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation under version 3 of the License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.

See accompanying LICENSE file for full details.

The TamaGo logo is adapted from the Go gopher designed by Renee French and
licensed under the Creative Commons 3.0 Attributions license. Go Gopher vector
illustration by Hugo Arganda.

主要指标

概览
名称与所有者usbarmory/tamago
主编程语言Go
编程语言Go (语言数: 3)
平台
许可证BSD 3-Clause "New" or "Revised" License
所有者活动
创建于2019-10-24 09:51:55
推送于2025-05-28 10:44:38
最后一次提交2025-05-07 10:45:46
发布数0
用户参与
星数1.5k
关注者数36
派生数57
提交数1.1k
已启用问题?
问题数27
打开的问题数0
拉请求数18
打开的拉请求数0
关闭的拉请求数3
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?