1 // Copyright 2016 The Fuchsia Authors
2 // Copyright (c) 2013 Google, Inc.
3 //
4 // Use of this source code is governed by a MIT-style
5 // license that can be found in the LICENSE file or at
6 // https://opensource.org/licenses/MIT
7 
8 #pragma once
9 
10 #include <zircon/compiler.h>
11 
12 __BEGIN_CDECLS
13 
14 #define VERSION_STRUCT_VERSION 0x2
15 
16 typedef struct {
17     unsigned int struct_version;
18     const char* arch;
19     const char* platform;
20     const char* target;
21     const char* project;
22     const char* buildid;
23 
24     // This is a printable string of hex digits giving the ELF build ID
25     // bits.  The ELF build ID is a unique bit-string identifying the
26     // kernel binary, produced automatically by the linker.  It's the
27     // canonical way to find a binary and its debug information.
28     const char* elf_build_id;
29 } lk_version_t;
30 
31 extern const lk_version_t version;
32 
33 void print_version(void);
34 
35 __END_CDECLS
36