Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/build.sh,v rcsdiff: /ftp/cvs/cvsroot/src/build.sh,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.251 retrieving revision 1.251.2.2 diff -u -p -r1.251 -r1.251.2.2 --- src/build.sh 2011/10/17 16:22:12 1.251 +++ src/build.sh 2012/10/30 18:46:04 1.251.2.2 @@ -1,5 +1,5 @@ #! /usr/bin/env sh -# $NetBSD: build.sh,v 1.251 2011/10/17 16:22:12 mbalmer Exp $ +# $NetBSD: build.sh,v 1.251.2.2 2012/10/30 18:46:04 yamt Exp $ # # Copyright (c) 2001-2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -503,6 +503,8 @@ initdefaults() do_syspkgs=false do_iso_image=false do_iso_image_source=false + do_live_image=false + do_install_image=false do_params=false do_rump=false @@ -552,6 +554,14 @@ getarch() # case "${MACHINE}" in + evbearm-e[bl]) + makewrappermachine=${MACHINE} + # MACHINE_ARCH is "arm" or "armeb", not "armel" + MACHINE_ARCH=earm${MACHINE##*-} + MACHINE_ARCH=${MACHINE_ARCH%el} + MACHINE=evbarm + ;; + evbarm-e[bl]) makewrappermachine=${MACHINE} # MACHINE_ARCH is "arm" or "armeb", not "armel" @@ -669,7 +679,7 @@ validatearch() # case "${MACHINE_ARCH}" in - alpha|arm|armeb|hppa|i386|m68000|m68k|mipse[bl]|mips64e[bl]|powerpc|powerpc64|sh3e[bl]|sparc|sparc64|vax|x86_64|ia64) + alpha|arm|armeb|earm|earmeb|hppa|i386|m68000|m68k|mipse[bl]|mips64e[bl]|powerpc|powerpc64|sh3e[bl]|sparc|sparc64|vax|x86_64|ia64) ;; "") @@ -687,7 +697,11 @@ validatearch() case "${MACHINE}" in evbarm) - arches="arm armeb" + arches="arm armeb earm earmeb" + ;; + + cats|iyonix|netwinder|shark|zaurus) + arches="arm earm" ;; algor|arc|cobalt|pmax) @@ -864,6 +878,10 @@ Usage: ${progname} [-EhnorUuxy] [-a arch RELEASEDIR/RELEASEMACHINEDIR/binary/syspkgs. iso-image Create CD-ROM image in RELEASEDIR/iso. iso-image-source Create CD-ROM image with source in RELEASEDIR/iso. + live-image Create bootable live image in + RELEASEDIR/RELEASEMACHINEDIR/installation/liveimage. + install-image Create bootable installation image in + RELEASEDIR/RELEASEMACHINEDIR/installation/installimage. params Display various make(1) parameters. Options: @@ -1135,6 +1153,14 @@ parseoptions() op=iso_image_source # used as part of a variable name ;; + live-image) + op=live_image # used as part of a variable name + ;; + + install-image) + op=install_image # used as part of a variable name + ;; + kernel=*|releasekernel=*) arg=${op#*=} op=${op%%=*} @@ -1387,10 +1413,23 @@ rebuildmake() # Perform some late sanity checks, after rebuildmake, # but before createmakewrapper or any real work. # -# Also create the top-level obj directory. +# Creates the top-level obj directory, because that +# is needed by some of the sanity checks. +# +# Prints status messages reporting the values of several variables. # validatemakeparams() { + # MAKECONF (which defaults to /etc/mk.conf in share/mk/bsd.own.mk) + # can affect many things, so mention it in an early status message. + # + MAKECONF=$(getmakevar MAKECONF) + if [ -e "${MAKECONF}" ]; then + statusmsg2 "MAKECONF file:" "${MAKECONF}" + else + statusmsg2 "MAKECONF file:" "${MAKECONF} (File not found)" + fi + if [ "${runcmd}" = "echo" ]; then TOOLCHAIN_MISSING=no EXTERNAL_TOOLCHAIN="" @@ -1565,6 +1604,16 @@ validatemakeparams() fi ;; esac + + # live-image and install-image targets require binary sets + # (actually DESTDIR/etc/mtree/set.* files) built with MKUNPRIVED. + # If release operation is specified with live-image or install-image, + # the release op should be performed with -U for later image ops. + # + if ${do_release} && ( ${do_live_image} || ${do_install_image} ) && \ + [ "${MKUNPRIVED}" = "no" ] ; then + bomb "-U must be specified on building release to create images later." + fi } @@ -1632,7 +1681,7 @@ createmakewrapper() eval cat <