aboutsummaryrefslogtreecommitdiffstats
path: root/sysgen/sysgen.go
diff options
context:
space:
mode:
authorDavid Drysdale <drysdale@google.com>2016-03-10 14:24:26 +0000
committerDavid Drysdale <drysdale@google.com>2016-03-10 14:33:32 +0000
commit064e1a65a5ce848434e9ceef500d03f7bde65249 (patch)
tree3a9b9a5400d1ff123d84a23a3391c667c38d6de8 /sysgen/sysgen.go
parent98cd0cc66d1cf22e99e096d51da39969a5bfc6d5 (diff)
sysgen: Cope with non-inline kernel build
When regenerating system call tables, cope with a local kernel tree where the kernel has been built into a separate directory (with `make O=...`) rather than inline. So: - LINUX makefile var / -linux command line option give location of source tree - LINUXBLD makefile var / -linuxbld command line option gives location of built kernel
Diffstat (limited to 'sysgen/sysgen.go')
-rw-r--r--sysgen/sysgen.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/sysgen/sysgen.go b/sysgen/sysgen.go
index 7f5979c65..f52e12ab7 100644
--- a/sysgen/sysgen.go
+++ b/sysgen/sysgen.go
@@ -17,7 +17,8 @@ import (
)
var (
- flagLinux = flag.String("linux", "", "path to linux kernel checkout")
+ flagLinux = flag.String("linux", "", "path to linux kernel source checkout")
+ flagLinuxBld = flag.String("linuxbld", "", "path to linux kernel build directory")
)
func main() {
@@ -25,6 +26,9 @@ func main() {
if *flagLinux == "" {
failf("provide path to linux kernel checkout via -linux flag (or make generate LINUX= flag)")
}
+ if *flagLinuxBld == "" {
+ flagLinuxBld = flagLinux
+ }
if len(flag.Args()) == 0 {
failf("usage: sysgen -linux=linux_checkout input_file")
}