forked from google/trillian-examples
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconsole.go
35 lines (28 loc) · 755 Bytes
/
console.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// https://github.com/usbarmory/armory-boot
//
// Copyright (c) F-Secure Corporation
// https://foundry.f-secure.com
//
// Use of this source code is governed by the license
// that can be found in the LICENSE file.
//go:build console && armory
// +build console,armory
package main
import (
"fmt"
"log"
"runtime"
"time"
usbarmory "github.com/usbarmory/tamago/board/f-secure/usbarmory/mark-two"
"github.com/usbarmory/tamago/soc/imx6"
)
func init() {
debugConsole, _ := usbarmory.DetectDebugAccessory(250 * time.Millisecond)
<-debugConsole
banner := fmt.Sprintf("armory-boot • %s/%s (%s) • %s %s • %s",
runtime.GOOS, runtime.GOARCH, runtime.Version(),
Revision, Build,
imx6.Model())
log.SetFlags(0)
log.Printf("%s", banner)
}