github.com/google/trillian-examples@v0.0.0-20240520080811-0d40d35cef0e/binary_transparency/firmware/devices/usbarmory/bootloader/console.go (about) 1 // https://github.com/usbarmory/armory-boot 2 // 3 // Copyright (c) F-Secure Corporation 4 // https://foundry.f-secure.com 5 // 6 // Use of this source code is governed by the license 7 // that can be found in the LICENSE file. 8 9 //go:build console && armory 10 // +build console,armory 11 12 package main 13 14 import ( 15 "fmt" 16 "log" 17 "runtime" 18 "time" 19 20 usbarmory "github.com/usbarmory/tamago/board/usbarmory/mk2" 21 "github.com/usbarmory/tamago/soc/nxp/imx6ul" 22 ) 23 24 func init() { 25 debugConsole, _ := usbarmory.DetectDebugAccessory(250 * time.Millisecond) 26 <-debugConsole 27 28 banner := fmt.Sprintf("armory-boot • %s/%s (%s) • %s %s • %s", 29 runtime.GOOS, runtime.GOARCH, runtime.Version(), 30 Revision, Build, 31 imx6ul.Model()) 32 33 log.SetFlags(0) 34 log.Printf("%s", banner) 35 }