Module Name:    src
Committed By:   martin
Date:           Mon May  5 19:12:19 UTC 2014

Modified Files:
        src: build.sh

Log Message:
Add a new action kernel.gdb=MYCONF to build a kernel with debuginfo
(and generate netbsd.gdb)


To generate a diff of this commit:
cvs rdiff -u -r1.280 -r1.281 src/build.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/build.sh
diff -u src/build.sh:1.280 src/build.sh:1.281
--- src/build.sh:1.280	Tue Apr 29 11:52:51 2014
+++ src/build.sh	Mon May  5 19:12:19 2014
@@ -1,5 +1,5 @@
 #! /usr/bin/env sh
-#	$NetBSD: build.sh,v 1.280 2014/04/29 11:52:51 uebayasi Exp $
+#	$NetBSD: build.sh,v 1.281 2014/05/05 19:12:19 martin Exp $
 #
 # Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -922,6 +922,8 @@ Usage: ${progname} [-EhnorUuxy] [-a arch
     install=idir        Run "make installworld" to \`idir' to install all sets
                         except \`etc'.  Useful after "distribution" or "release"
     kernel=conf         Build kernel with config file \`conf'
+    kernel.gdb=conf     Build kernel (including netbsd.gdb) with config
+    			file \`conf'
     releasekernel=conf  Install kernel built by kernel=conf to RELEASEDIR.
     installmodules=idir Run "make installmodules" to \`idir' to install all
                         kernel modules.
@@ -1220,7 +1222,7 @@ parseoptions()
 			op=install_image # used as part of a variable name
 			;;
 
-		kernel=*|releasekernel=*)
+		kernel=*|releasekernel=*|kernel.gdb=*)
 			arg=${op#*=}
 			op=${op%%=*}
 			[ -n "${arg}" ] ||
@@ -1746,7 +1748,7 @@ createmakewrapper()
 	eval cat <<EOF ${makewrapout}
 #! ${HOST_SH}
 # Set proper variables to allow easy "make" building of a NetBSD subtree.
-# Generated from:  \$NetBSD: build.sh,v 1.280 2014/04/29 11:52:51 uebayasi Exp $
+# Generated from:  \$NetBSD: build.sh,v 1.281 2014/05/05 19:12:19 martin Exp $
 # with these arguments: ${_args}
 #
 
@@ -1861,7 +1863,7 @@ buildkernel()
 	[ -x "${TOOLDIR}/bin/${toolprefix}config" ] \
 	|| bomb "${TOOLDIR}/bin/${toolprefix}config does not exist. You need to \"$0 tools\" first."
 	${runcmd} "${TOOLDIR}/bin/${toolprefix}config" -b "${kernelbuildpath}" \
-		-s "${TOP}/sys" "${kernelconfpath}" ||
+		${ksymopts} -s "${TOP}/sys" "${kernelconfpath}" ||
 	    bomb "${toolprefix}config failed for ${kernelconf}"
 	make_in_dir "${kernelbuildpath}" depend
 	make_in_dir "${kernelbuildpath}" all
@@ -2100,7 +2102,11 @@ main()
 			arg=${op#*=}
 			buildkernel "${arg}"
 			;;
-
+		kernel.gdb=*)
+			arg=${op#*=}
+			ksymopts="-D DEBUG=-g"
+			buildkernel "${arg}"
+			;;
 		releasekernel=*)
 			arg=${op#*=}
 			releasekernel "${arg}"

Reply via email to