summaryrefslogtreecommitdiffstats
path: root/util/x86
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2018-04-25 14:10:46 -0600
committerAaron Durbin <adurbin@chromium.org>2018-04-27 03:25:28 +0000
commit94984a846166c7ac927fcfcb2b34c1bfeabf8fcf (patch)
tree124c79fc3b0e5aab2b5854ba26993a0cf131e0fb /util/x86
parent7ca400665ec933b200790d5219dfa059cc558ea5 (diff)
downloadcoreboot-94984a846166c7ac927fcfcb2b34c1bfeabf8fcf.tar.gz
coreboot-94984a846166c7ac927fcfcb2b34c1bfeabf8fcf.tar.bz2
coreboot-94984a846166c7ac927fcfcb2b34c1bfeabf8fcf.zip
util/x86/x86_page_tables: add command line to generated files
In order to help the reader understand where things are generated from add a comment string that is composed of the command line used to generate the files. BUG=b:72728953 Change-Id: I1b93923f8b08192448ab19226fd27661cc09e853 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/25834 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'util/x86')
-rw-r--r--util/x86/x86_page_tables.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/util/x86/x86_page_tables.go b/util/x86/x86_page_tables.go
index 22793654f003..2dc0ed36ff41 100644
--- a/util/x86/x86_page_tables.go
+++ b/util/x86/x86_page_tables.go
@@ -23,6 +23,7 @@ import "fmt"
import "io"
import "log"
import "os"
+import "path/filepath"
import "sort"
import "strconv"
import "strings"
@@ -174,8 +175,13 @@ func (cw *cWriter) WritePageEntry(data interface{}) error {
if cw.currentIndex == 0 {
if _, err := fmt.Fprint(cw.wr, generatedCodeLicense); err != nil {
- return err
- }
+ return err
+ }
+ if _, err := fmt.Fprintf(cw.wr, "/* Generated by:\n util/x86/%s %s\n */\n",
+ filepath.Base(os.Args[0]),
+ strings.Join(os.Args[1:], " ")); err != nil {
+ return err
+ }
includes := []string{
"stdint.h",
}