Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src add a disk-image=target option



details:   https://anonhg.NetBSD.org/src/rev/4e29307032cb
branches:  trunk
changeset: 784884:4e29307032cb
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Feb 13 02:17:54 2013 +0000

description:
add a disk-image=target option

diffstat:

 build.sh |  32 ++++++++++++++++++++++++++++++--
 1 files changed, 30 insertions(+), 2 deletions(-)

diffs (82 lines):

diff -r cfad2c69b6dd -r 4e29307032cb build.sh
--- a/build.sh  Wed Feb 13 00:40:28 2013 +0000
+++ b/build.sh  Wed Feb 13 02:17:54 2013 +0000
@@ -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 @@
        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 @@
                         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 @@
                            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 @@
        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 @@
        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 @@
                        releasekernel "${arg}"
                        ;;
 
+               disk-image=*)
+                       arg=${op#*=}
+                       diskimage "${arg}"
+                       ;;
+
                modules)
                        buildmodules
                        ;;



Home | Main Index | Thread Index | Old Index