Module Name: src Committed By: christos Date: Wed Feb 13 02:17:55 UTC 2013
Modified Files: src: build.sh Log Message: add a disk-image=target option To generate a diff of this commit: cvs rdiff -u -r1.263 -r1.264 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.263 src/build.sh:1.264 --- src/build.sh:1.263 Sun Feb 3 00:37:43 2013 +++ src/build.sh Tue Feb 12 21:17:54 2013 @@ -1,5 +1,5 @@ #! /usr/bin/env sh -# $NetBSD: build.sh,v 1.263 2013/02/03 05:37:43 matt Exp $ +# $NetBSD: build.sh,v 1.264 2013/02/13 02:17:54 christos Exp $ # # Copyright (c) 2001-2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -508,6 +508,7 @@ initdefaults() do_iso_image_source=false do_live_image=false do_install_image=false + do_disk_image=false do_params=false do_rump=false @@ -922,6 +923,8 @@ Usage: ${progname} [-EhnorUuxy] [-a arch RELEASEDIR/RELEASEMACHINEDIR/installation/liveimage. install-image Create bootable installation image in RELEASEDIR/RELEASEMACHINEDIR/installation/installimage. + disk-image=target Creae bootable disk image in + RELEASEDIR/RELEASEMACHINEDIR/binary/gzimg/target.img.gz. params Display various make(1) parameters. Options: @@ -1208,6 +1211,14 @@ parseoptions() bomb "Must supply a kernel name with \`${op}=...'" ;; + disk-image=*) + arg=${op#*=} + op=disk_image + [ -n "${arg}" ] || + bomb "Must supply a target name with \`${op}=...'" + + ;; + modules) op=modules ;; @@ -1719,7 +1730,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.263 2013/02/03 05:37:43 matt Exp $ +# Generated from: \$NetBSD: build.sh,v 1.264 2013/02/13 02:17:54 christos Exp $ # with these arguments: ${_args} # @@ -1799,6 +1810,18 @@ getkernelconf() kernelbuildpath="${KERNOBJDIR}/${kernelconfname}" } +diskimage() +{ + ARG="$(echo $1 | tr '[:lower:]' '[:upper:]')" + [ -f "${DESTDIR}/etc/mtree/set.base" ] || + bomb "The release binaries must be built first" + kerneldir="${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/kernel" + kernel="${kerneldir}/netbsd-${ARG}.gz" + [ -f "${kernel}" ] || + bomb "The kernel ${kernel} must be built first" + make_in_dir "${NETBSDSRCDIR}/etc" "smp_${1}" +} + buildkernel() { if ! ${do_tools} && ! ${buildkernelwarned:-false}; then @@ -2066,6 +2089,11 @@ main() releasekernel "${arg}" ;; + disk-image=*) + arg=${op#*=} + diskimage "${arg}" + ;; + modules) buildmodules ;;