From 064e1a65a5ce848434e9ceef500d03f7bde65249 Mon Sep 17 00:00:00 2001 From: David Drysdale Date: Thu, 10 Mar 2016 14:24:26 +0000 Subject: 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 --- sysgen/sysgen.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sysgen/sysgen.go') 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") } -- cgit mrf-deployment